MREA (Metroid Prime 3): Difference between revisions

>Aruki
>Aruki
 
(6 intermediate revisions by the same user not shown)
Line 3: Line 3:
The '''MREA format''', which defines areas/levels, received another large layout overhaul in Metroid Prime 3. The level geometry data received the biggest update, with a new material format, lot of things being moved around, and a few entirely new sections being introduced. This article covers Metroid Prime 3, the MP3 E3 prototype, and Donkey Kong Country Returns.
The '''MREA format''', which defines areas/levels, received another large layout overhaul in Metroid Prime 3. The level geometry data received the biggest update, with a new material format, lot of things being moved around, and a few entirely new sections being introduced. This article covers Metroid Prime 3, the MP3 E3 prototype, and Donkey Kong Country Returns.


{{research|moderate|There are a few sections we know nothing about.}}
{{research|moderate|Research needed on the area octree and visibility tree sections to verify structure and check for version differences. Also the purpose of the LLTE section is unknown.}}


__TOC__
__TOC__
Line 147: Line 147:
|}
|}


<code>WOBJ</code> can be listed multiple times, but its section index is always 0 (pointing to the materials section). Every other section number always appears in every MREA file once (none are optional). Here are all possible section numbers and what they are, in the order that they appear in the file:
<code>WOBJ</code> can be listed multiple times, but its section index is always 0 (pointing to the materials section). Every other section number always appears in every MREA file once (none are optional). Here are all possible section numbers and what they are, in the order that they appear in the file: (note this is both the order the section numbers are listed in as well as the order that the sections themselves appear in the file)


{| class="wikitable"
{| class="wikitable"
Line 181: Line 181:
|-
|-
| <code>SOBJ</code>
| <code>SOBJ</code>
| Script Layers
| [[#Script Layers|Script Layers]]
| {{check}}
| {{check}}
| {{check}}
| {{check}}
|-
|-
| <code>SGEN</code>
| <code>SGEN</code>
| Generated Script Objects
| [[#Generated Script Objects|Generated Script Objects]]
| {{check}}
| {{check}}
| {{check}}
| {{check}}
|-
|-
| <code>COLI</code>
| <code>COLI</code>
| Collision
| [[#Collision|Collision]]
| {{check}}
| {{check}}
| {{check}}
| {{check}}
|-
|-
| <code>LITE</code>
| <code>LITE</code>
| Lights
| [[#Lights|Lights]]
| {{check}}
| {{check}}
| {{check}}
| {{check}}
|-
|-
| <code>LLTE</code>
| <code>LLTE</code>
| {{unknown|Unknown}}
| {{unknown|[[#Unknown Section (LLTE)|Unknown]]}}
| {{check}}
| {{check}}
| {{check}}
| {{check}}
|-
|-
| <code>PVS!</code>
| <code>PVS!</code>
| Visibility Tree
| [[#Visibility Tree|Visibility Tree]]
| {{check}}
| {{check}}
| {{check}}
| {{check}}
Line 252: Line 252:


=== GPU Data ===
=== GPU Data ===
''See [[Geometry (Metroid Prime)]] or [[Geometry (Donkey Kong Country Returns)]]''
This section contains the GPU buffer data used to render world geometry. This is generally the same as in previous games, with the following sequence of sections repeated once per world model:
This section contains the GPU buffer data used to render world geometry. This is generally the same as in previous games, with the following sequence of sections repeated once per world model:


Line 257: Line 259:
* '''Normals''': Always floats; world geometry normals are never packed into shorts.
* '''Normals''': Always floats; world geometry normals are never packed into shorts.
* '''Colors''': Contains 32-bit RGBA8 colors. This section is not used in any official assets and is always zeroed out.
* '''Colors''': Contains 32-bit RGBA8 colors. This section is not used in any official assets and is always zeroed out.
* '''Float UV Coordinates''': In Metroid Prime 3, these are used exclusively, even for lightmaps.
* '''Float UV Coordinates''': In Metroid Prime 3, this is the only UV coordinates section, so it's used for everything.
* '''Short UV Coordinates''': Only appears in Donkey Kong Country Returns; can be used for anything, not only lightmaps as in previous games.
* '''Short UV Coordinates''': Only appears in Donkey Kong Country Returns; can be used for anything, not only lightmaps as in previous games.
* '''Surfaces''': One section per surface.
* '''Surfaces''': One section per surface. For details on the structure of these sections check [[Geometry (Metroid Prime)#Surface|Geometry (Metroid Prime)]] page for MP3 and the [[Geometry (Donkey Kong Country Returns)#Surface|Geometry (Donkey Kong Country Returns)]] page for DKCR.


=== Dependencies ===
=== Dependencies ===
Line 266: Line 268:


This section is basically a list of all resources that this area depends on, not unlike a [[DGRP (File Format)|DGRP]] file. After the initial dependency list, there's a second array which provides a list of offsets into the dependency list. These offsets are used to indicate which dependencies are needed for individual script layers, with the last offset pointing to resources that are used by the area itself as a whole (world geometry textures and the [[#Path|PATH]]/[[#Portal Area|PTLA]]/[[#Static Geometry Map|EGMC]] assets).
This section is basically a list of all resources that this area depends on, not unlike a [[DGRP (File Format)|DGRP]] file. After the initial dependency list, there's a second array which provides a list of offsets into the dependency list. These offsets are used to indicate which dependencies are needed for individual script layers, with the last offset pointing to resources that are used by the area itself as a whole (world geometry textures and the [[#Path|PATH]]/[[#Portal Area|PTLA]]/[[#Static Geometry Map|EGMC]] assets).
[[STRM (File Format)|STRM]] assets are not included in this list.


{| class="wikitable"
{| class="wikitable"
Line 317: Line 321:
| colspan=3 {{unknown|End of dependency}}
| colspan=3 {{unknown|End of dependency}}
|}
|}
=== Script Layers ===
{{todo|This section is known, needs documentation written}}
=== Generated Script Objects ===
{{todo|Almost identical to script layers but there are some slight differences in the header}}
This section is an extra [[#Script Layers|script layer]] that contains generated objects (anything spawned by a Generator).
=== Collision ===
''Main article: [[Area Collision (File Format)]]''
=== Lights ===
''See [[Lights (Metroid Prime)]]
=== Unknown Section (LLTE) ===
This section always contains just a single 32-bit 1. It doesn't appear to do anything, so the purpose of this section is unknown.
=== Visibility Tree ===
{{research|major|This section is largely unknown}}


=== RSO Module List ===
=== RSO Module List ===
Anonymous user