Call of Duty: XMODEL formats
Intermediate (*.XMODEL_EXPORT)
Version 5 (vCoD)
Header
// Source filename: 'C:\trees\model_source\character_models\character_lod\airborne_Low.max' // Export time: Fri Aug 01 15:44:31 2003 MODEL VERSION 5
- // Comments (optional)
- MODEL data type definition (magic word)
- VERSION number
Bone hierarchy table
NUMBONES 73 BONE 0 -1 "TAG_ORIGIN" BONE 1 0 "Bip01 Pelvis" BONE 2 1 "Bip01 L Thigh" BONE 3 1 "Bip01 R Thigh" ...
- NUMBONES number of bones (note: bone numeration starts with zero, BONE 0 + BONE 1 + BONE 2 = NUMBONES 3)
- BONE description:
- Bone number
- Bone parent number (-1 = root origin, a model can only have one!)
- Bone "name string" (has to be unique per model)
Bone orientations
BONE 0 OFFSET 0.000002 -2.222280 0.000042 SCALE 1.000000 1.000000 1.000000 X 0.000000 -1.000000 -0.000001 Y 1.000000 0.000000 0.000000 Z -0.000000 -0.000001 1.000000 BONE 1 OFFSET 4.866636 1.218493 37.227966 SCALE 1.000000 1.000000 1.000000 X -0.008941 0.033732 -0.999391 Y -0.004868 -0.999420 -0.033689 Z -0.999948 0.004564 0.009100 ...
- BONE number (as declared in the hierarchy table)
- OFFSET translations / position in the 3d space, like a coordinate (3x float)
- SCALE bone scale, appears to be always 1.000000 (3x float)
- X part of rotation matrix, basically the local x-axis of the bone (3x float)
- Y part of rotation matrix, basically the local y-axis of the bone = bone direction (3x float)
- Z part of rotation matrix, basically the local z-axis of the bone (3x float)
Vertices
NUMVERTS 93 VERT 0 OFFSET 0.091243 -5.213182 29.123474 BONES 3 BONE 3 0.333333 BONE 4 0.333333 BONE 2 0.333333 VERT 1 OFFSET 7.581652 -4.076623 29.466268 BONES 2 BONE 2 0.500000 BONE 4 0.500000
- NUMVERTS number of vertices in model
- Vertex description:
- VERT number
- OFFSET coordinate (3x float)
- BONES number of bones influencing this vertex
- BONE bone number as declared in the hierarchy table, normalized influence (float, between 0.000001 and 1.000000, all listed influences sum up to ~1.0)
The influences are controlled via weight painting in the 3d modelling application.
Faces
NUMFACES 172 TRI 0 0 0 1 VERT 10 0.873177 0.502103 0.514332 0.849479 0.117676 VERT 3 0.875169 0.254302 0.964290 0.262399 -0.035947 VERT 65 0.910332 0.493356 0.583699 0.238673 -0.776100 TRI 0 0 0 1 VERT 6 0.399969 0.721943 0.699542 -0.713791 -0.033821 VERT 3 0.470804 0.723883 0.964290 0.262399 -0.035947 VERT 2 0.503285 0.902194 0.830325 0.552277 0.074499 TRI 0 0 0 1 VERT 2 0.503285 0.902194 0.830325 0.552277 0.074499 VERT 1 0.435323 0.925295 0.690132 -0.722368 -0.043609 VERT 6 0.399969 0.721943 0.699542 -0.713791 -0.033821
- NUMFACES number of faces in model (face = triangle, quads are not supported!)
- Face description:
- TRI triangle belonging to object n, unknown number, material number, 1
- VERT vertex number, UV texture coords (2x float), face normal (3x float)
Objects
This data block seems to have no effect on an xmodel file.
NUMOBJECTS 3 OBJECT 0 "LowModel" OBJECT 1 "lowhand" OBJECT 2 "lowhand01"
- NUMOBJECTS number of objects in xmodel_export file
- Object description:
- OBJECT number, "name string"
Materials
NUMMATERIALS 7 MATERIAL 0 "body@air_chest.tga" MATERIAL 1 "body@air_upperarm.tga" MATERIAL 2 "body@air_forearm.tga" MATERIAL 3 "body@air_upperleg.tga" MATERIAL 4 "body@air_lowerleg.tga" MATERIAL 5 "[email protected]" MATERIAL 6 "body@air_boots.tga"
- NUMMATERIALS number of materials
- Material description:
- MATERIAL number, "texture file name"
Version 6 (CoD2+)
Header
Bone hierarchy table
Bone orientations
Vertices
Faces
Objects
Materials
Converted
Version ?
...