Actions

SCHG

Sonic Heroes/Visibility Editing

From Sonic Retro

SCHG: Sonic Heroes
Main Article
Mechanic Editing
DOL Editing
EXE Editing
::::Music Pointers
::::Object Parameter Data
Relocatable Editing (PC)
::::File Offsets
Model Editing
Model Format
Collision Format
Level Editing
Camera Editing
Event Editing
Indirect Editing
Level List
Object Editing
Object Porting
Visibility Editing
Particle Editing
Particle Editing
Sound Editing
Sound Editing
Music List
Voices
SCHG How-Tos
Custom Object Material Effect Tutorial
Level Editing Tutorial


Visibility data for level models is set in sLL_blk.bin files located in the dvdroot folder. They are big endian binary files which define boundary boxes. When the camera is inside the box, the specified chunk of level geometry is rendered.

File Layout

Each sLL_blk.bin file contains 64 entries for boundary boxes. Most levels are split into fewer chunks, so the majority of those entries is left unused.
Each entry is 0x1B bytes long and is set like this:

00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Offset Type Description
0x00 Long Chunk number (-1 for blank entry)
0x04 Long Minimum X
0x08 Long Minimum Y
0x0C Long Minimum Z
0x10 Long Maximum X
0x14 Long Maximum Y
0x18 Long Maximum Z

The XYZ coordinates for the maximum and minimum of the boundary boxes are signed 32 bit integers, allowing for positive and negative values. The minimum value for each coordinate must be lower than the maximum, but the minimum doesn't have to be positive or the maximum negative. The same chunk can be specified to load from more than one entry, and multiple chunks can be loaded at the same time from overlapping boxes.

Sonic Community Hacking Guide
General
Sonic Music Hacking Guide | SonED2 Manual
Game-Specific
Sonic the Hedgehog (16-bit) | Sonic the Hedgehog (8-bit) | Sonic Eraser | Sonic CD (prototype 510) | Sonic CD | Sonic CD (PC) | Sonic 2 (Nick Arcade prototype) | Sonic 2 (Simon Wai prototype) | Sonic 2 (16-bit) | Sonic 2 (8-bit) | Sonic 2 & Knuckles | Dr. Robotnik's Mean Bean Machine | Sonic Triple Trouble | Sonic 3 | Sonic & Knuckles | Sonic 3 & Knuckles | Sonic & Knuckles Collection | Sonic Crackers | Sonic 3D: Flickies' Island | Chaotix | Sonic R PC | Sonic Jam 6 | Sonic Advance | Sonic Advance 2 | Sonic Advance 3 | Sonic Battle | 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 | Shadow the Hedgehog | Sonic Riders | Sonic the Hedgehog (2006) | Sonic & Sega All-Stars Racing | Sonic Unleashed (Xbox 360/PS3) | Sonic Generations
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 | Subroutine Equivalency List | 68000 Instruction Set | 68000 ASM-to-Hex Code Reference | VDP Documentation | Official Sega 32X Documentation | Official Mega-CD Documentation | Official Sega Mega Drive Documentation