Please Note: For MD3 script technical support, i.e. help with errors and problems relating to the export script when exporting MD3 files, please refer to the MD3 Export support topic.
Basic prep for MD3 export using BlenderDownloadInformationThis is
NOT yet a definitive guide to exporting valid MD3 files from Blender but it's a starting point. The process is 'agnostic' in that it should be the same to prep a mesh in Blender 2.42 as it would be in 2.60.
Preparing the meshThe mesh needs to be composed of three sections each of which needs to be a 'closed' mesh (open surfaces should be 'sealed'?) - an often cited way to physically 'treat' the mesh is to duplicate the model for each section, typically one for each 'head', 'torso' and 'legs' section. In Edit mode unwanted vertices are collapsed to a common point and 'merged' (
Alt+M). Be mindful of
vertex_group relationships when doing this - as all the vertices are merged together doing so also merges vertex_groups which can cause the resulting mesh to deform unexpectedly. To fix, the subsequent vertex may need to be re-parented to a common 'static' point (a bone that doesn't move or moves unobtrusively).
Once the sections have been created name each in Object Mode as follows (note that the prefix, "
h_", is a subsection reference so anything that should be associated with the "
head" section of the mesh should be prefixed with "
h_", the torso, "
u_" etc..);
- head - named "h_head" (upper_head)?
- torso - named "u_torso" (upper_torso)?
- legs - named "l_legs" (lower_legs)
The "
Point of Origin" (the pink dot) for each section needs to be on Blenders "0,0,0" grid so position the cursor there, then re-position the origin to the cursor (make sure to do this before doing ANY animations if the model is rigged).
Design note: it's important to note that whilst working in Blender ideally the mesh should be made 'at size', i.e. the size it will be when used. This ensures that should there be any export scaling issues, they can be fixed relatively easily as fractions of "1" (actual size") rather than fraction of a scaled size - e.g. using MD3 export for 2.63a, "Manual Scale:" should be set to "0.99995" instead of "1.00000" for proper Radiant compatible 1:1 sizing - that is .999995 of actual size instead of a pre-scaled size (which would make output larger than actual).
Preparing ArmaturesWhen rigging a character, in order for the legs to "run" at the same time as "firing" a weapon, the
rig is split into two separate armature objects, and "
upper" and "
lower" sections. This enables the characters lower half to do something different to the upper half. These are not exported (the rigs that is, as animation is vertex baked). However it does mean that any animation also needs to be 'split' in similar fashion, so a "run" cycle may only have a 'legs' animation, whereas a "death" animation would have both an 'legs' and 'torso' animation sequence. (Note: the origin point of the armature/s will need to be the same "0,0,0" axis centre otherwise you'll get problems - although you can do the above to a rig it's best to centre the cursor beforehand and then build the rig around that anchor point).
Prepping Materials for MD3Materials will need to be duplicated depending on their assignment - if a character model uses the same texture applied to the entire model, when the mesh is broken into sub-sections, there should be three (or more) separate materials named as follows (this will likely need to be the texture name ID rather than the bitmap image "Source:" or filename);
- "l_legs" (material for 'lower' mesh section)
- "u_torso" (material for upper torso section)
- "h_head" (material for head section)
Materials need to be referenced from the 'root', i.e. "models/players/character" so it's best to work from within that directory (where "models/" would be a root folder on a hard-drive "D:\models\")
MD3 models use "
skin" files (*.skn?) which are simple *.txt docs renamed *.skn. They contain text references to textures (are these actually "shader" references?) similar to;
- "h_head,models/players/character/head.tga"
Design note: in Blender, MD3 texture paths can be set as Material and/or Texture "ID" name properties, for example "models/mapsobjects/folder/model/shader" (where 'shader' can be an actual image or shader reference without a file extension) as the Materials or Textures datablock ID name (input field directly under the list preview). This may vary depending on the MD3 script being used.
Assigning 'Tags' to a mesh"Tags" are Blender "
Empty" objects and positioned at centre-points where other objects are to be connected to a mesh - they are position markers in other words; "
tag_weapon" for instance is where weapon models 'connect' to the mesh when held by the player. Name the Empty in Object Mode, position and parent to an appropriate bone (depending on what's being 'tagged' you want the object to move with an animation);
- "tag_weapon" would be parented to a bone called 'hand' - weapons models attach to this
- "tag_torso" would be parented (and positioned) relative to the 'hip' - allows different 'top' sections to be attached to the 'lower' section of the model
- "tag_head" would be parented and positioned relative to the neck - allows different heads to connect the mesh
- (note: doesn't appear to be a need for "tag_legs")
Additional Resources-
Putting New Models in Quake III Arena (original idSoftware documentation).