Hosting and domain costs until October 2024 have been generously sponsored by dumptruck_ds. Thank you!

FTEQW IQM Tool Documentation

From Quake Wiki

Revision as of 00:26, 14 June 2020 by Echos (talk | contribs)

The FTEQW IQM TOOL

This is a compiler to generate IQM models. It's a fork of Lee Salzman's exporter and has additional features:

  • compile options can be specified in command files
  • additional mesh properties
  • multiple mesh files
  • hitmesh support
  • some other things
  • more verbose text output
  • additional shader prefixes
  • bone renaming and regrouping
  • animation unpacking

Supported import formats:

.md5mesh .md5anim .iqe .smd .fbx .obj

Usage

You can supply either a mesh file, animation files, or both. Note that if an input mesh file is supplied, it must come before the animation files in the file list. The output IQM file will contain the supplied mesh and any supplied animations. If no mesh is provided,the IQM file will simply contain the supplied animations.

iqm.exe cmdfile.cmd
iqm.exe [options] output.iqm mesh.iqe anim1.iqe ... animN.iqe
iqm.exe [options] output.iqm mesh.md5mesh anim1.md5anim ... animN.md5anim
iqm.exe [options] output.iqm mesh.smd anim1.smd ... animN.smd
iqm.exe [options] output.iqm mesh.fbx anim1.fbx ... animN.fbx
iqm.exe [options] output.iqm mesh.obj

For certain formats, IQE, OBJ, and FBX, it is possible to combine multiple mesh files of the exact same vertex layout and skeleton by supplying them as "mesh1.iqe,mesh2.iqe,mesh3.iqe", that is, a comma-separated list of the mesh files (with no spaces) in place of the usual mesh filename.


Options

Options can be any of the following command-line switches:

Option Description
-s N Sets the output scale to N (float).
--scale N Sets the output scale to N (float).
--meshtrans Z Translates a mesh by Z (float). This does not affect the skeleton.
--meshtrans X,Y,Z Translates a mesh by X,Y,Z (floats). This does not affect the skeleton.
-j Forces the exporting of joint information in animation files without meshes.
--forcejoints Forces the exporting of joint information in animation files without meshes.
-q Quiet. Only display warnings or errors.
-v Verbose. Print lots of extra info.
-n No Extensions. Disables the use of fte-specific iqm extensions.


Options for animations

Each animation file can be preceded by any combination of the following commandline switches:

Option Description
--name A Sets the name of the animation to A.
--fps N Sets the FPS of the animation to N (float).
--loop Sets the loop flag for the animation.
--start N Sets the first frame of the animation to N (integer).
--end N Sets the last frame of the animation to N (integer).


Command File

Option Description
output <FILENAME> the output file name. you should only have one of these.
exec <FILENAME> exec the specified command file, before parsing the rest of the current file.
hitbox <BODY NUM> <BONE NAME> <MIN POS VECTOR> <MAX POS VECTOR> generates a hitmesh as a bbox centered around the bone in the base pose (the hitbox will rotate/move with animations). The bodynum will be visible to gamecode, and may merge with other hitboxes with the same group.
modelflags <NAME OR HEX> enables the specified bit in the iqm header. supported names include q1_rotate, q1_rocket, q1_grenade, q1_gib, q1_zomgib, q1_tracer1, q1_tracer2, q1_tracer3
<MESH PROPERTY> defined below and applied as the defaults to the following import lines as well as mesh lines.
mesh <NAME> [MESH PROPERTIES LIST] provides overrides for a single named mesh (properties used will be those as they're already defined, if not otherwise listed).
bone <SOURCENAME> [rename <NEWNAME>] [group <GROUPNUM>] provides bone renaming and grouping. try to avoid renaming two bones to the same resulting name... groups may have limitations if a parent/child relationship cannot be honoured. lowest group numbers come before higher groups. by default bones will inherit their group from their parent.
<IMPORT PROPERTY> defined below and applied as the defaults to the following import lines.
import <FILENAME> [IMPORT PROPERTIES] [MESH PROPERTIES] imports the meshes and animations from the specified file.