Difference between revisions of "Lights (Metroid Prime)"
From Retro Modding Wiki
Line 28: | Line 28: | ||
| 0x1C | | 0x1C | ||
| float3 | | float3 | ||
− | | | + | | '''Direction''' |
|- | |- | ||
| 0x28 | | 0x28 | ||
| float | | float | ||
− | | ''' | + | | '''Reference Distance''' |
|- | |- | ||
| 0x2C | | 0x2C | ||
| float | | float | ||
− | | | + | | '''Spot Cutoff |
|- | |- | ||
| 0x30 | | 0x30 | ||
Line 44: | Line 44: | ||
| 0x34 | | 0x34 | ||
| byte | | byte | ||
− | | | + | | '''Quadratic Cutoff''' |
|- | |- | ||
| 0x35 | | 0x35 | ||
| float | | float | ||
− | | | + | | '''Light Factor |
|- | |- | ||
| 0x39 | | 0x39 | ||
| long | | long | ||
− | | | + | | '''Distance Cutoff (bool)''' |
|- | |- | ||
| 0x3D | | 0x3D |
Revision as of 20:33, 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 | Reference Distance |
0x2C | float | Spot Cutoff |
0x30 | float | Unknown |
0x34 | byte | Quadratic Cutoff |
0x35 | float | Light Factor |
0x39 | long | Distance Cutoff (bool) |
0x3D | float | Unknown |
0x41 | End of light |