Skip to content

IQM Support

Zack Middleton edited this page Aug 2, 2014 · 10 revisions

How to export IQM models and Spearmint-specific info about rendering.

Blender

Blender IQM export notes based on an email from exidl;

  • Select object/mesh in outliner. (If your using a version from before July 28 2013, you'll need to select the object/mesh and armature in outliner.)
  • Then export it under the IQM format, don't forget to check "Meshes" "Skeleton" and "Bounding boxes".
  • Add animations to textbox in export window in the order you want them separated by commas: "IdleBase,IdleTop,RunBase,RunTop" (these are just whatever names you used for animations in Blender, nothing special.)

If you want an unanimated model, leave the animations box blank. Skeleton is optional for unanimated models, though if you want to get joints (aka tags) like "tag_head", "tag_weapon", "tag_torso", etc you need to export a skeleton.

Noesis

It's been reported that Noesis exported IQMs work too. I think the main page for Noesis is http://www.richwhitehouse.com/index.php?content=inc_projects.php .

Separate Model and Animation files

In additional to supporting IQMs with meshes and skeleton in the same file, Spearmint supports using animations from a separate IQM file. It requires changes in the game code to load and use separate files.

Load IQM model/animation files using trap_R_RegisterModel(...). It doesn't matter if "animation files" contain meshes.

In refEntity_t set frameModel and oldframeModel (for frame and oldframe respectfully) to model handles to get skeleton frame from. Model handle 0 for frameModel or oldframeModel uses skeleton model specified by hModel.

Make sure to use trap_R_LerpTagFrameModel(...) if using separate animation files for rendering, otherwise an incorrect orientation will be returned. trap_R_LerpTagFrameModel(...) is fine to use in any case, it just takes extra parameters for start frame model and end frame model.

Clone this wiki locally