EvilEngine/LODT

From Heavy Iron Modding
(Redirected from LODT)

LODT
LOD Table
TypeBinary
Games usedBattle for Bikini Bottom

The SpongeBob SquarePants Movie
The Incredibles

Rise of the Underminer
Source codezLOD.h

A LOD table defines how models should look based on their distances from the in-game camera. A model can have up to 4 levels of detail, each level being a separate version of the model, spaced at increasing distances from the camera. Once the maximum distance is reached, the model starts fading out of view.

Format

The asset data starts with an int which defines the amount of entries in the LOD table, then the entries themselves.

zLODManager

Offset Type Variable Description
0x00 int numextra Amount of LOD table entries

zLODTable

Offset [-4] only applies to BFBB

Offset Type Variable Description
0x00 AssetID baseBucket Model asset ID
0x04 float noRenderDist Max Distance from the camera before it starts fading out.
0x08 uint flags Not present in BFBB
0x0C[-4] AssetID lodBucket LOD1 Model (optional)
0x10[-4] AssetID lodBucket LOD2 Model (optional)
0x14[-4] AssetID lodBucket LOD3 Model (optional)
0x18[-4] float lodDist LOD1 Distance from camera
0x1C[-4] float lodDist LOD2 Distance from camera
0x20[-4] float lodDist LOD2 Distance from camera