Sonic Heroes/Visibility Editing
From Sonic Retro
|SCHG: Sonic Heroes|
::::Object Parameter Data
Relocatable Editing (PC)
Texture Animation Editing
|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.
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
|0x00||Long||Chunk number (-1 for blank entry)|
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.