skl2md4.exe -- Quake III MD4 export tool v.1.1 by Gongo usage: skl2md4 [args] /dpath - destination path /d - destination filename /f - force file refresh /s - set scale factor /org - set origin to orgname /base - base frame for lod creation /ofs - origin offset /iflags - ignore flags on bone removal /fps - set animation speed /q - quiet mode /? - this help message a .skl file exported via the skelout plugin for 3dsmax. /dpath /d specify the output path and filename. if not specified, the default is to output .md4 to the same directory skl2md4 resides in. note: skl2md4 looks for the bone flag config file \.cfg to build the md4. /f will force overwrite if a file with the same name as the output file is found. /s sets the scale factor for the output file. default is 1 if not specified. /org specify the origin bone for the model. default is "Bip01" (biped root) if not specified. /base sets the frame to be used for collapse map generation. default is 0 (first frame) if not specified. "/base -1" will set to last frame. note: choose a frame where all the model's critical joints are bent (ie, the fetal position) so that these are collapsed last. this helps maintain the integrity of the animations even at lower levels of detail. /ofs offset the origin bone by . default is 0 0 0 (no offset) if not specified. /iflags removes unused bones, regardless of any bone flags that may be set. setting this switch will also bypass loading the bone flags file (.cfg). /fps adjusts the animation to the specified framerate. default is the framerate specified in the .skl file. /q quiets build tool messages. /? the help message, as shown above. ---------- the bone flag config file when skl2md4 compiles the skl into md4, it looks for .cfg, the bone flag config file. it has the following format: BONECONFIG // identifies this file as bone flags cfg VERSION 1 // boneconfig file version TAGS // the following x bones to be flagged with MD4_BONE_FLAG_T HEAD // the following x bones to be flagged with MD4_BONE_FLAG_H TORSO // the following x bones to be flagged with MD4_BONE_FLAG_U LEGS // the following x bones to be flagged with MD4_BONE_FLAG_L END // EOF so a sample bone flag config file might look like this: BONECONFIG VERSION 1 TAGS 1 tag_flag HEAD 1 Bip01 Neck TORSO 3 Bip01 Spine Bip01 R Clavicle Bip01 L Clavicle LEGS 1 Bip01 END at build time, all children of the specified bones will inherit the flags. the flags don't *have* to be used at all, they're just a nice tool for breaking up the skeletal hierarchy into 4 discreet animation groups. ---------- notes: the md4 v4 20060117 format specifies a max of 8 influences per vertex with a minimum bone weight of 0.01. this is a limitation inherited from the skelout plugin and i feel it is reasonable and therefore will leave it unchanged. unlike other model formats, md4 doesn't specify frame names. i think they're pointless. known bugs: i haven't noticed any yet, but i'm sure they're there! feel free to post on the forums if you find any. acknowledgements: id software - for making awesome games time and time again, and for releasing the source code to their games ritual entertainment - for releasing the source code to their tools, without them there would be no skl2md4 tool the great community at quakedev and quakesrc - for inspiring me with their ideas and creativity, and helping me to learn to code. 27 Jan 2006 ---Gongo