Actions

SCHG

Difference between revisions of "Sonic Heroes/Light Editing"

From Sonic Retro

(Light Entry)
(Light Entry)
Line 8: Line 8:
 
=== Light Entry ===
 
=== Light Entry ===
  
Float values should be between 0 and 1.0f. Less than 0 seems to be treated as 0 while more than 1 may cause a crash. Rotations are zeroed out at -Z. Vertical rotation rotates up from this vector while horizontal rotation rotates right from it.
+
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.
  
 
{| class="prettytable"
 
{| class="prettytable"

Revision as of 23:36, 7 March 2019

SCHG: Sonic Heroes
Main Article
Mechanic Editing

DOL Editing
EXE Editing
Music Pointers
Object Parameter Data
Relocatable Editing (PC)
File Offsets

Model Editing
Collision Format
Model Format
Level Editing

Camera Editing
Event Editing
ID list
Indirect Editing
Light Editing
Level List
Object Editing
Object Porting
Spline Editing
Texture Animation Editing
Visibility Editing

Particle Editing
Particle Editing
Sound Editing
Music List

Sound Editing
Voices

SCHG How-Tos

Custom Object Material Effect Tutorial
Level Editing 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
1 Float Red Ambient
2 Float Green Ambient
3 Float Blue Ambient
4 Float Alpha Ambient
5 Float Red Directional
6 Float Green Directional
7 Float Blue Directional
8 Float Alpha Directional
9 Float Unknown 0-1.0F Value
10 Float Unknown 0-1.0F Value
11 Float Unknown 0-1.0F Value
12 Float16? Unknown for 3rd set of floats?
13 Uint16 Vertical Rotation 0-360 Euler Angle. Will accept angles beyond 360.
14 Float16? Unknown for 3rd set of floats?
15 Uint16 Horizontal Rotation 0-360 Euler Angle. Will accept angles beyond 360.
Sonic Community Hacking Guide
General
SonED2 Manual | Subroutine Equivalency List
Game-Specific
Sonic the Hedgehog (16-bit) | Sonic the Hedgehog (8-bit) | Sonic CD (prototype 510) | Sonic CD | Sonic CD (PC) | Sonic CD (2011) | Sonic 2 (Simon Wai prototype) | Sonic 2 (16-bit) | Sonic 2 (Master System) | Sonic 3 | Sonic 3 & Knuckles | Chaotix | Sonic Jam | Sonic Jam 6 | Sonic Adventure | Sonic Adventure DX: Director's Cut | Sonic Adventure DX: PC | Sonic Adventure (2010) | Sonic Adventure 2 | Sonic Adventure 2: Battle | Sonic Adventure 2 (PC) | Sonic Heroes | Sonic Riders | Sonic the Hedgehog (2006) | Sonic & Sega All-Stars Racing | Sonic Unleashed (Xbox 360/PS3) | Sonic Colours | Sonic Generations | Sonic Forces
Technical information
Sonic Eraser | Sonic 2 (Nick Arcade prototype) | Sonic CD (prototype; 1992-12-04) | Dr. Robotnik's Mean Bean Machine | Sonic Triple Trouble | Tails Adventures | Sonic Crackers | Sonic 3D: Flickies' Island | Sonic & Knuckles Collection | Sonic R | Sonic Shuffle | Sonic Advance | Sonic Advance 3 | Sonic Battle | Shadow the Hedgehog | Sonic Rush | Sonic Classic Collection | Sonic Free Riders | Sonic Lost World
Legacy Guides
The Nemesis Hacking Guides The Esrael Hacking Guides
ROM: Sonic 1 | Sonic 2 | Sonic 2 Beta | Sonic 3

Savestate: Sonic 1 | Sonic 2 Beta/Final | Sonic 3

Sonic 1 (English / Portuguese) | Sonic 2 Beta (English / Portuguese) | Sonic 2 and Knuckles (English / Portuguese)
Move to Sega Retro
Number Systems (or scrap) | Assembly Hacking Guide | 68000 Instruction Set | 68000 ASM-to-Hex Code Reference | SMPS Music Hacking Guide | Mega Drive technical information