8,018
edits
Paradox-01 (talk | contribs) m (oops, wrong header info) |
Paradox-01 (talk | contribs) No edit summary |
||
Line 10: | Line 10: | ||
==M3GM== | ==M3GM== | ||
{| class="wikitable" width="100%" | |||
!width=200px| XML tag | |||
!width=100px| content type | |||
! description | |||
|- | |||
| <M3GM id="..."> | |||
| integer | |||
| | |||
|- | |||
|valign=top| <Points> | |||
|valign=top| link | |||
| "#" + instance Id of [[#PNTA|PNTA]]. | |||
: XYZ and UV coordinates are stored in parallel (same number of entries in PNTA and TXCA). | |||
|- | |||
|valign=top| <VertexNormals> | |||
|valign=top| link | |||
| "#" + instance Id of [[#VCRA|VCRA]]. | |||
: The first VCRA stores the normals for every vertex (same entries as in PNTA and TXCA). | |||
: Vertex normals are used by Gouraud shading (directional lighting). | |||
|- | |||
|valign=top| <FaceNormals> | |||
|valign=top| link | |||
| "#" + instance Id of [[#VCRA|VCRA]]. | |||
: The second VCRA stores the normals for every face (groups defined by the second IDXA). | |||
: Face normals are used for backface culling. | |||
|- | |||
|valign=top| <TextureCoordinates> | |||
|valign=top| link | |||
| "#" + instance Id of [[#TXCA|TXCA]]. | |||
: Vertex UVs. | |||
|- | |||
|valign=top| <TriangleStrips> | |||
|valign=top| link | |||
| "#" + instance Id of [[#IDXA|IDXA]]. | |||
: The first IDXA lists the triangles as strips. The IDs are the ones in PNTA and IDXA. | |||
: The start of a new strip is signaled by a high bit in the ID of its first vertex. | |||
: Strips are more optimal for rendering, they are generated when authoring an M3GM. | |||
|- | |||
|valign=top| <FaceNormalIndices> | |||
|valign=top| link | |||
| "#" + instance Id of [[#IDXA|IDXA]]. | |||
: The second IDXA groups the triangles into faces (oriented by the second VCRA). | |||
|- | |||
| <Texture> | |||
| link | |||
| TXMP''name'' | |||
|} | |||
===PNTA=== | ===PNTA=== | ||
{| class="wikitable" width="100%" | |||
!width=200px| XML tag | |||
!width=100px| content type | |||
! description | |||
|- | |||
| <PNTA id="..."> | |||
| integer | |||
| Instance Id. | |||
|- | |||
| <BoundingBox> | |||
| - | |||
| | |||
|- | |||
| <Min> | |||
| float x3 | |||
| | |||
|- | |||
| <Max> | |||
| float x3 | |||
| | |||
|- | |||
| <BoundingSphere> | |||
| - | |||
| | |||
|- | |||
| <nowiki><Center></nowiki> | |||
| float x3 | |||
| | |||
|- | |||
| <Radius> | |||
| float | |||
| | |||
|- | |||
| <Positions> | |||
| - | |||
| This is an int32 array for the <Vector3> tags. | |||
|- | |||
| <Vector3> | |||
| float x3 | |||
| X Y Z coordinate of the point. | |||
|} | |||
===VCRA=== | ===VCRA=== | ||
{| class="wikitable" width="100%" | |||
!width=200px| XML tag | |||
!width=100px| content type | |||
! description | |||
|- | |||
| <VCRA id="..."> | |||
| integer | |||
| Instance Id. | |||
|- | |||
| <Normals> | |||
| - | |||
| This is an int32 array for the <Vector3> tags. | |||
|- | |||
| <Vector3> | |||
| float x3 | |||
| X Y Z coordinate of the normal vector. | |||
|} | |||
===TXCA=== | ===TXCA=== | ||
{| class="wikitable" width="100%" | |||
!width=200px| XML tag | |||
!width=100px| content type | |||
! description | |||
|- | |||
| <TXCA id="..."> | |||
| integer | |||
| Instance Id. | |||
|- | |||
| <TexCoords> | |||
| - | |||
| This is an int32 array for the <Vector2> tags. | |||
|- | |||
| <Vector2> | |||
| float x2 | |||
| X Y coordinates. | |||
|} | |||
===IDXA=== | ===IDXA=== | ||
{| class="wikitable" width="100%" | |||
!width=200px| XML tag | |||
!width=100px| content type | |||
! description | |||
|- | |||
| <IDXA id="..."> | |||
| integer | |||
| Instance Id. | |||
|- | |||
| <Indices> | |||
| - | |||
| This is an int32 array for the <Int32> tags. | |||
|- | |||
|valign=top| <Int32> | |||
|valign=top| int32 | |||
| | |||
; [[OBD:IDXA_M3GM_1|First IDXA]] | |||
: PNTA element ID (used to build triangles with the points of the PNTA instance) | |||
; [[OBD:IDXA_M3GM_2|Second IDXA]] | |||
: VCRA element ID (used to assign the normals to every triangle) | |||
|} | |||
==Export== | ==Export== | ||
onisplit -extract:obj ''output_folder input_folder''/M3GM''file_name''.oni | |||
Or use [[Vago_(tool)|Vago]]. | |||
==Import== | ==Import== | ||
onisplit -create:m3gm ''output_folder'' -tex:''input_folder''/TXMP''file_name''.oni ''input_folder''/''file_name''.obj | |||
Or use [[Vago_(tool)|Vago]]. | |||
{{XML}} | {{XML}} |
edits