Sonic Heroes/Light Editing
From Sonic Retro
SCHG: Sonic Heroes |
---|
Main Article |
Mechanic Editing |
DOL Editing |
Model Editing |
Collision Format Model Format |
Level Editing |
Camera Editing |
Particle Editing |
Particle Editing |
Sound Editing |
Music List |
SCHG How-Tos |
Custom Object Material Effect Tutorial |
Light layouts are stored in big endian sLL_light.bin (or stgLL_light.bin) files, where LL is the level number. On PC and Xbox, they are located in the /dvdroot folder. For Shadow the Hedgehog, the same format is used in little endian.
File layout
Each light entry is 0x34 bytes long, and there are 19 entries in each Heroes file, 16 for a Shadow file. Some entries may be blank for some stages, though they can be utilized by objects. The 0x34 bytes of each entry are divided into variables which occupy 4 bytes of space, for a total of 15 variables. They are either float32s, float16s, or U16s.
Light Entry
Float values should be between 0 and 1.0f although negative values and values over 1 will behave as logic would dictate. There's a hard limit on those, but I don't know what at this time. Rotations are zeroed out at -Z. Vertical rotation rotates up from this vector while horizontal rotation rotates right from it.
Number | Type | Description |
---|---|---|
0x0 | Float | Red Ambient |
0x4 | Float | Green Ambient |
0x8 | Float | Blue Ambient |
0xC | Float | Alpha Ambient |
0x10 | Float | Red Directional |
0x14 | Float | Green Directional |
0x18 | Float | Blue Directional |
0x1C | Float | Alpha Directional |
0x20 | Float | Unknown 0-1.0F Value |
0x24 | Float | Unknown 0-1.0F Value |
0x28 | Float | Unknown 0-1.0F Value |
0x2C | Float16? | Unknown for 3rd set of floats? |
0x2E | Uint16 | Vertical Rotation 0-360 Euler Angle. Will accept angles beyond 360. |
0x30 | Float16? | Unknown for 3rd set of floats? |
0x32 | Uint16 | Horizontal Rotation 0-360 Euler Angle. Will accept angles beyond 360. |
References