Difference between revisions of "MDL0 (File Format)"
Jump to navigation
Jump to search
(Updated with information from SZS Modifier, CTools, Brawl and Dolphin. Incomplete.) |
|||
Line 1: | Line 1: | ||
{{under-construction}} | {{under-construction}} | ||
− | This | + | This page describes the [[Mario Kart Wii]] '''MDL0''' file format, as found within [[BRRES (File Format)|BRRES files]]. |
== File Format == | == File Format == | ||
− | === | + | === File Header === |
{| class="wikitable" | {| class="wikitable" | ||
− | ! | + | ! Offset !! Size !! Description |
|- | |- | ||
− | | 0x00 || 4 || | + | | 0x00 || 4 || Magic "MDL0" |
|- | |- | ||
− | | 0x04 || 4 || | + | | 0x04 || 4 || Length of MDL0 file |
|- | |- | ||
− | | 0x08 || 4 || | + | | 0x08 || 4 || Section Count - 3 |
|- | |- | ||
− | | 0x0c || 4 || | + | | 0x0c || 4 || BRRES File Offset |
|- | |- | ||
− | | 0x10 || | + | | 0x10 || 4 * Section Count || Section Offsets |
|- | |- | ||
− | |||
− | |||
− | |||
|} | |} | ||
− | + | All offsets are relative to the start of the header.<br /> | |
− | + | The Section Count is stored as 3 less than it should be. <br /> | |
+ | The section offsets point to [[BRRES Index Group (File Format)|BRRES Index Group]] strctures for the directories, which in turn point to the actual data sections within the MDL0 file. <br /> | ||
+ | The meaning of each section is defined by number as below. | ||
{| class="wikitable" | {| class="wikitable" | ||
− | ! | + | ! Section !! description |
+ | |- | ||
+ | | 0 || Draw lists | ||
+ | |- | ||
+ | | 1 || Bones | ||
+ | |- | ||
+ | | 2 || Verticies | ||
+ | |- | ||
+ | | 3 || Normals | ||
+ | |- | ||
+ | | 4 || Colors | ||
+ | |- | ||
+ | | 5 || Texture Coordinates | ||
+ | |- | ||
+ | | 6 || '''Not Seen''' | ||
|- | |- | ||
− | | | + | | 7 || '''Not Seen''' |
|- | |- | ||
− | | | + | | 8 || Materials |
|- | |- | ||
− | | | + | | 9 || Shaders |
|- | |- | ||
− | | | + | | 10 || Polygons |
|- | |- | ||
− | | | + | | 11 || Texture Links |
|- | |- | ||
− | | | + | | 12 || '''Not Seen in [[Mario Kart Wii]]''' |
+ | |- | ||
+ | | 13 || '''Not Seen in [[Mario Kart Wii]]''' | ||
|- | |- | ||
− | |||
|} | |} | ||
− | + | === MDL0 Header === | |
− | === | + | Following the section offsets is the MDL0 header structure. |
{| class="wikitable" | {| class="wikitable" | ||
− | ! | + | ! Offset !! Size !! Description |
+ | |- | ||
+ | | 0x00 || 4 || Header Length (0x40) | ||
+ | |- | ||
+ | | 0x04 || 4 || File Header Offset | ||
+ | |- | ||
+ | | 0x08 || 4 || '''Unknown''' | ||
|- | |- | ||
− | | | + | | 0x0C || 4 || '''Unknown''' |
|- | |- | ||
− | | | + | | 0x10 || 4 || Vertex Count |
|- | |- | ||
− | | | + | | 0x14 || 4 || Face Count |
+ | |- | ||
+ | | 0x18 || 4 || '''Unknown''' | ||
+ | |- | ||
+ | | 0x1C || 4 || Bone Count | ||
+ | |- | ||
+ | | 0x20 || 4 || '''Unknown''' (0x01000000) | ||
+ | |- | ||
+ | | 0x24 || 4 || Bone Table Offset | ||
+ | |- | ||
+ | | 0x28 || 12 || Minimum (float3) | ||
+ | |- | ||
+ | | 0x34 || 12 || Maximum (float3) | ||
|- | |- | ||
− | |||
|} | |} | ||
− | + | All offsets are relative to the start of the header.<br /> | |
[[category:File Format]] | [[category:File Format]] |
Revision as of 22:58, 30 April 2011
Under Construction
This article is not finished. Help improve it by adding accurate information or correcting grammar and spelling.
This page describes the Mario Kart Wii MDL0 file format, as found within BRRES files.
File Format
File Header
Offset | Size | Description |
---|---|---|
0x00 | 4 | Magic "MDL0" |
0x04 | 4 | Length of MDL0 file |
0x08 | 4 | Section Count - 3 |
0x0c | 4 | BRRES File Offset |
0x10 | 4 * Section Count | Section Offsets |
All offsets are relative to the start of the header.
The Section Count is stored as 3 less than it should be.
The section offsets point to BRRES Index Group strctures for the directories, which in turn point to the actual data sections within the MDL0 file.
The meaning of each section is defined by number as below.
Section | description |
---|---|
0 | Draw lists |
1 | Bones |
2 | Verticies |
3 | Normals |
4 | Colors |
5 | Texture Coordinates |
6 | Not Seen |
7 | Not Seen |
8 | Materials |
9 | Shaders |
10 | Polygons |
11 | Texture Links |
12 | Not Seen in Mario Kart Wii |
13 | Not Seen in Mario Kart Wii |
MDL0 Header
Following the section offsets is the MDL0 header structure.
Offset | Size | Description |
---|---|---|
0x00 | 4 | Header Length (0x40) |
0x04 | 4 | File Header Offset |
0x08 | 4 | Unknown |
0x0C | 4 | Unknown |
0x10 | 4 | Vertex Count |
0x14 | 4 | Face Count |
0x18 | 4 | Unknown |
0x1C | 4 | Bone Count |
0x20 | 4 | Unknown (0x01000000) |
0x24 | 4 | Bone Table Offset |
0x28 | 12 | Minimum (float3) |
0x34 | 12 | Maximum (float3) |
All offsets are relative to the start of the header.