WZM format
From WarzoneWiki
Description
WZM is a text based model format with multiple meshes, and supports both texture animation and "joint-less" bone animation ("bone heap" animation). All the following directives must be present in a WZM file.
WZM 1
The format version. Shall be 1.
TEXTURE nonexisting.png
Texture used for this model. Shall be png format and with only the characters [azAZ_-] allowed.
MESHES 1
The number of separate meshes contained within this model.
MESH 0
This begins the first mesh. All the data below belongs to this first mesh until another MESH directive following a CONNECTORS list.
TEAMCOLOURS 1
If this directive is followed by a one, instead of a zero, team colours are enabled for this mesh. It must then have exactly eight texture arrays, and the mesh will be rendered with the texture array given by the player id of the player controlling the model.
VERTICES 4
The number of unique vertices in the mesh. A vertex is unique if it shares position and texture coordinates with no other vertex.
FACES 2
The number of triangular faces in this mesh.
VERTEXARRAY
0 0 0
10 0 0
0 10 0
10 10 0
An array of floating point vertex positions. Each line has a tab then three space delimited numbers, which are X, Y, and Z positions, respectively. Y is "up". The number of lines following this directive shall be equal to the number of unique vertices in the model, as given above.
TEXTUREARRAYS 1
The number of texture arrays contained within this mesh. If TEAMCOLOURS is 1, then this number must be 8.
TEXTUREARRAY 0
0 0
50 0
100 0
150 0
An array of texture coordinates for each vertex position. Each line has a tab then two space delimited floating point numbers, which are U and V positions into the texture, respectively. The number of lines following this directive shall be equal to the number of unique vertices in the mesh, as given above. The number following the directive is the index number of this texture array, counting from zero.
INDEXARRAY
0 1 2
0 2 3
An array of triangle faces given by indexes into the current vertex array and the current texture coordinate array. Each line has a tab then three space delimited fixed point numbers, which are the vertices used in constructing a triangle. The number of lines is equal to the number of triangular faces in the mesh, as specified above.
FRAMES 1
0.0 0 0 0 0 0 0 0
Describes the animation frames for this mesh. Following the directive is the number of frames. Each following line begins with a tab, then the following numbers: Time spent transforming into the next frame in floating point seconds. An index into the texture array list for this frame. X, Y, and Z translation of the mesh in world space. X, Y, and Z rotation of the mesh. There must be a FRAMES directive, even if the mesh has no animation - just set the number of frames to zero. Translation and rotation may be in floating point.
CONNECTORS 1
0 0 0
Specifies connection points on the mesh in a list of world space X, Y, Z coordinates. The number following the directive specifies the number of connectors in the list. There must be CONNECTORS directive, even if the mesh has no connectors - just set the number following the directive to zero.
Example Model
WZM 1 TEXTURE nonexisting.png MESHES 3 MESH 0 TEAMCOLOURS 0 VERTICES 5 FACES 3 VERTEXARRAY -0.5 0.0 8.0 0.2 0.0 5.3 0.6 -1.5 0.0 0.2 5.2 1.0 5.0 1.2 0.3 TEXTUREARRAYS 4 TEXTUREARRAY 0 0 0 50 0 100 0 150 0 200 0 INDEXARRAY 0 1 2 0 2 3 1 0 4 FRAMES 3 0.0 3.2 0.0 6.1 0.0 0.0 0.0 3.6 0.0 0.0 0.0 60 -120 0 2.4 0.0 1.2 0.0 0 -15 12.6 CONNECTORS 0


