Qwalk

Qwalk - How to use - Todo/Bugs - Download - Contact - (Back to QShed)

Model converter

The model converter is a command-line tool which can import MDL, MD2, or MD3 models, and export to MDL or MD2.

Usage

modelconv [options] -i infilename outfilename
Output format is specified by the file extension of outfilename.
Options:
  -i filename        specify the model to load (required).
  -notex             remove all existing skins from model after importing.
  -tex filename      replace the model's texture with the given texture. This
                     is required for any texture to be loaded onto MD2 or MD3
                     models (the program doesn't automatically load external
                     skins). Supported formats are PCX, TGA, and JPEG.
  -texwidth #        see below
  -texheight #       resample the model's texture to the given dimensions.
  -skinpath x        specify the path that skins will be exported to when
                     exporting to md2 (e.g. "models/players"). Should not
                     contain trailing slash. If skinpath is not specified,
                     skins will be created in the same folder as the model.
  -flags #           set model flags, such as rocket smoke trail, rotate, etc.
                     See Quake's defs.qc for a list of all flags.
  -synctype x        set synctype flag, only used by Quake. The valid values
                     are sync (default) and rand.
  -offsets_x #       see below
  -offsets_y #       see below
  -offsets_z #       set the offsets vector, which only exists in the MDL
                     format and is not used by Quake. It's only supported here
                     for reasons of completeness.
  -renormal          recalculate vertex normals.
  -rename_frames     rename all frames to "frame1", "frame2", etc.
  -force             force "yes" response to all confirmation requests
                     regarding overwriting existing files or creating
                     nonexistent paths.
Examples:
modelconv -i tris.md2 out.mdl
Converts the model tris.md2 to out.mdl. All textures will be converted to the Quake palette (properly taking fullbrights into account).
modelconv -i model.md3 -tex texture.jpg -texwidth 300 -texheight 200 out.mdl
Imports the model model.md3, loads into it the image texture.jpg (resampled to 300x200), and exports it to MDL, converting the texture to the Quake palette.

Model viewer

The model viewer is currently very basic. It has no GUI and no animation playback controls. It simply loops through all animations in the model. You can move the camera by moving the mouse while the left mouse button is held, and zoom in and out by using the mouse wheel. Press SPACEBAR to toggle "pause lighting", which will stop the light source from following the camera. Press SLASH to cycle through the skins in the model, if it has more than one.

Usage

viewer [options] filename
Options:
  -tex filename      replace the model's texture with the given texture. This
                     is required for any texture to be loaded onto MD2 or MD3
                     models (the program doesn't automatically load external
                     skins). Supported formats are PCX, TGA, and JPEG.
  -width #           see below
  -height #          specify the video resolution of the window. The default is
                     640x480. The window is resizeable when the program is
                     running.
  -bpp #             specify the bits-per-pixel resolution. Valid values are 16
                     or 32 (default).
  -frame #           specify a single frame to view. If this frame index refers
                     to a framegroup, that framegroup will be animated.
  -texturefiltering  enable bilinear texture filtering (smoothed texture). The
                     default is nearest-neighbour sampling, which looks
                     "blocky" (similar to software-rendered engines).
  -firstperson       attach the model the view, as the gun models in Quake.
  -nolerp            don't interpolate the vertex positions when animating.
  -wireframe         enable wireframe rendering.