[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 5.8 Quake Model Converter (`mdl2spr`)

By Nathaniel Saint Martin, noote@bigfoot.com. Back seam fix and skin resizing by Seth Galbraith, sgalbrai@linknet.kitsap.lib.wa.us. Project overhauled by Eric Sunshine, sunshine@sunshineco.com.

``mdl2spr'` is a model converter for Quake1 MDL and Quake2 MD2 files. It converts these files into Crystal Space's sprite format. If the Quake1 MDL contains skins, they are extracted and saved as PNG image files. If skin height or width is not a power of two, it will be resized.

### Usage

``mdl2spr'` is invoked from the command line, and is given the name of an input ``.mdl'` or ``.md2'` model file, as well as the name of the desired output sprite file.

    mdl2spr [options] model-file output-sprite-name

Both ``model-file'` and ``output-sprite-name'` are required. ``model-file'` is the filename of the input ``.mdl'` or ``.md2'` model file, and ``output-sprite-name'` is the name of the output sprite without the trailing ``.spr'` extension (which will be appended automatically by ``mdl2spr'`).

If a skin is extracted from a MDL file, then it will be written to a file named ``output-srite-name.png'`. If more than one skin exists within the model, then each skin will be placed in its own PNG file and a number (and possibly letter) will be appended to the sprite name before the ``.png'` extension.

Here is a summary of the options understood by ``mdl2spr'`:

`-h`

  Display usage and option summary.

`-s <float>`

  Set the global scale of model based upon the floating point number ``float'`. Default is 0.025.

`-d <int>`

  Specify the frame delay in Quake ticks from ``int'` for frames which don't otherwise have a built-in delay. Default is 100.

`-n`

  Disable automatic naming of action frame sets. Enabled by default.

`-x <float>`

  Set center of sprite on X axis from ``float'`. Default is 0.0.

`-y <float>`

  Set center of sprite on Y axis from ``float'`. Default is 0.0.

`-z <float>`

  Set center of sprite on Z axis from ``float'`. Default is 0.0.

`-r`

  Disable automatic power-of-2 skin resizing. Enabled by default. This option only applies to Quake1 MDL files (not Quake2 MD2 files).

### Future Plans

This is a list of planned future enhancements to ``mdl2spr'`.

- Add a command-line option so user can manually specify a replacement ``palette.lmp'` file rather than using the built-in one.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ]

This document was generated using texi2html 1.76.