Jump to content

OBD:M3GM: Difference between revisions

230 bytes added ,  15 August 2007
m
no edit summary
No edit summary
mNo edit summary
Line 1: Line 1:
[[Main Page]] >> [[OBD:Oni Binary Data|Oni Binary Data]] >> [[OBD:File types|File Types]] >> M3GM File
{{OBD_File_Header | type=M3GM | prev=M3GA | next=Mtrl | name=Geometry | family=Generic | align=center}}
 
 
<CENTER>[[OBD:M3GA|<==]] <FONT SIZE=5>M3GM File</FONT> [[OBD:Mtrl|==>]]<BR>
<FONT SIZE=2>Geometry Array - Level and Character File</FONT></CENTER>




----
http://www6.fh-eberswalde.de/user/dkriesch/onistuff/images/m3gm_all.gif
http://www6.fh-eberswalde.de/user/dkriesch/onistuff/images/m3gm_all.gif




{| BORDER=1 WIDTH=100% CELLPADDING=2 CELLSPACING=0
{{Table}}
|- ALIGN=CENTER BGCOLOR="#FFDDBB"
{{OBDth}}
| WIDTH=15% | <B>Hex</B>
{{OBDtr|0x00|res_id|FF0000|01 '''D7 00 00|215| 00215-door_1_0.M3GM}}
| WIDTH=15% | <B>Translation</B>
{{OBDtr|0x04|lev_id|FFFF00|01 00 00 '''00|3 | level 3}}
| WIDTH=70% | <B>Meaning</B>
{{OBDtr|0x08|int32 |FFC8C8|00 00 00 00   |0 | runtime pointer?}}
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
{{OBDtr|0x0C|PNTA|FFFFC8|01 '''DA 00 00|218| link to vertex XYZs: 00218-.[[PNTA]]}}
| BGCOLOR="#FF0000" | 01 D7 00 00
{{OBDtr|0x10|VCRA|FFFFC8|01 '''F7 00 00|247| link to vertex normals: 00247-.[[VCRA]]}}
| 215
{{OBDtr|0x14|VCRA|FFFFC8|01 '''F0 00 00|240| link to face normals: 00240-.[[VCRA]]}}
| ALIGN=LEFT | 00215-door_1_0.M3GM
{{OBDtr|0x18|TXCA|FFFFC8|01 '''ED 00 00|237| link to vertex UVs: 00237-.[[TXCA]]}}
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
{{OBDtr|0x1C|IDXA|FFFFC8|01 '''0C 01 00|268| link to triangle strips: 00268-.[[IDXA]]}}
| BGCOLOR="#FFFF00" | 01 00 00 06
{{OBDtr|0x20|IDXA|FFFFC8|01 '''11 01 00|273| link to face groupings: 00273-.[[IDXA]]}}
| 3
{{OBDtr|0x24|TXMP|FFFFC8|01 '''D8 00 00|216| link to texture: 00216-.[[TXMP]]}}
| ALIGN=LEFT | level 3
{{OBDtr|0x28|res_id|C8FFC8|00 '''00 00 00|unused| never used in Oni}}
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
{{OBDtr|0x2C|unused[20]|C8FFFF|AD DE|dead| blank filler}}
| BGCOLOR="#FFC8C8" | 00 00 00 00
| 0
| ALIGN=LEFT | not used
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFFFC8" | 01 DA 00 00
| 218
| ALIGN=LEFT | link to 00218-.[[OBD:PNTA|PNTA]]
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFFFC8" | 01 F7 00 00
| 247
| ALIGN=LEFT | link to 00247-.[[OBD:VCRA|VCRA]]
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFFFC8" | 01 F0 00 00
| 240
| ALIGN=LEFT | link to 00240-.[[OBD:VCRA|VCRA]]
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFFFC8" | 01 ED 00 00
| 237
| ALIGN=LEFT | link to 00237-.[[OBD:TXCA|TXCA]]
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFFFC8" | 01 0C 01 00
| 268
| ALIGN=LEFT | link to 00268-.[[OBD:IDXA|IDXA]]
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFFFC8" | 01 11 01 00
| 273
| ALIGN=LEFT | link to 00273-.[[OBD:IDXA|IDXA]]
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#FFFFC8" | 01 D8 00 00
| 216
| ALIGN=LEFT | link to 00216-_DOOR_RL_FLOOR3.[[OBD:TXMP|TXMP]]
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#C8FFC8" | 00 00 00 00
| 0
| ALIGN=LEFT | not used
|- ALIGN=CENTER VALIGN=TOP BGCOLOR="#FFEEDD"
| BGCOLOR="#C8FFFF" | AD DE
| dead
| ALIGN=LEFT | not used
|}
|}
;Vertices
:XYZ and UV coordinates are stored in parallel (same number of entries in PNTA and TXCA).
;Vertex normals
:The first VCRA stores the normals for every vertex (same entries as in PNTA and TXCA).
:Vertex normals are supposed to be used by Gouraud shading (directional lighting).
:The precomputed normals are apparently ignored by Oni, which generates its own...
;Face normals
:The second VCRA stores the normals for every face (groups defined by the second IDXA).
:Face normals may be used for env-mapping (but vertex normals could also work there).
:The precomputed face normals are apparently ignored by Oni too... didn't check much.
;Triangle strips
: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.
;Face groupings
:The second IDXA groups the triangles into faces (oriented by the second VCRA).
:Even if the normals are computed at runtime, the group assignment might be used.
:(e.g., if a face normal is defined as the average of the normals of the triangles)




<HR>
----
<CENTER>[[OBD:M3GA|<==]] <B>M3GM File</B> [[OBD:Mtrl|==>]]</CENTER>
{{OBD_File_Footer | type=M3GM | prev=M3GA | next=Mtrl | name=Geometry | family=Generic | align=center}}
<HR>
 
 
[[Main Page]] >> [[OBD:Oni Binary Data|Oni Binary Data]] >> [[OBD:File types|File Types]] >> M3GM File