OBD:M3GM: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{OBD_File_Header | type=M3GM | prev=M3GA | next=Mtrl | name=Geometry | family=Generic | align=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 | ||
{ | {{Table}} | ||
{{OBDth}} | |||
{{OBDtr|0x00|res_id|FF0000|01 '''D7 00 00|215| 00215-door_1_0.M3GM}} | |||
{{OBDtr|0x04|lev_id|FFFF00|01 00 00 '''00|3 | level 3}} | |||
| | {{OBDtr|0x08|int32 |FFC8C8|00 00 00 00 |0 | runtime pointer?}} | ||
| | {{OBDtr|0x0C|PNTA|FFFFC8|01 '''DA 00 00|218| link to vertex XYZs: 00218-.[[PNTA]]}} | ||
| | {{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]]}} | ||
{{OBDtr|0x18|TXCA|FFFFC8|01 '''ED 00 00|237| link to vertex UVs: 00237-.[[TXCA]]}} | |||
| | {{OBDtr|0x1C|IDXA|FFFFC8|01 '''0C 01 00|268| link to triangle strips: 00268-.[[IDXA]]}} | ||
| | {{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]]}} | ||
{{OBDtr|0x28|res_id|C8FFC8|00 '''00 00 00|unused| never used in Oni}} | |||
| | {{OBDtr|0x2C|unused[20]|C8FFFF|AD DE|dead| blank filler}} | ||
| | |||
| 0 | |||
| | |||
| | |||
| 218 | |||
| | |||
| | |||
| 247 | |||
| | |||
| | |||
| 240 | |||
| | |||
| | |||
| 237 | |||
| | |||
| | |||
| 268 | |||
| | |||
| | |||
| 273 | |||
| | |||
| | |||
| 216 | |||
| | |||
| | |||
| | |||
| | |||
| | |||
| dead | |||
| | |||
|} | |} | ||
;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) | |||
---- | |||
{{OBD_File_Footer | type=M3GM | prev=M3GA | next=Mtrl | name=Geometry | family=Generic | align=center}} | |||
Revision as of 16:10, 15 August 2007
|
Offset | Type | Raw Hex | Value | Description |
---|---|---|---|---|
0x00 | res_id | 01 D7 00 00 | 215 | 00215-door_1_0.M3GM |
0x04 | lev_id | 01 00 00 00 | 3 | level 3 |
0x08 | int32 | 00 00 00 00 | 0 | runtime pointer? |
0x0C | PNTA | 01 DA 00 00 | 218 | link to vertex XYZs: 00218-.PNTA |
0x10 | VCRA | 01 F7 00 00 | 247 | link to vertex normals: 00247-.VCRA |
0x14 | VCRA | 01 F0 00 00 | 240 | link to face normals: 00240-.VCRA |
0x18 | TXCA | 01 ED 00 00 | 237 | link to vertex UVs: 00237-.TXCA |
0x1C | IDXA | 01 0C 01 00 | 268 | link to triangle strips: 00268-.IDXA |
0x20 | IDXA | 01 11 01 00 | 273 | link to face groupings: 00273-.IDXA |
0x24 | TXMP | 01 D8 00 00 | 216 | link to texture: 00216-.TXMP |
0x28 | res_id | 00 00 00 00 | unused | never used in Oni |
0x2C | unused[20] | AD DE | dead | blank filler |
- 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)
ONI BINARY DATA |
---|
M3GA << Other file types >> Mtrl |
M3GM : Geometry |
Generic file |