WDB Format - DustStormPettigrew/LibLR1 GitHub Wiki
WDB — 3D Scene
Scene graph format. The central composition file that ties together all other 3D assets. Marked as "WORK IN PROGRESS" in source.
Top-Level Blocks (Asset References)
These are string arrays referencing other files by name:
| Block ID | Hex | Type | Referenced Format |
|---|---|---|---|
| TDB refs | 0x27 |
string[] |
Texture databases |
| MDB refs | 0x28 |
string[] |
Material databases |
| ADB refs | 0x29 |
string[] |
Animation databases |
| GDB refs | 0x2A |
string[] |
3D models |
| GDB2 refs | 0x2B |
string[] |
3D models (secondary set) |
| SDB refs | 0x2C |
string[] |
Skeleton structures |
| BDB refs | 0x2D |
string[] |
Bounding data |
| MAB refs | 0x3D |
string[] |
Material animations |
| BVB refs | 0x40 |
string[] |
Collision meshes |
Top-Level Blocks (Scene Objects)
| Block ID | Hex | Type | Description |
|---|---|---|---|
| Static Models | 0x2E |
Dict<string, WDB_StaticModel> |
Positioned GDB models |
| Animated Models | 0x2F |
Dict<string, WDB_AnimatedModel> |
Models with ADB/SDB animation |
| BDB Models | 0x30 |
Dict<string, WDB_BDBModel> |
Models with bounding data |
| Billboard Sprites | 0x37 |
WDB_Billboard[] |
Camera-facing sprites |
| BVB Models | 0x41 |
Dict<string, WDB_BVBModel> |
Collision mesh instances |
| Cameras | 0x43 |
Dict<string, WDB_Camera> |
Camera definitions |
| Ambient Lights | 0x48 |
Dict<string, WDB_AmbientLight> |
Ambient lighting |
| Directional Lights | 0x49 |
Dict<string, WDB_DirectionalLight> |
Directional lighting |
Common Object Properties
Most scene objects share these properties:
| Property ID | Hex | Type | Description |
|---|---|---|---|
| Position | 0x31 |
LRVector3 | World position |
| Rotation | 0x32 |
2 × LRVector3 | Forward vector + up vector |
WDB_StaticModel
References a GDB by index + unknown float. Properties: Position, Rotation, Unknown_3E array, Unknown_3F (2 floats), Unknown_42 (bool flag).
WDB_AnimatedModel
References GDB+ADB+SDB (or ADB+SDB without GDB). Additional property 0x35 (int).
WDB_Camera
| Property | Hex | Type |
|---|---|---|
| Near Plane | 0x45 |
float |
| Far Plane | 0x46 |
float |
| FOV | 0x47 |
float |
| Model ref | 0x2F |
AnimatedModelId + BoneId |
WDB_AmbientLight / WDB_DirectionalLight
| Property | Hex | Type |
|---|---|---|
| Light Color | 0x4A |
LRColor (RGB, no alpha) |
| Light Direction | 0x4B |
LRVector3 (directional only) |
Read/Write Support
Read only. No Save() method implemented.