MREA (Metroid Prime): Difference between revisions

Jump to navigation Jump to search
no edit summary
>Aruki
No edit summary
imported>Jackoalan
No edit summary
 
(3 intermediate revisions by one other user not shown)
Line 9: Line 9:


Like [[CMDL (Metroid Prime)|CMDL]], MREA files are split up into a number of 32-byte aligned sections. Every section both starts and ends on a 32-byte boundary. These are used to separate different parts of the file; different types of sections typically indicate different sets of data. The header declares the section count and the size of each one; using these is the only way to navigate the file.
Like [[CMDL (Metroid Prime)|CMDL]], MREA files are split up into a number of 32-byte aligned sections. Every section both starts and ends on a 32-byte boundary. These are used to separate different parts of the file; different types of sections typically indicate different sets of data. The header declares the section count and the size of each one; using these is the only way to navigate the file.
These are the sections that appear in each MREA file, in the order they appear in the file:
{| class="wikitable"
! Identifier
! Name
|-
| {{none}}
| [[#World Geometry|World Geometry]]
|-
| <code>AROT</code>
| [[#Area Octree|Area Octree]]
|-
| <code>SCLY</code>
| [[#Script Layers|Script Layers]]
|-
| <code>0xDEAFBABE</code>
| [[#Collision|Collision]]
|-
| {{none}}
| {{unknown|[[#Unknown Section|Unknown]]}}
|-
| <code>0xBABEDEAD</code>
| [[#Lights|Lights]]
|-
| <code>VISI</code>
| [[#Visibility Tree|Visibility Tree]]
|-
| {{none}}
| [[#Path|Path]]
|}


=== Header ===
=== Header ===
Line 106: Line 137:
|}
|}


=== Data Sections ===
=== World Geometry ===
 
MREA data sections are in the file in the following order:
 
{| class="wikitable"
! Identifier
! Name
|-
| {{none}}
| [[#World Geometry|World Geometry]]
|-
| <code>AROT</code>
| [[#Area Octree|Area Octree]]
|-
| <code>SCLY</code>
| [[#Script Layers|Script Layers]]
|-
| <code>0xDEAFBABE</code>
| [[#Collision|Collision]]
|-
| {{none}}
| {{unknown|[[#Unknown Section|Unknown]]}}
|-
| <code>0xBABEDEAD</code>
| [[#Lights|Lights]]
|-
| <code>VISI</code>
| [[#Visibility Tree|Visibility Tree]]
|-
| {{none}}
| [[#Path|Path]]
|}
 
==== World Geometry ====


''See [[Materials (Metroid Prime)]] and [[Geometry (Metroid Prime)]]''
''See [[Materials (Metroid Prime)]] and [[Geometry (Metroid Prime)]]''
Line 179: Line 177:
|}
|}


===== Visor Flags =====
==== Visor Flags ====


{| class="wikitable"
{| class="wikitable"
Line 210: Line 208:
|}
|}


==== Area Octree ====
=== Area Octree ===


{{main|AROT (MREA Section)}}
{{main|AROT (MREA Section)}}


The AROT section stores the area's octree, accelerating back-to-front rendering of contained meshes, it is also used for spacial queries such as collision.
The AROT section stores the area's octree, accelerating back-to-front rendering of contained meshes. It is also used for spacial queries such as collision.


==== Script Layers ====
=== Script Layers ===


{{todo|SCLY is definitely complicated enough to need its own article.}}
{{todo|Format known, needs documentation written up.}}


The SCLY section contains data for objects.
The SCLY section contains data for objects.


==== Collision ====
=== Collision ===


{{todo|Collision needs a separate article because it shares so many similarities with DCLN. How should we document the parts where the format diverges, though?}}
''Main article: [[Area Collision (File Format)]]''


You have three guesses what the collision section is for, and the first two don't count.
=== Unknown Section ===


==== Unknown Section ====
This one is sandwiched between collision and lights, and usually just contains a single 32-bit "1". Purpose is unknown. In the Prime 3/DKCR MREA format, this section is labelled <code>LLTE</code>.


This one is sandwiched between collision and lights, and usually just contains a single 32-bit "1". Purpose is unknown.
=== Lights ===


==== Lights ====
This section is for dynamic lights. See the [[Lights_(Metroid_Prime)|Light]] article for details.


This section is for dynamic lights, see the [[Lights_(Metroid_Prime)|Light]] article for details.
=== Visibility Tree ===


==== Visibility Tree ====
{{main|VISI (MREA Section)}}


This section is labeled "VISI". This section is sometimes not actually present in the file, labeled with a size of 0.
This section is a PVS octree labeled "VISI". Some areas don't have visibility octrees; in that case this section will be completely empty and listed with a size of 0.


==== Path ====
=== Path ===


This is the final section in the file; it's always 0x20 bytes, and its only value is a single [[PATH (File Format)|PATH]] file ID.
This is the final section in the file; its only value is a single [[PATH (File Format)|PATH]] file ID.


== Tools ==
{| class="wikitable"
 
! Offset
* [https://drive.google.com/file/d/0B9MLV21H7SDvMk9PN1lrM1g3ZVE/view?usp=sharing Parax's MREA maxscript] can import MREA terrain geometry into 3DS Max.
! Type
! Name
|-
| 0x0
| Asset ID
| '''Area PATH Resource'''
|-
| 0x4
| colspan=2 {{unknown|End of section}}
|}


[[Category:File Formats]]
[[Category:File Formats]]
[[Category:Metroid Prime]]
[[Category:Metroid Prime]]
Anonymous user

Navigation menu