History: Ogre meshxml DTD
Preview of version: 3
Ogre .mesh.xml Document Type Definition (DTD) as of 2009-12-29.
See also
- Current version in SVN (also for the skeleton)
- OgreXmlConverter
- -Mesh
The DTD
Copy to clipboard
<!ELEMENT mesh (sharedgeometry?, submeshes, skeletonlink?, boneassignments?, levelofdetail?, submeshnames?, poses?, animations?, extremes?)> <!ELEMENT sharedgeometry (vertexbuffer+)> <!ATTLIST sharedgeometry vertexcount CDATA #REQUIRED> <!ELEMENT submeshes (submesh+)> <!ELEMENT submesh (textures?,faces,geometry?,boneassignments?)> <!ATTLIST submesh material CDATA #REQUIRED usesharedvertices (true|false) "true" use32bitindexes (true|false) "false" operationtype (triangle_list|triangle_strip|triangle_fan) "triangle_list"> <!ELEMENT textures (texture+)> <!ELEMENT texture EMPTY> <!ATTLIST texture alias CDATA #REQUIRED name CDATA #REQUIRED> <!ELEMENT faces (face+)> <!ATTLIST faces count CDATA #IMPLIED> <!ELEMENT face EMPTY> <!-- Do not need all 3 vertex indexes if triangle_strip or triangle_fan since every face after the first one is defined by a single vertex --> <!ATTLIST face v1 CDATA #REQUIRED v2 CDATA #IMPLIED v3 CDATA #IMPLIED> <!ELEMENT geometry (vertexbuffer+)> <!ATTLIST geometry vertexcount CDATA #IMPLIED > <!ELEMENT skeletonlink EMPTY> <!ATTLIST skeletonlink name CDATA #REQUIRED> <!ELEMENT boneassignments (vertexboneassignment+)> <!ELEMENT vertexboneassignment EMPTY> <!ATTLIST vertexboneassignment vertexindex CDATA #REQUIRED boneindex CDATA #REQUIRED weight CDATA "1.0"> <!ELEMENT levelofdetail ( (lodmanual|lodgenerated)+ )> <!ATTLIST levelofdetail strategy CDATA "Distance" numlevels CDATA #REQUIRED manual (true|false) "false"> <!ELEMENT lodmanual EMPTY> <!-- 'value' in lodmanual and lodgenerated is a distance (unsquared) or other LOD metric depending on stragegy --> <!ATTLIST lodmanual value CDATA #REQUIRED meshname CDATA #REQUIRED> <!ELEMENT lodgenerated (lodfacelist)> <!ATTLIST lodgenerated value CDATA #REQUIRED meshname CDATA #REQUIRED> <!ELEMENT lodfacelist (face)+> <!ATTLIST lodfacelist submeshindex CDATA #REQUIRED numfaces CDATA #REQUIRED> <!ELEMENT vertexbuffer (vertex+)> <!ATTLIST vertexbuffer positions (true|false) "false" normals (true|false) "false" colours_diffuse (true|false) "false" colours_specular (true|false) "false" texture_coords (0|1|2|3|4|5|6|7|8) "0" texture_coord_dimensions_0 (0|1|2|3) "2" texture_coord_dimensions_1 (0|1|2|3) "2" texture_coord_dimensions_2 (0|1|2|3) "2" texture_coord_dimensions_3 (0|1|2|3) "2" texture_coord_dimensions_4 (0|1|2|3) "2" texture_coord_dimensions_5 (0|1|2|3) "2" texture_coord_dimensions_6 (0|1|2|3) "2" texture_coord_dimensions_7 (0|1|2|3) "2" tangents (true|false) "false" tangent_dimensions (3|4) "3" binormals (true|false) "false"> <!ELEMENT vertex (position, normal?, tangent?, binormal?, colour_diffuse?, colour_specular?, texcoord*)> <!ELEMENT position EMPTY> <!ATTLIST position x CDATA #REQUIRED y CDATA #REQUIRED z CDATA #REQUIRED > <!ELEMENT normal EMPTY> <!ATTLIST normal x CDATA #REQUIRED y CDATA #REQUIRED z CDATA #REQUIRED > <!ELEMENT tangent EMPTY> <!ATTLIST tangent x CDATA #REQUIRED y CDATA #REQUIRED z CDATA #REQUIRED w CDATA "1"> <!ELEMENT binormal EMPTY> <!ATTLIST binormal x CDATA #REQUIRED y CDATA #REQUIRED z CDATA #REQUIRED > <!ELEMENT colour_diffuse EMPTY> <!-- 'value' is a space-separated string containing r,g,b and optionally alpha for example value="1.0 0.0 0.0 0.5" or value="0.7 0.5 0.2" --> <!ATTLIST colour_diffuse value CDATA #REQUIRED> <!ELEMENT colour_specular EMPTY> <!-- 'value' is a space-separated string containing r,g,b and optionally alpha for example value="1.0 0.0 0.0 0.5" or value="0.7 0.5 0.2" --> <!ATTLIST colour_specular value CDATA #REQUIRED> <!ELEMENT texcoord EMPTY> <!ATTLIST texcoord u CDATA #REQUIRED v CDATA "0" w CDATA "0" x CDATA "0" > <!ELEMENT submeshnames (submeshname+)> <!ELEMENT submeshname EMPTY> <!ATTLIST submeshname name CDATA #REQUIRED index CDATA #REQUIRED > <!ELEMENT poses (pose+)> <!-- A single pose references a single set of geometry data with a set of offsets. If target is 'mesh', targets the shared geometry, if target is submesh, targets the submesh identified by 'index'. --> <!ELEMENT pose (poseoffset+) > <!ATTLIST pose target (mesh|submesh) #REQUIRED index CDATA "0" name CDATA ""> <!-- poseoffset lists the vertices that change position, and by how much --> <!ELEMENT poseoffset EMPTY> <!ATTLIST poseoffset index CDATA #REQUIRED x CDATA #REQUIRED y CDATA #REQUIRED z CDATA #REQUIRED > <!ELEMENT animations (animation+)> <!ELEMENT animation (tracks)> <!ATTLIST animation name CDATA #REQUIRED length CDATA #REQUIRED > <!ELEMENT tracks (track+)> <!ELEMENT track (keyframes)> <!-- Morph animation is a keyframed set of absolute vertex positions. Cannot be blended with other morph animations or pose animation. Pose animation is a set of keyframes referencing poses and a weight, with one track per set of vertex data. Can be blended with other poses but not with morph animation. If target is 'mesh', targets the shared geometry, if target is submesh, targets the submesh identified by 'index'. --> <!ATTLIST track target (mesh|submesh) #REQUIRED index CDATA "0" type (morph|pose) #REQUIRED> <!-- keyframes are applicable for all tracks, but for morph tracks they contain positions, and for pose tracks they contain pose references --> <!ELEMENT keyframes (keyframe*)> <!ELEMENT keyframe (position*, poseref*)> <!ATTLIST keyframe time CDATA #REQUIRED > <!-- Pose reference, links to pose via numeric index. target of parent track must agree with target of referenced pose. For a single track, each keyframe can reference multiple poses at different weights. --> <!ELEMENT poseref EMPTY> <!ATTLIST poseref poseindex CDATA #REQUIRED influence CDATA "1.0"> <!-- Optional extremity points on submeshes for sub-object transparency sorting --> <!ELEMENT extremes (submesh+)> <!ELEMENT submesh_extremes (position+)> <!ATTLIST submesh_extremes index CDATA #REQUIRED>