Tools/Iqmtool

From Unvanquished
Jump to: navigation, search

Iqmtool is a tool to convert models to IQM format and a fork of the iqm tool (see IQM Development Kit) by FTE QuakeWorld project.

It adds support for command files and complete translation, offset and scale operations when compiling .iqe files. It is required by Unvanquished data build system based on Urcheon as we translate, rotate and scale models from sources at build time and rely on command files.

Sources

The iqmtool source is tracked in the FTEQW repository: https://github.com/fte-team/fteqw

It is stored in the iqm subfolder: https://github.com/fte-team/fteqw/tree/master/iqm

It can optionally be built with other FTEQW libraries to enable support for other formats as input.

Features

Like the upstream iqm tool, iqmtool can compile .iqe, .md5mesh and .md5anim files to .iqm files and can embed model (multiple meshes) and animations in a single IQM file.

This tool also supports translation, rotation and scaling operations on models with operations applied on animations too.

Getting the tool

Initially named iqm, the latest versions of this tool are now named iqmtool to be able to have both original iqm and modified FTEQW iqmtool binaries in PATH.

Simple build

You don't have to build the iqmtool with the whole input format support, you can just build the iqm subdirectory and use the Makefile present there to build iqmtool. This is the lightest and fastest way to build code|iqmtool, and the tool will be featureful enough for building the UnvanquishedAssets repositories.

git clone https://github.com/fte-team/fteqw.git
cd fteqw/iqm
make

You'll find the iqmtool executable in the fteqw/iqm directory.

Complete build

It's also possible to build iqmtool with support from other formats, like converting from glTF, for that you need to build against the whole FTEQW repository instead:

git clone https://github.com/fte-team/fteqw.git
cd fteqw
mkdir build
cd build
cmake .. -DFTE_TOOL_IQM=ON \
  -DFTE_ENGINE=OFF -DFTE_ENGINE_CLIENT_ONLY=OFF -DFTE_ENGINE_SERVER_ONLY=OFF \
  -DFTE_CSADDON=OFF -DFTE_MENU_SYS=OFF \
  -DFTE_PLUG_BULLET=OFF -DFTE_PLUG_CEF=OFF -DFTE_PLUG_EZHUD=OFF -DFTE_PLUG_FFMPEG=OFF -DFTE_PLUG_HL2=OFF \
  -DFTE_PLUG_IRC=OFF -DFTE_PLUG_MPQ=OFF -DFTE_PLUG_NAMEMAKER=OFF -DFTE_PLUG_ODE=OFF -DFTE_PLUG_OPENSSL=OFF \
  -DFTE_PLUG_OPENXR=OFF -DFTE_PLUG_QI=OFF -DFTE_PLUG_QUAKE3=OFF -DFTE_PLUG_TERRAINGEN=OFF \
  -DFTE_PLUG_TIMIDITY=OFF -DFTE_PLUG_X11SV=OFF -DFTE_PLUG_XMPP=OFF -DFTE_PLUG_MODELS=OFF \
  -DFTE_TOOL_HTTPSV=OFF -DFTE_TOOL_IMAGE=OFF -DFTE_TOOL_MASTER=OFF -DFTE_TOOL_QCC=OFF \
  -DFTE_TOOL_QCCGUI=OFF -DFTE_TOOL_QTV=OFF
cmake --build .

You'll find the iqmtool executable in the fteqw/build directory.

Other tools

See also Tools/IQM.