Nitro Model (NSBMD)
Category: Nintendo DS
Description: Common model format used in Nintendo DS games.
Author: lowlines
Filename: bmd0.xml
Size: 8.83 KB
Date Modified: 07 November 2019
- Nitro 3D Header
Type | | Offset | Size | Value | Description |
---|
Magic Stamp | | 0x0000 | 4 | 0x424D4430 | Stamp (BMD0) "Basic Model Data". |
Constant | | 0x0004 | 4 | 0x0001FEFF or 0x0002FEFF | |
File Size | | 0x0008 | 4 | | |
Header Size | | 0x000C | 2 | 16 | |
# Sections | | 0x000E | 2 | 1 or 2 | If this equals 1, there is no texture data section. |
|
Section Offset | | 0x0010 | 4 | | Repeats * Number of Sections. |
- Model Section (MDL0)
- Main Header
Type | | Offset | Size | Value | Description |
---|
Magic Stamp | | 0x0000 | 4 | 0x4D444C30 | Stamp (MDL0) "Model". |
Section Size | | 0x0004 | 4 | | |
- Model Info Section
Type | | Offset | Size | Value | Description |
---|
See 3D Info Structure |
Model Offset | | 0x0000 | 4 | | Relative to start of this section. |
- Model Data Block
- Header
Type | | Offset | Size | Value | Description |
---|
Block Size | | 0x0000 | 4 | | |
Bones Offset | | 0x0004 | 4 | | |
Materials Offset | | 0x0008 | 4 | | |
Polygon Start Offset | | 0x000C | 4 | | |
Polygon End Offset | | 0x0010 | 4 | | |
Unknown | | 0x0014 | 1 | | |
Unknown | | 0x0015 | 1 | | |
Unknown | | 0x0016 | 1 | | |
# Objects | | 0x0017 | 1 | | |
# Materials | | 0x0018 | 1 | | |
# Polygons | | 0x0019 | 1 | | |
Unknown | | 0x0020 | 1 | | |
Scale Mode? | | 0x0021 | 1 | | |
Unknown | | 0x0022 | 2 | | |
# Vertices | | 0x0024 | 2 | | |
# Surfaces | | 0x0026 | 2 | | |
# Triangles | | 0x0028 | 2 | | |
# Quads | | 0x002A | 2 | | |
Bounding Box X | | 0x002C | 2 | | Signed Fixed Point 1.3.12 |
Bounding Box Y | | 0x002E | 2 | | Signed Fixed Point 1.3.12 |
Bounding Box Z | | 0x0030 | 2 | | Signed Fixed Point 1.3.12 |
Bounding Box Width | | 0x0032 | 2 | | Signed Fixed Point 1.3.12 |
Bounding Box Height | | 0x0034 | 2 | | Signed Fixed Point 1.3.12 |
Bounding Box Depth | | 0x0036 | 2 | | Signed Fixed Point 1.3.12 |
Run Time Data | | 0x0038 | 8 | | |
- Objects Section
- Object Header
- Exactly the same format as above.
- Object Data - Repeats * Number of Objects
Type | | Offset | Size | Value | Description |
---|
Transformation Flags | | 0x0000 | 2 | | Specfies what data follows. Format is NNNNPSRT. P is Pivot and N is Negation which are used for Pivot (see below). |
Padding | | 0x0002 | 2 | | |
Translation XYZ (If T=0) |
X Value | | 0x0000 | 4 | | |
Y Value | | 0x0004 | 4 | | |
Z Value | | 0x0008 | 4 | | |
Pivot (If P=1) |
Value 1 | | 0x0000 | 2 | | |
Value 2 | | 0x0004 | 2 | | |
Scale XYZ (If S=0) |
X Scale | | 0x0000 | 4 | | |
Y Scale | | 0x0004 | 4 | | |
Z Scale | | 0x0008 | 4 | | |
Rotation? (If P=0 & R=0) |
Value 1 | | 0x0000 | 2 | | |
Value 2 | | 0x0002 | 2 | | |
Value 3 | | 0x0004 | 2 | | |
Value 4 | | 0x0006 | 2 | | |
Value 5 | | 0x0008 | 2 | | |
Value 6 | | 0x000A | 2 | | |
Value 7 | | 0x000C | 2 | | |
Value 8 | | 0x000E | 2 | | |
- Bones Section
- Contains packed bone commands.
- Bone Commands
Command | | | Size | Parameters | Description |
---|
0x00 | | | 0 | 0 | Padding |
0x01 | | | 0 | 0 | End of Bones |
0x02 | | | 2 | 2 | Node ID, Visibility |
0x03 | | | 1 | 1 | Set Polygon Stack ID? |
0x04 | | | 3 | 3 | Material ID, 0x5, Polygon ID |
0x05 | | | 1 | 1 | |
0x06 | | | 3 | 3 | Object ID, Parent ID, Dummy 0 |
0x07 | | | 1 | 1 | |
0x08 | | | 1 | 1 | |
0x09 | | | 8 | 8 | |
0x0B | | | 0 | 0 | Begin Polygon/Material Pairing |
0x24 | | | 3 | 3 | Material ID, 0x5, Polygon ID |
0x26 | | | 4 | 4 | Object ID, Parent ID, Dummy 0, Stack ID |
0x2B | | | 0 | 0 | End Polygon/Material Pairing |
0x44 | | | 3 | 3 | Material ID, 0x5, Polygon ID |
0x46 | | | 4 | 4 | Object ID, Parent ID, Dummy 0, Restore ID |
0x66 | | | 5 | 5 | Object ID, Parent ID, Dummy 0, Stack ID, Restore ID |
- Materials Section
- Texture Section (TEX0) - Not always present
- See NSBTX format for details.
- 3D Info Structure (Used by Info Sections)
Type | | Offset | Size | Value | Description |
---|
Dummy | | 0x0000 | 1 | 0x0 | |
# Objects | | 0x0001 | 1 | | |
Section Size | | 0x0002 | 2 | | |
- Unknown Block
Type | | Offset | Size | Value | Description |
---|
Header Size | | 0x0000 | 2 | 0x8 | |
Section Size | | 0x0002 | 2 | | |
Constant | | 0x0004 | 4 | 0x0000017F | |
Data (Repeats * Number of Objects) |
Unknown | | 0x0000 | 2 | | |
Unknown | | 0x0002 | 2 | | |
- Info Block
Type | | Offset | Size | Value | Description |
---|
Header Size | | 0x0000 | 2 | 0x8 | |
Data Size | | 0x0002 | 2 | | |
Data (Repeats * Number of Objects) |
Info Data | | 0x0004 | - | | See each section for details on the format. |
- Name Block
Type | | Offset | Size | Value | Description |
---|
Name | | 0x0000 | 16 | | Repeats * Number of Objects |