<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.wexosmk.xyz/index.php?action=history&amp;feed=atom&amp;title=BMD_%28File_Format%29</id>
	<title>BMD (File Format) - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.wexosmk.xyz/index.php?action=history&amp;feed=atom&amp;title=BMD_%28File_Format%29"/>
	<link rel="alternate" type="text/html" href="https://wiki.wexosmk.xyz/index.php?title=BMD_(File_Format)&amp;action=history"/>
	<updated>2026-05-06T17:00:46Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://wiki.wexosmk.xyz/index.php?title=BMD_(File_Format)&amp;diff=118&amp;oldid=prev</id>
		<title>Wexos: Imported from avsys wiki</title>
		<link rel="alternate" type="text/html" href="https://wiki.wexosmk.xyz/index.php?title=BMD_(File_Format)&amp;diff=118&amp;oldid=prev"/>
		<updated>2024-05-01T17:13:08Z</updated>

		<summary type="html">&lt;p&gt;Imported from avsys wiki&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;BMD&amp;#039;&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;B&amp;#039;&amp;#039;&amp;#039;inary &amp;#039;&amp;#039;&amp;#039;M&amp;#039;&amp;#039;&amp;#039;o&amp;#039;&amp;#039;&amp;#039;D&amp;#039;&amp;#039;&amp;#039;el) is a model format developed by [[Nintendo]]. It is used in games such as [[Mario Kart Double Dash!!]] and [[Super Mario Sunshine]]. An extension of the format was created, and name of the format was changed to &amp;#039;&amp;#039;&amp;#039;BDL&amp;#039;&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;B&amp;#039;&amp;#039;&amp;#039;inary &amp;#039;&amp;#039;&amp;#039;D&amp;#039;&amp;#039;&amp;#039;isplay &amp;#039;&amp;#039;&amp;#039;L&amp;#039;&amp;#039;&amp;#039;ist).&lt;br /&gt;
&lt;br /&gt;
BDL is an updated version of BMD, but its content is almost identical. BDL has one extra section, [[#MDL|MDL]]. All sections are identified by a magic, and the fourth character in each magic represents the section version. The string &amp;quot;This is padding data to alignme&amp;quot; is used as padding bytes. It is impossible to know what characters may have been stored, because the biggest alignment in files are 0x20, meaning a maximum of 0x1F padding characters can be stored.&lt;br /&gt;
&lt;br /&gt;
= File Format =&lt;br /&gt;
== Header ==&lt;br /&gt;
A file starts with the following structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Char[4] || &amp;#039;&amp;#039;&amp;#039;File library magic&amp;#039;&amp;#039;&amp;#039;. Always &amp;#039;&amp;#039;J3D2&amp;#039;&amp;#039; in ASCII.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Char[4] || &amp;#039;&amp;#039;&amp;#039;File type magic&amp;#039;&amp;#039;&amp;#039;. Either &amp;#039;&amp;#039;bmd3&amp;#039;&amp;#039; or &amp;#039;&amp;#039;bdl4&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Size of file&amp;#039;&amp;#039;&amp;#039; in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || UInt32 || &amp;#039;&amp;#039;&amp;#039;Number of sections&amp;#039;&amp;#039;&amp;#039; stored in the file.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== SVR ==&lt;br /&gt;
The &amp;#039;&amp;#039;SVR&amp;#039;&amp;#039; section (&amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039;ub&amp;#039;&amp;#039;&amp;#039;V&amp;#039;&amp;#039;&amp;#039;e&amp;#039;&amp;#039;&amp;#039;R&amp;#039;&amp;#039;&amp;#039;sion) has an unknown usage and is always stored directly after the [[#Header|header]]. The section is not included in the section count. The structure is as follows:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Char[4] || &amp;#039;&amp;#039;&amp;#039;Section magic&amp;#039;&amp;#039;&amp;#039;. Always &amp;#039;&amp;#039;SVR&amp;#039;&amp;#039; followed by a version in ASCII.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt32 || {{Unknown-left|&amp;#039;&amp;#039;&amp;#039;Unknown&amp;#039;&amp;#039;&amp;#039;, always FF FF FF FF.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || UInt32 || {{Unknown-left|&amp;#039;&amp;#039;&amp;#039;Unknown&amp;#039;&amp;#039;&amp;#039;, always FF FF FF FF.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || UInt32 || {{Unknown-left|&amp;#039;&amp;#039;&amp;#039;Unknown&amp;#039;&amp;#039;&amp;#039;, always FF FF FF FF.}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== INF ==&lt;br /&gt;
The &amp;#039;&amp;#039;INF&amp;#039;&amp;#039; section (&amp;#039;&amp;#039;&amp;#039;INF&amp;#039;&amp;#039;&amp;#039;ormation) stores the scene hierarchy. It has the following structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Char[4] || &amp;#039;&amp;#039;&amp;#039;Section magic&amp;#039;&amp;#039;&amp;#039;. Always &amp;#039;&amp;#039;INF&amp;#039;&amp;#039; followed by a version in ASCII.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Section size&amp;#039;&amp;#039;&amp;#039; in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || UInt16 || {{Unknown-left|&amp;#039;&amp;#039;&amp;#039;Unknown&amp;#039;&amp;#039;&amp;#039;.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || UInt16 || {{Unknown-left|&amp;#039;&amp;#039;&amp;#039;Unknown&amp;#039;&amp;#039;&amp;#039;.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || UInt32 || &amp;#039;&amp;#039;&amp;#039;Number of packets&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Total number of vertices&amp;#039;&amp;#039;&amp;#039; in this file.&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || UInt32 || &amp;#039;&amp;#039;&amp;#039;[[#Scene Node|Scene node]] array offset&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Scene Node ===&lt;br /&gt;
Each scene node describes one asset in the file. It stores the assets into an hierarchy of nodes, and the list is continued until a terminator node is found. Each node has the following structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt16 || &amp;#039;&amp;#039;&amp;#039;Node type&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || &amp;#039;&amp;#039;&amp;#039;Terminator&amp;#039;&amp;#039;&amp;#039;. End of hierarchy of scene nodes.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || &amp;#039;&amp;#039;&amp;#039;Open child&amp;#039;&amp;#039;&amp;#039;. The next node is a child of this node.&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || &amp;#039;&amp;#039;&amp;#039;Close child&amp;#039;&amp;#039;&amp;#039;. The next node is not a child of this node, it is a sibling.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || &amp;#039;&amp;#039;&amp;#039;Joint&amp;#039;&amp;#039;&amp;#039;. References a [[#Joint|joint]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || &amp;#039;&amp;#039;&amp;#039;Material&amp;#039;&amp;#039;&amp;#039;. References a [[#Material|material]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || &amp;#039;&amp;#039;&amp;#039;Shape&amp;#039;&amp;#039;&amp;#039;. References a [[#Shape|shape]].&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt16 || &amp;#039;&amp;#039;&amp;#039;Index&amp;#039;&amp;#039;&amp;#039;. An index which references an asset which depends on the node type.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== VTX ==&lt;br /&gt;
The &amp;#039;&amp;#039;VTX&amp;#039;&amp;#039; section (&amp;#039;&amp;#039;&amp;#039;V&amp;#039;&amp;#039;&amp;#039;er&amp;#039;&amp;#039;&amp;#039;T&amp;#039;&amp;#039;&amp;#039;e&amp;#039;&amp;#039;&amp;#039;X&amp;#039;&amp;#039;&amp;#039;) stores the vertex data. It begins with the following structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Char[4] || &amp;#039;&amp;#039;&amp;#039;Section magic&amp;#039;&amp;#039;&amp;#039;. Always &amp;#039;&amp;#039;VTX&amp;#039;&amp;#039; followed by a version in ASCII.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Section size&amp;#039;&amp;#039;&amp;#039; in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || UInt32 || &amp;#039;&amp;#039;&amp;#039;[[#Vertex Attribtue|Vertex attribute]] array offset&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || UInt32 || &amp;#039;&amp;#039;&amp;#039;Position data offset&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Normal data offset&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Normal binormal tangent data offset&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || UInt32[2] || &amp;#039;&amp;#039;&amp;#039;Color data offsets&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || UInt32[8] || &amp;#039;&amp;#039;&amp;#039;UV data offsets&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Vertex Attribute ===&lt;br /&gt;
Each vertex attribute describes how the data for an attribute is stored. The NULL attribute means no more attribute follows. Each entry has the following structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Attribute type&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Component type&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Data format&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Byte || &amp;#039;&amp;#039;&amp;#039;Divisor&amp;#039;&amp;#039;&amp;#039;. If not a color attribute and the format is not float, this specifies the index of the decimal point.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || Byte[3] || &amp;#039;&amp;#039;&amp;#039;Reserved&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
; Attributes&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Position matrix index&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || UV 0 matrix index&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UV 1 matrix index&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || UV 2 matrix index&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UV 3 matrix index&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || UV 4 matrix index&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || UV 5 matrix index&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || UV 6 matrix index&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || UV 7 matrix index&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || Position&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Normal&lt;br /&gt;
|-&lt;br /&gt;
| 0x0B || Color 0&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Color 1&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || UV 0&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E || UV 1&lt;br /&gt;
|-&lt;br /&gt;
| 0x0F || UV 2&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || UV 3&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || UV 4&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || UV 5&lt;br /&gt;
|-&lt;br /&gt;
| 0x13 || UV 6&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || UV 7&lt;br /&gt;
|-&lt;br /&gt;
| 0x15 || Position matrix array&lt;br /&gt;
|-&lt;br /&gt;
| 0x16 || Normal matrix array&lt;br /&gt;
|-&lt;br /&gt;
| 0x17 || UV matrix array&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Light matrix array&lt;br /&gt;
|-&lt;br /&gt;
| 0x19 || Normal binormal tangent&lt;br /&gt;
|-&lt;br /&gt;
| 0xFF || NULL&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
; Position components&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || XY&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || XYZ&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
; Normal components&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Normal&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Normal and binormal and tangent&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Normal or binormal or tangent&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
; Color components&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || RGB&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || RGBA&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
; UV components&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || S&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || ST&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
; Data formats&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Byte&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || SByte&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt16&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Int16&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Float&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
; Color formats&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || RGB565&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || RGB8&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || RGBX8&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || RGBA4&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || RGBA6&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || RGBA8&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== EVP ==&lt;br /&gt;
The &amp;#039;&amp;#039;EVP&amp;#039;&amp;#039; section (&amp;#039;&amp;#039;&amp;#039;E&amp;#039;&amp;#039;&amp;#039;n&amp;#039;&amp;#039;&amp;#039;V&amp;#039;&amp;#039;&amp;#039;elo&amp;#039;&amp;#039;&amp;#039;P&amp;#039;&amp;#039;&amp;#039;e) describes the envelope of the model and stores all weight data. It has the following structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Char[4] || &amp;#039;&amp;#039;&amp;#039;Section magic&amp;#039;&amp;#039;&amp;#039;. Always &amp;#039;&amp;#039;EVP&amp;#039;&amp;#039; followed by a version in ASCII.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Section size&amp;#039;&amp;#039;&amp;#039; in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || UInt16 || &amp;#039;&amp;#039;&amp;#039;Number of weights&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || UInt16 || {{Unknown-left|&amp;#039;&amp;#039;&amp;#039;Unknown&amp;#039;&amp;#039;&amp;#039;.}} &lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || UInt32 || &amp;#039;&amp;#039;&amp;#039;Weight count array offset&amp;#039;&amp;#039;&amp;#039;. Stores the influence count for each weight as a byte.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Bone index offset&amp;#039;&amp;#039;&amp;#039;. Stores the bone indices for each weight as a UInt16.&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Weight offset&amp;#039;&amp;#039;&amp;#039;. Stores the bone weights for each weight as a float.&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Inverse bind matrix offset&amp;#039;&amp;#039;&amp;#039;. Points to an array of 3x4 float matrices.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== DRW ==&lt;br /&gt;
The &amp;#039;&amp;#039;DRW&amp;#039;&amp;#039; section (&amp;#039;&amp;#039;&amp;#039;DR&amp;#039;&amp;#039;&amp;#039;a&amp;#039;&amp;#039;&amp;#039;W&amp;#039;&amp;#039;&amp;#039;) is to identify the type of skinning. It has the following structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Char[4] || &amp;#039;&amp;#039;&amp;#039;Section magic&amp;#039;&amp;#039;&amp;#039;. Always &amp;#039;&amp;#039;DRW&amp;#039;&amp;#039; followed by a version in ASCII.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Section size&amp;#039;&amp;#039;&amp;#039; in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || UInt16 || &amp;#039;&amp;#039;&amp;#039;Number of entries&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || UInt16 || {{Unknown-left|&amp;#039;&amp;#039;&amp;#039;Unknown&amp;#039;&amp;#039;&amp;#039;.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || UInt32 || &amp;#039;&amp;#039;&amp;#039;Matrix type array offset&amp;#039;&amp;#039;&amp;#039;. Points to an array of bytes. Each byte is either joint (0) or envelope (1).&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Index data offset&amp;#039;&amp;#039;&amp;#039;. Points to an array of UInt16s. For matrix type joint each item is an index into a [[#Joint|joint]], for envelope each item is an index into the [[#EVP1|EVP1 section]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== JNT ==&lt;br /&gt;
The &amp;#039;&amp;#039;JNT&amp;#039;&amp;#039; section (&amp;#039;&amp;#039;&amp;#039;J&amp;#039;&amp;#039;&amp;#039;oi&amp;#039;&amp;#039;&amp;#039;NT&amp;#039;&amp;#039;&amp;#039;) specify the joints, also known as bones. It starts with the following structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Char[4] || &amp;#039;&amp;#039;&amp;#039;Section magic&amp;#039;&amp;#039;&amp;#039;. Always &amp;#039;&amp;#039;DRW&amp;#039;&amp;#039; followed by a version in ASCII.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Section size&amp;#039;&amp;#039;&amp;#039; in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || UInt16 || &amp;#039;&amp;#039;&amp;#039;Number of [[#Joint|joints]]&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || UInt16 || {{Unknown-left|&amp;#039;&amp;#039;&amp;#039;Unknown&amp;#039;&amp;#039;&amp;#039;.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || UInt32 || &amp;#039;&amp;#039;&amp;#039;[[#Joint|Joint]] array offset&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Remap table offset&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || UInt32 || &amp;#039;&amp;#039;&amp;#039;String table offset&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Joint ===&lt;br /&gt;
Each joint has the following structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt16 || &amp;#039;&amp;#039;&amp;#039;Flag&amp;#039;&amp;#039;&amp;#039;. xxxx xxxx xxxx xxxx xxxx xxxx &amp;#039;&amp;#039;&amp;#039;AAAB BBBB&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;A&amp;#039;&amp;#039;&amp;#039;: &amp;#039;&amp;#039;&amp;#039;Unknown&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Used for joints who is parent to at least one [[#Shape|shape]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Usually used for joints which are rigged, but sometimes joints with no rigging has this value as well.&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Usually used for joints which are not rigged or parent to any shapes.&lt;br /&gt;
|}&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;B&amp;#039;&amp;#039;&amp;#039;: matrix type:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Standard&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Billboard&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Billboard Y&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Byte || &amp;#039;&amp;#039;&amp;#039;Do not inherit parent scale&amp;#039;&amp;#039;&amp;#039; flag.&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Byte || {{Unknown-left|&amp;#039;&amp;#039;&amp;#039;Unknown&amp;#039;&amp;#039;&amp;#039;.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Float[3] || &amp;#039;&amp;#039;&amp;#039;Scale&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int16[3] || &amp;#039;&amp;#039;&amp;#039;Rotation&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x16 || UInt16 || {{Unknown-left|&amp;#039;&amp;#039;&amp;#039;Unknown&amp;#039;&amp;#039;&amp;#039;.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Float[3] || &amp;#039;&amp;#039;&amp;#039;Translation&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Float || &amp;#039;&amp;#039;&amp;#039;Sphere radius&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Float[3] || &amp;#039;&amp;#039;&amp;#039;Min&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x34 || Float[3] || &amp;#039;&amp;#039;&amp;#039;Max&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== SHP ==&lt;br /&gt;
The &amp;#039;&amp;#039;SHP&amp;#039;&amp;#039; section (&amp;#039;&amp;#039;&amp;#039;SH&amp;#039;&amp;#039;&amp;#039;a&amp;#039;&amp;#039;&amp;#039;P&amp;#039;&amp;#039;&amp;#039;e) contains the shapes and the data needed to render them. It contains raw display lists which is graphics code. The section starts with the following structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Char[4] || &amp;#039;&amp;#039;&amp;#039;Section magic&amp;#039;&amp;#039;&amp;#039;. Always &amp;#039;&amp;#039;SHP&amp;#039;&amp;#039; followed by a version in ASCII.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Section size&amp;#039;&amp;#039;&amp;#039; in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || UInt16 || &amp;#039;&amp;#039;&amp;#039;Number of shapes&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || UInt16 || {{Unknown-left|&amp;#039;&amp;#039;&amp;#039;Unknown&amp;#039;&amp;#039;&amp;#039;.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || UInt32 || &amp;#039;&amp;#039;&amp;#039;[[#Shape|Shape]] array offset&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Remap table offset&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || UInt32 || &amp;#039;&amp;#039;&amp;#039;String table offset&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || UInt32 || &amp;#039;&amp;#039;&amp;#039;[[#Attribute Descriptor|Attribute descriptor]] offset&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || UInt32 || &amp;#039;&amp;#039;&amp;#039;Matrix index table offset&amp;#039;&amp;#039;&amp;#039;. Points to an array of UInt16s which are indices into the [[#DRW|DRW]] section.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Display list offset&amp;#039;&amp;#039;&amp;#039;. Points to the first display list.&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || UInt32 || &amp;#039;&amp;#039;&amp;#039;[[#Matrix Group|Matrix group]] offset&amp;#039;&amp;#039;&amp;#039;. Points to the first [[#Matrix Group|matrix group]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || UInt32 || &amp;#039;&amp;#039;&amp;#039;[[#Display List Packet Info|Display list packet info]] offset&amp;#039;&amp;#039;&amp;#039;. Points to the first [[#Display List Packet Info|display list packet info]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Shape ===&lt;br /&gt;
Each shape contains data used to render it. A shape may be divided into multiple display lists, this is because the GPU only has support for rendering a display list with up to 10 different matrices. Each entry has the following structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Byte || &amp;#039;&amp;#039;&amp;#039;Display flag&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! ID !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Single matrix&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Billboard&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Billboard Y&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Multi matrix&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Byte || {{Unknown-left|&amp;#039;&amp;#039;&amp;#039;Unknown&amp;#039;&amp;#039;&amp;#039;.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt16 || &amp;#039;&amp;#039;&amp;#039;Number of packets&amp;#039;&amp;#039;&amp;#039;. Specifies how many [[#Matrix Group|matrix groups]] and [[#Display List Packet Info|display list packet infos]] to use.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt16 || &amp;#039;&amp;#039;&amp;#039;[[#Attribute Descriptor|Attribute descriptor]] offset&amp;#039;&amp;#039;&amp;#039;, relative to the value in the [[#SHP|header]]. Points to the first [[#Attribute Descriptor|attribute descriptor]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || UInt16 || &amp;#039;&amp;#039;&amp;#039;First [[#Matrix Group|matrix group]] index&amp;#039;&amp;#039;&amp;#039;. Specifies the index of the first [[#Matrix Group|matrix group]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || UInt16 || &amp;#039;&amp;#039;&amp;#039;First [[#Display List Packet Info|display list packet info]] index&amp;#039;&amp;#039;&amp;#039;. Specifies the index of the first [[#Display List Packet Info|display list packet info]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || UInt16 || {{Unknown-left|&amp;#039;&amp;#039;&amp;#039;Unknown&amp;#039;&amp;#039;&amp;#039;.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Float || &amp;#039;&amp;#039;&amp;#039;Sphere radius&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Float[3] || &amp;#039;&amp;#039;&amp;#039;Min&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Float[3] || &amp;#039;&amp;#039;&amp;#039;Max&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Attribute Descriptor ===&lt;br /&gt;
Each attribute descriptor specifies a vertex attribute which is contained in the linked display lists. It has the following structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Vertex attribute&amp;#039;&amp;#039;&amp;#039;. See [[#VTX|VTX]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Index type&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Matrix Group ===&lt;br /&gt;
The matrix group specifies the different matrices which will be loaded into memory and rendered with in a display list. Each entry has the following structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt16 || &amp;#039;&amp;#039;&amp;#039;Single matrix&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt16 || &amp;#039;&amp;#039;&amp;#039;Number of multi matrices&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt32 || &amp;#039;&amp;#039;&amp;#039;First multi matrix index&amp;#039;&amp;#039;&amp;#039;. Index of the first matrix into the [[#SHP|matrix index table]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If single matrix is used, a multi matrix table is set up consisting of the same single matrix. A matrix value of 0xFFFF means that no new matrix should be loaded into that slot. This means that the first matrix group never should contain 0xFFFF, as it will result in undefined data loaded into that matrix slot.&lt;br /&gt;
&lt;br /&gt;
=== Display List Packet Info ===&lt;br /&gt;
The display list packet info specifies the size of a display list, and where it is in the file. Each entry has the following structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Size of display list&amp;#039;&amp;#039;&amp;#039; in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Display list offset&amp;#039;&amp;#039;&amp;#039;, relative to the value specified in the [[#SHP|header]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== MAT ==&lt;br /&gt;
The &amp;#039;&amp;#039;MAT&amp;#039;&amp;#039; section (&amp;#039;&amp;#039;&amp;#039;MAT&amp;#039;&amp;#039;&amp;#039;erial) stores the material and TEV data. All material data is stored in arrays, and are then indexed by the [[#Material Entry|entry]] structures. It begins with the following structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Char[4] || &amp;#039;&amp;#039;&amp;#039;Section magic&amp;#039;&amp;#039;&amp;#039;. Always &amp;#039;&amp;#039;MAT&amp;#039;&amp;#039; followed by a version in ASCII.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Section size&amp;#039;&amp;#039;&amp;#039; in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || UInt16 || &amp;#039;&amp;#039;&amp;#039;Number of materials&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || UInt16 || {{Unknown-left|&amp;#039;&amp;#039;&amp;#039;Unknown&amp;#039;&amp;#039;&amp;#039;.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || UInt32 || &amp;#039;&amp;#039;&amp;#039;[[#Material Entry|Material entry]] array offset&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Remap table offset&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || UInt32 || &amp;#039;&amp;#039;&amp;#039;String table offset&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || UInt32 || &amp;#039;&amp;#039;&amp;#039;[[#Indirect Data|Indirect data]] array offset&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || UInt32 || &amp;#039;&amp;#039;&amp;#039;[[#Cull Mode|Cull mode]] array offset&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Material color array offset&amp;#039;&amp;#039;&amp;#039;. Each entry is a 32-bit color in RGBA format.&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || UInt32 || &amp;#039;&amp;#039;&amp;#039;[[#Lighting Channel|Lighting channel]] count array offset&amp;#039;&amp;#039;&amp;#039;. Each entry is a byte representing the count.&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || UInt32 || &amp;#039;&amp;#039;&amp;#039;[[#Lighting Channel|Lighting channel]] array offset&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C || UInt32 || &amp;#039;&amp;#039;&amp;#039;Ambient color array offset&amp;#039;&amp;#039;&amp;#039;. Each entry is a 32-bit color in RGBA format.&lt;br /&gt;
|-&lt;br /&gt;
| 0x30 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Light color array offset&amp;#039;&amp;#039;&amp;#039;. Each entry is a 32-bit color in RGBA format. Always 0, never observed in files.&lt;br /&gt;
|-&lt;br /&gt;
| 0x34 || UInt32 || &amp;#039;&amp;#039;&amp;#039;[[#Texture Coordinate Generator|Texture coordinate generator]] count array offset&amp;#039;&amp;#039;&amp;#039;. Each entry is a byte representing the count.&lt;br /&gt;
|-&lt;br /&gt;
| 0x38 || UInt32 || &amp;#039;&amp;#039;&amp;#039;[[#Texture Coordinate Generator|Texture coordinate generator]] array offset&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C || UInt32 || &amp;#039;&amp;#039;&amp;#039;Post [[#Texture Coordinate Generator|texture coordinate generator]] array offset&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x40 || UInt32 || &amp;#039;&amp;#039;&amp;#039;[[#Texture Matrix|Texture matrix]] array offset&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x44 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Post [[#Texture Matrix|texture matrix]] array offset&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x48 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Texture index array offset&amp;#039;&amp;#039;&amp;#039;. Each entry is a UInt16 representing an index into the [[#TEX|TEX]] section.&lt;br /&gt;
|-&lt;br /&gt;
| 0x4C || UInt32 || &amp;#039;&amp;#039;&amp;#039;[[#TEV Order|TEV order]] array offset&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x50 || UInt32 || &amp;#039;&amp;#039;&amp;#039;TEV color array offset&amp;#039;&amp;#039;&amp;#039;. Each entry is a 64-bit color in RGBA format, with signed 16-bit components.&lt;br /&gt;
|-&lt;br /&gt;
| 0x54 || UInt32 || &amp;#039;&amp;#039;&amp;#039;TEV constant color array offset&amp;#039;&amp;#039;&amp;#039;. Each entry is a 32-bit color in RGBA format.&lt;br /&gt;
|-&lt;br /&gt;
| 0x58 || UInt32 || &amp;#039;&amp;#039;&amp;#039;[[#TEV Stage|TEV stage]] count array offset&amp;#039;&amp;#039;&amp;#039;. Each entry is a byte representing the count.&lt;br /&gt;
|-&lt;br /&gt;
| 0x5C || UInt32 || &amp;#039;&amp;#039;&amp;#039;[[#TEV Stage|TEV stage]] array offset&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x60 || UInt32 || &amp;#039;&amp;#039;&amp;#039;[[#TEV Swap Mode|TEV swap mode]] array offset&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x64 || UInt32 || &amp;#039;&amp;#039;&amp;#039;[[#TEV Swap Table|TEV swap table]] array offset&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x68 || UInt32 || &amp;#039;&amp;#039;&amp;#039;[[#Fog|Fog]] array offset&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x6C || UInt32 || &amp;#039;&amp;#039;&amp;#039;[[#Alpha Compare|Alpha compare]] array offset&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x70 || UInt32 || &amp;#039;&amp;#039;&amp;#039;[[#Blend Mode|Blend mode]] array offset&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x74 || UInt32 || &amp;#039;&amp;#039;&amp;#039;[[#Z-Mode|Z-mode]] array offset&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x78 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Depth test before texturing array offset&amp;#039;&amp;#039;&amp;#039;. Each entry is a byte.&lt;br /&gt;
|-&lt;br /&gt;
| 0x7C || UInt32 || &amp;#039;&amp;#039;&amp;#039;Dither array offset&amp;#039;&amp;#039;&amp;#039;. Each entry is a byte.&lt;br /&gt;
|-&lt;br /&gt;
| 0x80 || UInt32 || &amp;#039;&amp;#039;&amp;#039;[[#NBT Scale|NBT Scale]] array offset&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Material Entry ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Byte || {{Unknown-left|&amp;#039;&amp;#039;&amp;#039;Unknown&amp;#039;&amp;#039;&amp;#039;. Usually 1 or 4.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Byte || &amp;#039;&amp;#039;&amp;#039;[[#Cull Mode|Cull mode]] index&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Byte || &amp;#039;&amp;#039;&amp;#039;Color channel count index&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Byte || &amp;#039;&amp;#039;&amp;#039;Texture coordinate generator count index&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Byte || &amp;#039;&amp;#039;&amp;#039;TEV Stage count index&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Byte || &amp;#039;&amp;#039;&amp;#039;Depth test before texturing index&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Byte || &amp;#039;&amp;#039;&amp;#039;[[#Z-Mode|Z-mode]] index&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Byte || &amp;#039;&amp;#039;&amp;#039;Dither index&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || UInt16[2] || &amp;#039;&amp;#039;&amp;#039;Material color indices&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || UInt16[4] || &amp;#039;&amp;#039;&amp;#039;[[#Lighting Channel|Lighting channel]] indices&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || UInt16[2] || &amp;#039;&amp;#039;&amp;#039;Ambient color indices&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || UInt16[8] || &amp;#039;&amp;#039;&amp;#039;Light color indices&amp;#039;&amp;#039;&amp;#039;. Never used in files, always 0xFFFF.&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || UInt16[8] || &amp;#039;&amp;#039;&amp;#039;Texture coordinate generator indices&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x38 || UInt16[8] || &amp;#039;&amp;#039;&amp;#039;Post texture coordinate generator indices&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x48 || UInt16[10] || &amp;#039;&amp;#039;&amp;#039;Texture matrix indices&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x5C || UInt16[20] || &amp;#039;&amp;#039;&amp;#039;Post texture matrix indices&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x84 || UInt16[8] || &amp;#039;&amp;#039;&amp;#039;Texture indices&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x94 || UInt16[4] || &amp;#039;&amp;#039;&amp;#039;TEV constant color indices&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x9C || Byte[16] || &amp;#039;&amp;#039;&amp;#039;TEV constant color selections&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0xAC || Byte[16] || &amp;#039;&amp;#039;&amp;#039;TEV constant alpha selections&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0xBC || UInt16[16] || &amp;#039;&amp;#039;&amp;#039;TEV order indices&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0xDC || UInt16[4] || &amp;#039;&amp;#039;&amp;#039;TEV color indices&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0xE4 || UInt16[16] || &amp;#039;&amp;#039;&amp;#039;TEV stage indices&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x104 || UInt16[16] || &amp;#039;&amp;#039;&amp;#039;TEV swap mode indices&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x124 || UInt16[4] || &amp;#039;&amp;#039;&amp;#039;TEV swap mode table indices&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x12C || UInt16[12] || {{Unknown-left|&amp;#039;&amp;#039;&amp;#039;Unknown&amp;#039;&amp;#039;&amp;#039;.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x144 || UInt16 || &amp;#039;&amp;#039;&amp;#039;Fog index&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x146 || UInt16 || &amp;#039;&amp;#039;&amp;#039;Alpha compare index&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x148 || UInt16 || &amp;#039;&amp;#039;&amp;#039;Blend mode index&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x14A || UInt16 || &amp;#039;&amp;#039;&amp;#039;NBT scale index&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Indirect Data ===&lt;br /&gt;
The indirect data structure stores all information related to indirect texturing. Instead of being indexed by each [[#Material Entry|material entry]], all material instances store their own indirect data. Each entry is 0x138 bytes long and has the following structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Byte || &amp;#039;&amp;#039;&amp;#039;Has look-up&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Byte || &amp;#039;&amp;#039;&amp;#039;Number of indirect texture stages&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Byte[2] || &amp;#039;&amp;#039;&amp;#039;Padding&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || [[#Indirect TEV Order|Indirect TEV order]][4] || &amp;#039;&amp;#039;&amp;#039;Indirect TEV orders&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || [[#Indirect Texture Matrix|Indirect texture matrix]][3] || &amp;#039;&amp;#039;&amp;#039;Indirect texture matrices&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x68 || [[#Indirect Texture Scale|Indirect texture scale]][4] || &amp;#039;&amp;#039;&amp;#039;Indirect texture scales&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x78 || [[#Indirect TEV Stage|Indirect TEV stage]][16] || &amp;#039;&amp;#039;&amp;#039;Indirect TEV stages&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Indirect TEV Order ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Byte || &amp;#039;&amp;#039;&amp;#039;Indirect texture coordinate&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Byte || &amp;#039;&amp;#039;&amp;#039;Indirect texture map&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Byte[2] || &amp;#039;&amp;#039;&amp;#039;Padding&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Indirect Texture Matrix ====&lt;br /&gt;
An indirect texture matrix is used for transforming the indirect UV offset. It is constructed from scale, rotation and translation. The matrix is always stored with absolutes of all values being less than one, and the largest absolute value being greater or equal to 0.5. The exponent is then used to transform the data into its real value. Each entry has the following structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Float[2][3] || &amp;#039;&amp;#039;&amp;#039;2x3 indirect texture matrix&amp;#039;&amp;#039;&amp;#039;. Indirect texture matrix with 2 rows and 3 columns.&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || SByte || Base 2 &amp;#039;&amp;#039;&amp;#039;exponent&amp;#039;&amp;#039;&amp;#039;. Value which is multiplied to the matrix.&lt;br /&gt;
|-&lt;br /&gt;
| 0x19 || Byte[3] || Padding.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Indirect Texture Scale ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt32 || Flag. &amp;#039;&amp;#039;&amp;#039;AAAA AAAA BBBB BBBB&amp;#039;&amp;#039;&amp;#039; xxxx xxxx xxxx xxxx:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;A&amp;#039;&amp;#039;&amp;#039;: U scale.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;B&amp;#039;&amp;#039;&amp;#039;: V scale.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Indirect TEV Stage ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Byte || &amp;#039;&amp;#039;&amp;#039;TEV stage&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Byte || &amp;#039;&amp;#039;&amp;#039;Format&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Byte || &amp;#039;&amp;#039;&amp;#039;Bias&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Byte || &amp;#039;&amp;#039;&amp;#039;Indirect matrix selection&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Byte || &amp;#039;&amp;#039;&amp;#039;Wrap U&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Byte || &amp;#039;&amp;#039;&amp;#039;Wrap V&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Byte || &amp;#039;&amp;#039;&amp;#039;Add previous stage&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Byte || &amp;#039;&amp;#039;&amp;#039;Unmodified LOD&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Byte || &amp;#039;&amp;#039;&amp;#039;Alpha&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || Byte[3] || &amp;#039;&amp;#039;&amp;#039;Padding&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Cull Mode ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Cull mode&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Lighting Channel ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Byte || &amp;#039;&amp;#039;&amp;#039;Enable&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Byte || &amp;#039;&amp;#039;&amp;#039;Material color source&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Byte || &amp;#039;&amp;#039;&amp;#039;Light ID&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Byte || &amp;#039;&amp;#039;&amp;#039;Diffuse function&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Byte || &amp;#039;&amp;#039;&amp;#039;Attenuation function&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Byte || &amp;#039;&amp;#039;&amp;#039;Ambient color source&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Byte[2] || &amp;#039;&amp;#039;&amp;#039;Padding&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Texture Coordinate Generator ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Byte || &amp;#039;&amp;#039;&amp;#039;Type&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Byte || &amp;#039;&amp;#039;&amp;#039;Source&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Byte || &amp;#039;&amp;#039;&amp;#039;Matrix source&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Byte || &amp;#039;&amp;#039;&amp;#039;Padding&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Texture Matrix ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Byte || &amp;#039;&amp;#039;&amp;#039;Projection&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Byte || &amp;#039;&amp;#039;&amp;#039;Mapping&amp;#039;&amp;#039;&amp;#039; flag. &amp;#039;&amp;#039;&amp;#039;A&amp;#039;&amp;#039;&amp;#039;xxx &amp;#039;&amp;#039;&amp;#039;B&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;A&amp;#039;&amp;#039;&amp;#039;: texture matrix mode, either Standard (0) or Maya (1).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;B&amp;#039;&amp;#039;&amp;#039;: mapping mode.&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Byte[2] || &amp;#039;&amp;#039;&amp;#039;Padding&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Float[3] || &amp;#039;&amp;#039;&amp;#039;Origin&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Float[2] || &amp;#039;&amp;#039;&amp;#039;Scale&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int16 || &amp;#039;&amp;#039;&amp;#039;Rotation&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1A || Byte[2] || &amp;#039;&amp;#039;&amp;#039;Padding&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Float[2] || &amp;#039;&amp;#039;&amp;#039;Translation&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Float[4][4] || &amp;#039;&amp;#039;&amp;#039;Projection matrix&amp;#039;&amp;#039;&amp;#039;. 4x4 matrix used by certain mapping modes.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== TEV Order ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Byte || &amp;#039;&amp;#039;&amp;#039;Texture coordinate ID&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Byte || &amp;#039;&amp;#039;&amp;#039;Texture map ID&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Byte || &amp;#039;&amp;#039;&amp;#039;Color channel&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Byte || &amp;#039;&amp;#039;&amp;#039;Padding&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== TEV Stage ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Byte || {{Unknown-left|&amp;#039;&amp;#039;&amp;#039;Unknown&amp;#039;&amp;#039;&amp;#039;.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Byte || &amp;#039;&amp;#039;&amp;#039;Color selection A&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Byte || &amp;#039;&amp;#039;&amp;#039;Color selection B&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Byte || &amp;#039;&amp;#039;&amp;#039;Color selection C&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Byte || &amp;#039;&amp;#039;&amp;#039;Color selection D&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Byte || &amp;#039;&amp;#039;&amp;#039;Color operation&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Byte || &amp;#039;&amp;#039;&amp;#039;Color bias&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Byte || &amp;#039;&amp;#039;&amp;#039;Color scale&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Byte || &amp;#039;&amp;#039;&amp;#039;Clamp color&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || Byte || &amp;#039;&amp;#039;&amp;#039;Color destination&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Byte || &amp;#039;&amp;#039;&amp;#039;Alpha selection A&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0B || Byte || &amp;#039;&amp;#039;&amp;#039;Alpha selection B&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Byte || &amp;#039;&amp;#039;&amp;#039;Alpha selection C&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || Byte || &amp;#039;&amp;#039;&amp;#039;Alpha selection D&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E || Byte || &amp;#039;&amp;#039;&amp;#039;Alpha operation&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0F || Byte || &amp;#039;&amp;#039;&amp;#039;Alpha bias&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Byte || &amp;#039;&amp;#039;&amp;#039;Alpha scale&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || Byte || &amp;#039;&amp;#039;&amp;#039;Clamp alpha&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || Byte || &amp;#039;&amp;#039;&amp;#039;Alpha destination&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x13 || Byte || {{Unknown-left|&amp;#039;&amp;#039;&amp;#039;Unknown&amp;#039;&amp;#039;&amp;#039;.}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== TEV Swap Mode ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Byte || &amp;#039;&amp;#039;&amp;#039;Raster selection&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Byte || &amp;#039;&amp;#039;&amp;#039;Texture selection&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Byte[2] || &amp;#039;&amp;#039;&amp;#039;Padding&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== TEV Swap Table ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Byte || &amp;#039;&amp;#039;&amp;#039;Red input&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Byte || &amp;#039;&amp;#039;&amp;#039;Green input&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Byte || &amp;#039;&amp;#039;&amp;#039;Blue input&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Byte || &amp;#039;&amp;#039;&amp;#039;Alpha input&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Fog ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Byte || &amp;#039;&amp;#039;&amp;#039;Type&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Byte || &amp;#039;&amp;#039;&amp;#039;Enabled&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt16 || &amp;#039;&amp;#039;&amp;#039;Center&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Float || &amp;#039;&amp;#039;&amp;#039;Start Z&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Float || &amp;#039;&amp;#039;&amp;#039;End Z&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Float || &amp;#039;&amp;#039;&amp;#039;Near Z&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Float || &amp;#039;&amp;#039;&amp;#039;Far Z&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Fog color&amp;#039;&amp;#039;&amp;#039; in RGBA format.&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || UInt16[10] || &amp;#039;&amp;#039;&amp;#039;Range adjustment table&amp;#039;&amp;#039;&amp;#039;. Values are stored in a [[fixed-point]] format with base 100.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Alpha Compare ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Byte || &amp;#039;&amp;#039;&amp;#039;Compare 0&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Byte || &amp;#039;&amp;#039;&amp;#039;Reference 0&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Byte || &amp;#039;&amp;#039;&amp;#039;Operation&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Byte || &amp;#039;&amp;#039;&amp;#039;Compare 1&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Byte || &amp;#039;&amp;#039;&amp;#039;Reference 1&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Byte[3] || &amp;#039;&amp;#039;&amp;#039;Padding&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Blend Mode ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Byte || &amp;#039;&amp;#039;&amp;#039;Type&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Byte || &amp;#039;&amp;#039;&amp;#039;Source factor&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Byte || &amp;#039;&amp;#039;&amp;#039;Destination factor&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Byte || &amp;#039;&amp;#039;&amp;#039;Operation&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Z-Mode ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Byte || &amp;#039;&amp;#039;&amp;#039;Enable depth test&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Byte || &amp;#039;&amp;#039;&amp;#039;Depth test compare&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Byte || &amp;#039;&amp;#039;&amp;#039;Enable depth update&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Byte || &amp;#039;&amp;#039;&amp;#039;Padding&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== NBT Scale ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Byte || {{Unknown-left|&amp;#039;&amp;#039;&amp;#039;Unknown&amp;#039;&amp;#039;&amp;#039;.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Byte[3] || &amp;#039;&amp;#039;&amp;#039;Padding&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Float[3] || &amp;#039;&amp;#039;&amp;#039;Scale&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== MDL ==&lt;br /&gt;
The &amp;#039;&amp;#039;MDL&amp;#039;&amp;#039; section (&amp;#039;&amp;#039;&amp;#039;M&amp;#039;&amp;#039;&amp;#039;aterial &amp;#039;&amp;#039;&amp;#039;D&amp;#039;&amp;#039;&amp;#039;isplay &amp;#039;&amp;#039;&amp;#039;L&amp;#039;&amp;#039;&amp;#039;ist) contains raw GPU instructions, which was added in BDL. It stores the same data as in the [[#MAT|MAT]] section, but the data is instead stored as GPU instructions. This was presumaly added to speed up material initialization, however the [[#MAT|MAT]] section was not removed. It starts with the following structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Char[4] || &amp;#039;&amp;#039;&amp;#039;Section magic&amp;#039;&amp;#039;&amp;#039;. Always &amp;#039;&amp;#039;MDL&amp;#039;&amp;#039; followed by a version in ASCII.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Section size&amp;#039;&amp;#039;&amp;#039; in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || UInt16 || &amp;#039;&amp;#039;&amp;#039;Number of entries&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || UInt16 || {{Unknown-left|&amp;#039;&amp;#039;&amp;#039;Unknown&amp;#039;&amp;#039;&amp;#039;.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || UInt32 || &amp;#039;&amp;#039;&amp;#039;[[#Instruction Packet|Instruction packet]] array offset&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || UInt32 || &amp;#039;&amp;#039;&amp;#039;[[#Instruction Packet Info|Instruction packet info]] array offset&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || UInt32 || &amp;#039;&amp;#039;&amp;#039;[[#Matrix Source Descriptor|Matrix source descriptor]] array offset&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Unknown array offset&amp;#039;&amp;#039;&amp;#039;. Each entry is a byte, matching the flag in each [[#Material Entry|material entry]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || UInt32 || &amp;#039;&amp;#039;&amp;#039;Remap table offset&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || UInt32 || &amp;#039;&amp;#039;&amp;#039;String table offset&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Instruction Packet ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Packet data offset&amp;#039;&amp;#039;&amp;#039;, relative to the start of this structure.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Size of packet data&amp;#039;&amp;#039;&amp;#039; in bytes.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The packet data consists of BP and XF commands which are sent directly to the GPU.&lt;br /&gt;
&lt;br /&gt;
=== Instruction Packet Info ===&lt;br /&gt;
The packet info contains information about each [[#Instruction Packet|packet]], and specifies where what data is into each [[#Instruction Packet|packet]]. It has the following structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt16 || Channel color offset.&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt16 || Channel control offset.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt16 || Texture coordinate generator offset.&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || UInt16 || Texture offset.&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || UInt16 || TEV offset.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || UInt16 || Pixel offset.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Byte[4] || Padding.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Matrix Source Descriptor ===&lt;br /&gt;
Each matrix source descriptor specifies which texture matrix each texture uses. This value matches the one in each [[#Texture Coordinate Generator|texture coordinate generator]] with unused texture slots are set to identity. It remains unknown why the bitlayout of each value was chosen. Each entry has the following structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt32 || xx&amp;#039;&amp;#039;&amp;#039;AA AAAA BBBB BBCC CCCC DDDD DD&amp;#039;&amp;#039;&amp;#039;xx xxxx:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;A&amp;#039;&amp;#039;&amp;#039;: texture 3 matrix source.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;B&amp;#039;&amp;#039;&amp;#039;: texture 2 matrix source.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039;: texture 1 matrix source.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;D&amp;#039;&amp;#039;&amp;#039;: texture 0 matrix source.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt32 || xxxx xxxx &amp;#039;&amp;#039;&amp;#039;AAAA AABB BBBB CCCC CCDD DDDD&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;A&amp;#039;&amp;#039;&amp;#039;: texture 7 matrix source (presumably).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;B&amp;#039;&amp;#039;&amp;#039;: texture 6 matrix source (presumably).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;C&amp;#039;&amp;#039;&amp;#039;: texture 5 matrix source (presumably).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;D&amp;#039;&amp;#039;&amp;#039;: texture 4 matrix source (presumably).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== TEX ==&lt;br /&gt;
The &amp;#039;&amp;#039;TEX&amp;#039;&amp;#039; section (&amp;#039;&amp;#039;&amp;#039;TEX&amp;#039;&amp;#039;&amp;#039;ture) stores texture data. The textures are stored as [[BTI]] files. It starts with the following structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Char[4] || &amp;#039;&amp;#039;&amp;#039;Section magic&amp;#039;&amp;#039;&amp;#039;. Always &amp;#039;&amp;#039;TEX&amp;#039;&amp;#039; followed by a version in ASCII.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Section size&amp;#039;&amp;#039;&amp;#039; in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || UInt16 || &amp;#039;&amp;#039;&amp;#039;Number of textures&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || UInt16 || {{Unknown-left|&amp;#039;&amp;#039;&amp;#039;Unknown&amp;#039;&amp;#039;&amp;#039;.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || UInt32 || &amp;#039;&amp;#039;&amp;#039;[[BTI]] array offset&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || UInt32 || &amp;#039;&amp;#039;&amp;#039;String table offset&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The header of all [[BTI]] files are stored, and then all image data follows.&lt;br /&gt;
&lt;br /&gt;
= Tools =&lt;br /&gt;
The following tools can handle BMD or BDL files:&lt;br /&gt;
* [https://github.com/Sage-of-Mirrors/SuperBMD/releases SuperBMD]&lt;br /&gt;
&lt;br /&gt;
= See Also =&lt;br /&gt;
* [https://wiki.cloudmodding.com/tww/BMD_and_BDL BMD on wiki.cloudmodding]&lt;br /&gt;
* [https://github.com/LordNed/WindEditor/wiki/BMD-and-BDL-Model-Format LordNed&amp;#039;s BMD documentation]&lt;br /&gt;
&lt;br /&gt;
[[Category:GameCube File Formats]]&lt;br /&gt;
[[Category:Wii File Formats]]&lt;/div&gt;</summary>
		<author><name>Wexos</name></author>
	</entry>
</feed>