Difference between revisions of "Lights (Metroid Prime)"
From Retro Modding Wiki
(→Light: there is an extra value in there but I don't know the format well enough to tell where just yet) |
|||
Line 9: | Line 9: | ||
===Light=== | ===Light=== | ||
Lights are a 0x41 byte long struct and consists of the following: | Lights are a 0x41 byte long struct and consists of the following: | ||
− | {|class="wikitable" | + | {| class="wikitable" |
− | !Type | + | ! Offset |
− | !Description | + | ! Type |
+ | ! Description | ||
|- | |- | ||
− | |long | + | | 0x0 |
− | |'''Light Type''' | + | | long |
+ | | '''Light Type''' | ||
|- | |- | ||
− | |float3 | + | | 0x4 |
− | |'''Light Color''' | + | | float3 |
+ | | '''Light Color''' | ||
|- | |- | ||
− | |float3 | + | | 0x10 |
− | |'''Position''' | + | | float3 |
+ | | '''Position''' | ||
|- | |- | ||
− | |float3 | + | | 0x1C |
− | |{{unknown|Direction?}} | + | | float3 |
+ | | {{unknown|Direction?}} | ||
|- | |- | ||
− | |float | + | | 0x28 |
− | |'''Power'''; NOT intensity, intensity is calculated using this value. | + | | float |
+ | | '''Power'''; NOT intensity, intensity is calculated using this value. | ||
|- | |- | ||
− | |float | + | | 0x2C |
− | |{{unknown|Angle?}} | + | | float |
+ | | {{unknown|Angle?}} | ||
|- | |- | ||
− | |float | + | | 0x30 |
− | |{{unknown|Unknown}} | + | | float |
+ | | {{unknown|Unknown}} | ||
|- | |- | ||
− | |float | + | | 0x34 |
− | |{{unknown|Unknown}} | + | | float |
+ | | {{unknown|Unknown}} | ||
|- | |- | ||
− | |byte | + | | 0x38 |
− | |{{unknown|Unknown}} | + | | byte |
+ | | {{unknown|Unknown}} | ||
|- | |- | ||
− | |float | + | | 0x39 |
− | |{{unknown|Unknown}} | + | | float |
+ | | {{unknown|Unknown}} | ||
|- | |- | ||
− | |long | + | | 0x3D |
− | |{{unknown|Unknown}} | + | | long |
+ | | {{unknown|Unknown}} | ||
|- | |- | ||
− | |float | + | | 0x41 |
− | |{{unknown|Unknown}} | + | | float |
+ | | {{unknown|Unknown}} | ||
+ | |- | ||
+ | | 0x45 | ||
+ | | colspan=2 {{unknown|End of light}} | ||
|} | |} | ||
Revision as of 20:20, 8 March 2015
The Lights section in Metroid Prime areas defines several different types of lights: spot, point, directional, and custom. The exact behavior for each type of light is not entirely known, however they all use the same struct. The only difference is how they're utilized by the engine.
This file format needs a lot of research Past power, nothing is really known. |
Format
The header for the light section is extremely simple and consists of the magic, 0xBABEDEAD
, followed by two arrays of lights, preceded by their count.
Light
Lights are a 0x41 byte long struct and consists of the following:
Offset | Type | Description |
---|---|---|
0x0 | long | Light Type |
0x4 | float3 | Light Color |
0x10 | float3 | Position |
0x1C | float3 | Direction? |
0x28 | float | Power; NOT intensity, intensity is calculated using this value. |
0x2C | float | Angle? |
0x30 | float | Unknown |
0x34 | float | Unknown |
0x38 | byte | Unknown |
0x39 | float | Unknown |
0x3D | long | Unknown |
0x41 | float | Unknown |
0x45 | End of light |