MREA (Metroid Prime): Difference between revisions

>Embyr 75
m ({{research}})
>Aruki
Line 80: Line 80:
''See [[Materials (Metroid Prime)]] and [[Geometry (Metroid Prime)]]''
''See [[Materials (Metroid Prime)]] and [[Geometry (Metroid Prime)]]''


MREA files have one material section, followed by a number of meshes, each of which has its own set of geometry sections. Each mesh starts with an extra header section which is formatted like this:
MREA files have one material section, followed by a number of meshes, each of which has its own set of geometry sections. There's couple small differences you'll usually see on MREA meshes compared to CMDL ones:
 
* Normals are ''always'' shorts, so vertex format 0 is never used.
* Most MREA meshes use lightmaps, so normally the first UV coordinate on each texture will read from the short UV array. This isn't always the case, though; you need to make sure you check the material so you know where to read from.
* Submeshes will usually have a bounding box in the extra data in the submesh header. This bounding box is used for depth sorting.
* Each mesh starts with an extra header section which is formatted like this:


{| class="wikitable"
{| class="wikitable"
Line 89: Line 94:
| 0x0
| 0x0
| 4
| 4
| {{unknown|'''Unknown (flags?)'''}}
| '''Visor Flags'''
|-
|-
| 0x4
| 0x4
Line 103: Line 108:
|}
|}


There's couple small differences you'll usually see on MREA meshes compared to CMDL ones:
==== Visor Flags ====


* Normals are ''always'' shorts, so vertex format 0 is never used.
{| class="wikitable"
* Most MREA meshes use lightmaps, so normally the first UV coordinate on each texture will read from the short UV array. This isn't always the case, though; you need to make sure you check the material so you know where to read from.
! Bit
* Submeshes will usually have a bounding box in the extra data in the submesh header. This bounding box is used for depth sorting.
! Hex
! Description
|-
| 0
| 0x1
| {{unknown|Unknown}}
|-
| 1
| 0x2
| Disable rendering in Combat/Scan Visor
|-
| 2
| 0x4
| Disable rendering in Thermal Visor
|-
| 3
| 0x8
| Disable rendering in X-Ray Visor
|-
| 4-5
| 0x30
| Thermal heat level.
* 0 - Cool
* 1 - Hot
* 2 - Warm
|}


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