MREA (Metroid Prime 3): Difference between revisions

Jump to navigation Jump to search
>Aruki
>Aruki
Line 187: Line 187:


=== Mesh Headers ===
=== Mesh Headers ===
The WOBJ sections are unique: they don't have a valid section number, and are always set to 0, however they are always in the sections immediately following the Materials, simply iterate through the mesh count and read the following structs:
The WOBJ sections correspond to the header for a world mesh. Those sections are unique, in that they don't have a valid section number, which is always 0. However, they are always in the sections immediately following the materials. Each mesh header takes up 4 sections - the main header, the surface offsets, the mesh info table, and the unknown table.


==== Main Header ====
==== Main Header ====
{|class="wikitable"
 
!Type
{| class="wikitable"
!Description
! Type
!Notes
! Description
! Notes
|-
| long
| '''Unknown'''
| Most likely visor flags in MP3, unknown in DKCR
|-
| CTransform4f
| '''Transformation Matrix'''
| Meshes location in world space
|-
|-
|long
| CAABox
|'''Unknown'''
| '''Bounding Box'''
|Most likely visor flags in MP3, unknown use and DKCR
| Likely used for Depth sorting as in previous games.
|}
 
==== Surface Offsets ====
 
{| class="wikitable"
! Type
! Description
! Notes
|-
|-
|CTransform4f
| long
|'''Transformation Matrix'''
| '''Surface count''' (SC)
|Meshes location in world space
|  
|-
|-
|CAABox
| long
|'''Bounding Box'''
| '''Surface Offsets[SC]'''
|Likely used for Depth sorting as in previous games.
| Relative to the start first surface (i.e. the first offset points the the end of the first surface)
|}
|}


==== Submesh Offsets ====
==== Mesh Info ====
{|class="wikitable"
 
!Type
The next section contains a table of shorts that associates each surface in the mesh with a mesh ID. It starts with a 16-bit count (which always matches the mesh's surface count). The full extent of what exactly the data is and what it's used for is unknown, but it's accessed by various other components to identify world geometry.
!Description
 
!Notes
{| class="wikitable"
! Type
! Description
! Notes
|-
|-
|long (SC)
| long
|'''Submesh count'''
| {{unknown|Unknown}}
|
| Usually a very similar value to the mesh ID, sometimes the same number
|-
|-
|long
| long
|'''Submesh Offsets[SC]'''
| '''Mesh ID'''
|Relative to the start first submesh, (i.e, the first offset points the the end of the first submesh)
|  
|}
|}


Following the submesh data are two unknown sections, they both seem to be arrays of flags or indices but nothing is known about them.
There is one more section after this one before the next mesh header begins that contains unknown data.


=== AROT ===
=== AROT ===
Anonymous user

Navigation menu