J3D Model (BMD)
Category: Nintendo Gamecube
Description: Common model format used in Gamecube games.
Author: lowlines
Filename: j3d_bmd3.xml
Size: 13.45 KB
Date Modified: 22 October 2024
- Common
- Data Attributes
| Code | | | | | Description |
|---|
| 0x00 | | | | | Position Matrix Index |
| 0x01 | | | | | Tex0 Matrix Index |
| 0x02 | | | | | Tex1 Matrix Index |
| 0x03 | | | | | Tex2 Matrix Index |
| 0x04 | | | | | Tex3 Matrix Index |
| 0x05 | | | | | Tex4 Matrix Index |
| 0x06 | | | | | Tex5 Matrix Index |
| 0x07 | | | | | Tex6 Matrix Index |
| 0x08 | | | | | Tex7 Matrix Index |
| 0x09 | | | | | Position |
| 0x0A | | | | | Normal |
| 0x0B | | | | | Color0 |
| 0x0C | | | | | Color1 |
| 0x0D | | | | | Tex0 |
| 0x0E | | | | | Tex1 |
| 0x0F | | | | | Tex2 |
| 0x10 | | | | | Tex3 |
| 0x11 | | | | | Tex4 |
| 0x12 | | | | | Tex5 |
| 0x13 | | | | | Tex6 |
| 0x14 | | | | | Tex7 |
| 0x15 | | | | | Position Matrix Array |
| 0x16 | | | | | Normal Matrix Array |
| 0x17 | | | | | Texture Matrix Array |
| 0x18 | | | | | Lit Matrix Array |
| 0x19 | | | | | Normal Bi-Normal Tangent |
| 0x1A | | | | | Max Attr |
| 0xFF | | | | | Null Attr |
- Data Types
| Code | | | | | Description |
|---|
| 0x00 | | | | | 8-bit Unsigned |
| 0x01 | | | | | 8-bit Signed |
| 0x02 | | | | | 16-bit Unsigned |
| 0x03 | | | | | 16-bit Signed |
| 0x04 | | | | | Float |
- Texture Formats
| Code | | | | | Description |
|---|
| 0x00 | | | | | RGB565 |
| 0x01 | | | | | RGB888 |
| 0x02 | | | | | RGBX8 |
| 0x03 | | | | | RGBA4 |
| 0x04 | | | | | RGBA6 |
| 0x05 | | | | | RGBA8 |
- J3D Header
| Type | | Offset | Size | Value | Description |
|---|
| Version Stamp | | 0x0000 | 4 | 0x4A334432 | Stamp (J3D2). |
| Magic Stamp | | 0x0004 | 4 | 0x626D6433 | Stamp (bmd3). |
| File Size | | 0x0008 | 4 | | |
| # Sections | | 0x000C | 4 | 8 | |
|
| Unused Stamp | | 0x0010 | 4 | 0x53565233 | Stamp (SVR3). |
| Unused | | 0x0014 | 12 | 0xFF | |
- Info Section (INF1)
| Type | | Offset | Size | Value | Description |
|---|
| Magic Stamp | | 0x0000 | 4 | 0x494E4631 | Stamp (INF1). |
| Section Size | | 0x0004 | 4 | | |
| Unknown 1 | | 0x0008 | 2 | | |
| Padding | | 0x000A | 2 | 0xFFFF | |
| Unknown 2 | | 0x000C | 4 | | |
| # Vertices | | 0x0010 | 4 | | |
| Offset | | 0x0014 | 4 | | |
- Hierarchy Data
- A list of commands that make up the hierarchy tree.
| Command | | | | | Description |
|---|
| 0x00 | | | | | Finish |
| 0x01 | | | | | New Node |
| 0x02 | | | | | End Node |
| 0x10 | | | | | Joint |
| 0x11 | | | | | Material |
| 0x12 | | | | | Shape |
- Vertex Section (VTX1)
| Type | | Offset | Size | Value | Description |
|---|
| Magic Stamp | | 0x0000 | 4 | 0x56545831 | Stamp (VTX1). |
| Section Size | | 0x0004 | 4 | | |
|
| Info Offset | | 0x0000 | 4 | | 14 Offsets. If offset equals 0, no data follows. |
| Data Format Info |
| Format | | 0x0000 | 4 | | |
| Count | | 0x0004 | 4 | | |
| Type | | 0x0008 | 4 | | |
| Decimal Point | | 0x000C | 1 | | |
| Padding | | 0x000D | 3 | 0xFF | |
- Bone Weights Section (EVP1)
| Type | | Offset | Size | Value | Description |
|---|
| Magic Stamp | | 0x0000 | 4 | 0x45565031 | Stamp (EVP1). |
| Section Size | | 0x0004 | 4 | | |
| Count | | 0x0008 | 2 | | |
| Padding | | 0x000A | 2 | 0xFF | |
|
| Offset | | 0x0000 | 4 | | Repeats * Count. |
- Draw Section (DRW1)
| Type | | Offset | Size | Value | Description |
|---|
| Magic Stamp | | 0x0000 | 4 | 0x44525731 | Stamp (DRW1). |
| Section Size | | 0x0004 | 4 | | |
| Count | | 0x0008 | 2 | | |
| Padding | | 0x000A | 2 | 0xFF | |
| Is Weighted Offset | | 0x000C | 4 | | |
| Data Offset | | 0x0010 | 4 | | |
|
| Is Weighted Data | | 0x0000 | 2 | | Repeats * Count. |
|
| Data | | 0x0000 | 2 | | Repeats * Count. |
- Joint Section (JNT1)
| Type | | Offset | Size | Value | Description |
|---|
| Magic Stamp | | 0x0000 | 4 | 0x4A4E5431 | Stamp (JNT1). |
| Section Size | | 0x0004 | 4 | | |
| Count | | 0x0008 | 2 | | |
| Padding | | 0x000A | 2 | 0xFF | |
| Entry Offset | | 0x000C | 4 | | |
| Unknown Offset | | 0x0010 | 4 | | |
| Names Offset | | 0x0014 | 4 | | |
- Joint Entry Block - Repeats * Count
| Type | | Offset | Size | Value | Description |
|---|
| Unknown | | 0x0000 | 2 | | |
| Padding? | | 0x0002 | 2 | | |
| Scale X | | 0x0004 | 4 | | |
| Scale Y | | 0x0008 | 4 | | |
| Scale Z | | 0x000C | 4 | | |
| Rotate X | | 0x0010 | 2 | | |
| Rotate Y | | 0x0012 | 2 | | |
| Rotate Z | | 0x0014 | 2 | | |
| Padding | | 0x0016 | 2 | 0xFFFF | |
| Translate X | | 0x0018 | 4 | | |
| Translate Y | | 0x001C | 4 | | |
| Translate Z | | 0x0020 | 4 | | |
| Unknown | | 0x0024 | 4 | | |
| Bounding Box X | | 0x0028 | 4 | | |
| Bounding Box Y | | 0x002C | 4 | | |
| Bounding Box Z | | 0x0030 | 4 | | |
| Bounding Box X2 | | 0x0034 | 4 | | |
| Bounding Box Y2 | | 0x0038 | 4 | | |
| Bounding Box Z2 | | 0x003C | 4 | | |
- Unknown Block - Repeats * Count
- Names Block - Repeats * Count
- Shape Section (SHP1)
| Type | | Offset | Size | Value | Description |
|---|
| Magic Stamp | | 0x0000 | 4 | 0x53485031 | Stamp (SHP1). |
| Section Size | | 0x0004 | 4 | | |
| # Shapes | | 0x0008 | 2 | | |
| Padding | | 0x000A | 2 | 0xFF | |
| Batch Offset | | 0x000C | 4 | | |
| Unknown Offset | | 0x0010 | 4 | | |
| Padding? | | 0x0014 | 4 | 0x00000000 | |
| Attributes Offset | | 0x0018 | 4 | | |
| Matrix Table Offset | | 0x001C | 4 | | |
| Data Offset | | 0x0020 | 4 | | |
| Matrix Data Offset | | 0x0024 | 4 | | |
| Packet Offset | | 0x0028 | 4 | | |
- Batch Block - Repeats * Number of Shapes
| Type | | Offset | Size | Value | Description |
|---|
| Unknown | | 0x0000 | 1 | | |
| Padding | | 0x0001 | 1 | 0xFF | |
| # Packets | | 0x0002 | 2 | | |
| Attribute Offset | | 0x0004 | 2 | | |
| First Matrix Index | | 0x0006 | 2 | | |
| First Packet Index | | 0x0008 | 2 | | |
| Padding | | 0x000A | 2 | 0xFFFF | |
| Unknown 1 | | 0x000C | 4 | | |
| Unknown 2 | | 0x0010 | 4 | | |
| Unknown 3 | | 0x0014 | 4 | | |
| Unknown 4 | | 0x0018 | 4 | | |
| Unknown 5 | | 0x001C | 4 | | |
| Unknown 6 | | 0x0020 | 4 | | |
| Unknown 7 | | 0x0024 | 4 | | |
- Unknown Block - Repeats * Number of Shapes
| Type | | Offset | Size | Value | Description |
|---|
| Unknown | | 0x0000 | 2 | | |
- Attributes Block
| Type | | Offset | Size | Value | Description |
|---|
| Attribute | | 0x0000 | 4 | | |
| Type | | 0x0004 | 4 | | |
- Matrix Table Offsets Block - Repeats * Number of Shapes
| Type | | Offset | Size | Value | Description |
|---|
| Offset | | 0x0000 | 2 | | |
- Data Block
| Type | | Offset | Size | Value | Description |
|---|
| Primitive Type | | 0x0000 | 1 | | |
| # Vertices | | 0x0001 | 2 | | |
| Data | | 0x0003 | | | Repeats * Number of Vertices. Holds indexes to data stored in the VTX1 section for each attribute. |
- Primitive Types
| Code | | | | | Description |
|---|
| 0x80? | | | | | QUADS |
| 0x80? | | | | | TRIANGLES |
| 0x98 | | | | | TRIANGLESTRIP |
| 0xA0 | | | | | TRIANGLEFAN |
| 0xA8 | | | | | LINES |
| 0xB0 | | | | | LINSTRIP |
| 0xB8 | | | | | POINTS |
- Matrix Table Block
| Type | | Offset | Size | Value | Description |
|---|
| Unknown | | 0x0000 | 2 | | |
| Count | | 0x0002 | 2 | | |
| First Index | | 0x0004 | 4 | | |
- Packet Location Block - Repeats * Number of Shapes
| Type | | Offset | Size | Value | Description |
|---|
| Size | | 0x0000 | 4 | | |
| Offset | | 0x0004 | 4 | | Relative to Data Offset. |
- Materials Section (MAT3)
- Textures Section (TEX1)
| Type | | Offset | Size | Value | Description |
|---|
| Magic Stamp | | 0x0000 | 4 | 0x53485031 | Stamp (TEX1). |
| Section Size | | 0x0004 | 4 | | |
| # Textures | | 0x0008 | 2 | | |
| Padding | | 0x000A | 2 | 0xFF | |
| Data Offset | | 0x000C | 4 | | |
| Names Offset | | 0x0010 | 4 | | |