Game Development Reference
In-Depth Information
*MESH_TVERTLIST {. . .
}
*MESH_NUMCVERTEX 0
*MESH_NORMALS {. . .
}
Reading the vertex list
There will be MESH_NUMVERTEX lines in a MESH_VERTEX_LIST
subsection. Each line contains a MESH_VERTEX tag, followed by an
index for the current vertex and then three values defining the ( x , y , z )
value of the vertex.
*MESH_VERTEX_LIST {
*MESH_VERTEX 0 -48.7847 -51.1912 -47.5600
*MESH_VERTEX 1 -48.7847 48.8088 -47.5600
*MESH_VERTEX 2 -48.7847 -51.1912 52.4400
*MESH_VERTEX 3 -48.7847 48.8088 52.4400
*MESH_VERTEX 4 51.2153 -51.1912 -47.5601
*MESH_VERTEX 5 51.2153 48.8088 -47.5601
*MESH_VERTEX 6 51.2153 -51.1912 52.4399
*MESH_VERTEX 7 51.2153 48.8088 52.4399
}
Reading the face list
The MESH_FACE_LIST subsection contains MESH_NUMFACES lines.
Each line starts with a MESH_FACE tag followed by an index value for the
current face. The remainder of a line contains values for A, B, C, AB, BC,
CA, MESH_SMOOTHING, MESH_MTLID. A, B and C give indices into
the vertex list for this triangle. All polygons in 3DS are triangles. MESH_
SMOOTHING defines which sets of polygons are to be smoothed
together. MESH_MTLID defines an integer value. The full GEOMOBJECT
of which MESH_FACE_LIST is a subsection contains a MATERIAL_REF
tag. This is an index into the global level material list. If the material
referred to is of class 'Multi/Sub Object' then the value of MESH_MTLID
refers to the sub-material index. If the material is of class 'Standard' then
the index refers to the root of the material.
Search Nedrilad ::




Custom Search