BMD and BDL (File Format)
BMD and BDL are two file formats used by a wide variety of Nintendo games between the GameCube & Wii.
File Header
The file begins with the header of 0x10 bytes. BDL Includes an extra section (MDL3) that BMD does not. The structure is the same as for BCK & JPA files (All lengths are in Hexadecimal):
Offset | Size | Description | |
---|---|---|---|
0x00 | 8 | File identifier: 'J3D2bmd3' for BMD and 'J3D2bdl4' for BDL in ASCII. | |
0x08 | 4 | Length of file in bytes. | |
0x0c | 4 | Number of sections in the file (08 in BMD & 09 in BDL) | |
0x10 | 4 | 'SVR3' in ASCII. | |
0x14 | 0C | Consists only of FF (Padding?) | |
End of header |
Sections
BMD & BDL contain mostly the same sections, with the exception of the MDL3 section that appears only within BDL files.
INF1
The INF1 section contains Model Information.
Offset | Size | Description |
---|---|---|
0x00 | 2 | Section name: 'INF1' in ASCII. |
0x04 | 4 | Length of section in bytes. |
0x08 | 2 | Unknown model setting (very similar to MDL0), 01 for BMD & 00 for BDL. |
0x0a | 4 | Unknown model setting, always FFFF0000. |
0x0c | 4 | Unknown model setting, seen to be anywhere from 0001 - 0030. |
0x10 | 4 | Number of coordinates in VTX1 section. |
0x14 | 4 | Offset location relative to beginning of section (After the length of section, typically location 0x18). |
0x18 (O = The offset) | 2 | Unknown setting (Always 00 10). |
The next part of the INF1 section describes the scene graph of the file, it controlls what references what. It starts immediately after 0x18 in the INF1 section. There can be many of these and they go in order:
Offset | Size | Description |
---|---|---|
0x00 + O | 4 | Unknown |
0x04 + O | 4 | Unknown |
0x08 + O | 4 | Unknown |
0x0a + O | 4 | Unknown |
0x0e + O (O2 = This Offset) | 4 | Unknown |
The end of this section:
Offset | Size | Description | |
---|---|---|---|
0x00 + O2 | 6 | Null Bytes | |
0x06 + O2 | 10 | Spells 'This is padding ' in ASCII | |
End of INF1 Section |
VTX1
The VTX1 sections stores the vertex arrays for positions, colors, normals & texture coordinates. Additionally, it stores the data format in which these arrays are stored.
Offset | Size | Description |
---|---|---|
0x00 | 4 | Section name: 'VTX1' in ASCII. |
0x04 | 4 | Size of section in bytes. |
0x08 | 4 | Offset location of the array data. |
0x0c | 4 | Unknown. |