<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.lumasworkshop.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Super+Hackio</id>
	<title>Luma&#039;s Workshop - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.lumasworkshop.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Super+Hackio"/>
	<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/wiki/Special:Contributions/Super_Hackio"/>
	<updated>2026-06-04T04:58:38Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=1031</id>
		<title>BMD/BDL (File Format)</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=1031"/>
		<updated>2026-06-01T18:44:35Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: /* Index Buffer Formats */ Note about the matrix types&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:File formats]]&lt;br /&gt;
{{WIP}}&lt;br /&gt;
&lt;br /&gt;
BMD (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;M&#039;&#039;&#039;o&#039;&#039;&#039;d&#039;&#039;&#039;el) and BDL (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;D&#039;&#039;&#039;isplay &#039;&#039;&#039;L&#039;&#039;&#039;ist) are two 3D model formats used in &#039;&#039;Super Mario Galaxy&#039;&#039; and &#039;&#039;Super Mario Galaxy 2&#039;&#039;, among a few other &#039;&#039;Wii&#039;&#039; and &#039;&#039;GameCube&#039;&#039; games, such as &#039;&#039;Super Mario Sunshine&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These two formats hold the same data, except BDL contains an additional set of data which is used for faster rendering speeds.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Super Mario Galaxy&#039;&#039; &amp;amp; &#039;&#039;Super Mario Galaxy 2&#039;&#039; contain J3DLoader versions 21 and 26.&lt;br /&gt;
&lt;br /&gt;
== File Header ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || The magic that tells the game which format this file is. (ASCII)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bmd2&#039;&#039;&#039; for BMD (J3DLoader V21)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bmd3&#039;&#039;&#039; for BMD (J3DLoader v26)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bdl4&#039;&#039;&#039; for BDL (J3DLoader v26)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int32 || The total size of the file&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || The number of chunks present in this file.&amp;lt;br/&amp;gt;&#039;&#039;&#039;8&#039;&#039;&#039; for BMD&amp;lt;br/&amp;gt;&#039;&#039;&#039;9&#039;&#039;&#039; for BDL&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Subversion Header ===&lt;br /&gt;
This part of the header is not used, and can be anything.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || A 4 character value representing the Subversion. Usually SVR3 for SMG/2.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Byte[12] || Twelve bytes of padding. Usually these are &#039;&#039;&#039;0xFF&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== INF1 - Scene Information ==&lt;br /&gt;
The &#039;&#039;&#039;Inf&#039;&#039;&#039;ormation section hosts a hierarchy of Joints, Materials, and Shapes, which are used to render the model.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;INF1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || [[#J3DLoader%20Flags|J3DLoader Flags]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Matrix Group Data Count&amp;lt;br/&amp;gt;Referring to the Matrix Group Data in [[#SHP1_-_Shape_Information|SHP1]]&amp;lt;br/&amp;gt;&amp;lt;small&amp;gt;Stored in a variable by the game, but not used to dictate the actual number of Matrix Groups.&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Vertex Count&amp;lt;br/&amp;gt;Always equals the number of entries in the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;POSITION&amp;quot; [[#Vertex%20Buffer%20Formats|data buffer]]&amp;lt;br/&amp;gt;&amp;lt;small&amp;gt;Stored in a variable by the game, but never used for anything. The game reads Vertex Data directly from the [[#Vertex%20Buffer%20Formats|data buffer]]s without bounds checking.&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Relative offset to the [[#Scene%20Hierarchy|Scene Hierarchy]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== J3DLoader Flags ===&lt;br /&gt;
The J3DLoader contains several flags which affect how models are handled. There are more than what are shown here, however, those must be applied by the game itself in the code.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000000 || No flags applied (TODO: Check if this defaults to basic matrix calculation)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000001 || Use Autodesk Softimage matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000010 || Use Autodesk Maya matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000100 || Use Basic matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000001000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000010000 || UseImmidiateMtx (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000100000 || UsePostTexMtx (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000001000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000010000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000100000000 || NoMatrixTransform (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000001000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000010000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000100000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0001000000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0010000000000000 || DoBdlMaterialCalc&lt;br /&gt;
|-&lt;br /&gt;
| 0b0100000000000000 || NoBdlMaterialPatch - If set, skips the call to &#039;&#039;&#039;J3DModelLoader::readPatchedMaterial&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0b1000000000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
For all BMD files, the game always includes load flags &#039;&#039;Material_PE_Full&#039;&#039;, &#039;&#039;Material_UseIndirect&#039;&#039;, &#039;&#039;UseUniqueMaterials&#039;&#039;, and &#039;&#039;UNKNOWN_21&#039;&#039;.&amp;lt;br/&amp;gt;&lt;br /&gt;
For all BDL files, the game always includes load flags &#039;&#039;Material_UseIndirect&#039;&#039;, and &#039;&#039;UseUniqueMaterials&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;gt; &#039;&#039;Note: Changing the load flags by changing the code doesn&#039;t seem to do much.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Scene Hierarchy ===&lt;br /&gt;
Each model is constructed using a Scene Hierarchy. This simply determines the order of bones (in turn, defining the parent/child relations), material assignments, and Shape assignments.&lt;br /&gt;
&lt;br /&gt;
Each node consists of the following:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt16 || Node Type.&amp;lt;br/&amp;gt;0x00 = Marks the end of the node list&amp;lt;br/&amp;gt;0x01 = Creates a new child of the previous node&amp;lt;br/&amp;gt;0x02 = Finishes the child node and returns ownership to the previous node&amp;lt;br/&amp;gt;0x10 = Joint Assignment node. &amp;quot;Data&amp;quot; holds the Joint ID (index into JNT1)&amp;lt;br/&amp;gt;0x11 = Material assignment. &amp;quot;Data&amp;quot; holds the Material ID (index into MAT3)&amp;lt;br/&amp;gt;0x12 = Shape Assignment. &amp;quot;Data&amp;quot; holds the Shape ID (index into SHP1)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt16 || A Data value. Used by some nodes to index into other chunks. Usage depends on the node type.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The node list is padded to the nearest 32.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== VTX1 - Vertex Data ==&lt;br /&gt;
The &#039;&#039;&#039;V&#039;&#039;&#039;er&#039;&#039;&#039;t&#039;&#039;&#039;e&#039;&#039;&#039;x&#039;&#039;&#039; Data section contains the actual number values used for the properties of the geometry. It also includes the information on how the values are formatted.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;VTX1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int32 || Buffer Format list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || &amp;quot;POSITION&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || &amp;quot;NORMAL&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || &amp;quot;TANGENT&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || &amp;quot;COLOR_0&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Int32 || &amp;quot;COLOR_1&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Int32 || &amp;quot;TEXCOORD_0&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Int32 || &amp;quot;TEXCOORD_1&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Int32 || &amp;quot;TEXCOORD_2&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C || Int32 || &amp;quot;TEXCOORD_3&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x30 || Int32 || &amp;quot;TEXCOORD_4&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x34 || Int32 || &amp;quot;TEXCOORD_5&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x38 || Int32 || &amp;quot;TEXCOORD_6&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C || Int32 || &amp;quot;TEXCOORD_7&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Vertex Buffer Formats ===&lt;br /&gt;
Each of the Buffers in this section have a format descriptor. This allows different types of data storage, allowing for smaller files.&lt;br /&gt;
&lt;br /&gt;
Each format descriptor contains an Attribute Target, a Component Count, a Data Type, and a Mantissa shifter (to allow floats to be stored as smaller datatypes compared to FLOAT).&amp;lt;br/&amp;gt;Only one descriptor can exist for each attribute.&lt;br /&gt;
&lt;br /&gt;
The Attribute Target tells the game what this buffer is used for.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Attribute Targets&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000009 || POSITION || This buffer represents the positions of vertices in the model. Basically required for all visual models.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000A || NORMAL || This buffer represents vertex normals, used for the engine&#039;s vertex shading. Not needed if no material requires it.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000B || COLOR_0 || This buffer is available for Vertex Colors.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000C || COLOR_1 || This buffer is available for Vertex Colors.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000D || TEXCOORD_0 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000E || TEXCOORD_1 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000F || TEXCOORD_2 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000010 || TEXCOORD_3 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000011 || TEXCOORD_4 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000012 || TEXCOORD_5 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000013 || TEXCOORD_6 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000014 || TEXCOORD_7 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000019 || TANGENT || &#039;&#039;Currently unknown exactly what goes in here.&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x000000FF || List End || A buffer using this target will end the descriptor list.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The component count tells the game how many parts of the component that there are. Note that the values are considered based on the attribute target they&#039;re assigned to.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Component Count&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || POSITION_XY || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || POSITION_XYZ || Represents a position in 3D space with 3 values: X, Y, and Z.&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || NORMAL_XYZ || Represents a normal vector in 3D space with 3 values: X, Y, and Z.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || NORMAL_NBT || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || NORMAL_NBT3 || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || COLOR_RGB || Represents a color value with only Red, Green, and Blue values.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || COLOR_RGBA || Represents a color value with Red, Green, Blue, and Alpha values.&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || TEXCOORD_S || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || TEXCOORD_ST || Represents a UV texture coordinate with 2 values: X and Y.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Data Type tells the game how many bytes each value is, in the sense that an Int32 is 4 bytes, a Int16 is 2 bytes, a Float is 4 bytes, etc.&amp;lt;br/&amp;gt;Note that the Color values have a different set of options.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Data Types&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || UInt8 || 1 byte per value (0 to 255)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || Int8 || 1 byte per value (-128 to 127)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || UInt16 || 2 bytes per value (0 to 65535)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || Int16 || 2 bytes per value (-32,768 to 32,767)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || Float || 4 bytes per value&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || RGB565 || 2 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || RGB8 || 3 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || RGBX8 || 3 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || RGBA4 || 2 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || RGBA6 || 4 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000005 || RGBA8 || 4 bytes per color&lt;br /&gt;
|}&lt;br /&gt;
&amp;gt; &#039;&#039;Note: Both games require colors to be 4 bytes wide at all times, so changing from RGBA8 is worthless.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== EVP1 - Skinning Envelopes ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;EVP1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Envelopes stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Envelope Size Table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Envelope Joint Index Table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Envelope Weight Table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || Inverse Bind Matrix Table offset&lt;br /&gt;
|}&lt;br /&gt;
This section is padded to the nearest 32.&lt;br /&gt;
&lt;br /&gt;
=== Envelope Size Table ===&lt;br /&gt;
This table simply consists of an array of UInt8, where each value dictates how many entries are in a given Envelope.&lt;br /&gt;
&lt;br /&gt;
=== Envelope Joint Index Table ===&lt;br /&gt;
This table consists of the actual [[#JNT1_-_Joint_Hierarchy|JNT1]] index values. Each value is a UInt16, and are ordered directly based on the Envelope Size Table. (The first Envelope&#039;s values come directly after each other, then the second envelope&#039;s values, etc.)&lt;br /&gt;
&lt;br /&gt;
=== Envelope Weight Table ===&lt;br /&gt;
This table consists of joint weighting values which determine how much of an effect the given Joint Index has on this envelope. Each value is a Float, and are ordered directly based on the Envelope Size Table. (The first Envelope&#039;s values come directly after each other, then the second envelope&#039;s values, etc.)&lt;br /&gt;
&lt;br /&gt;
This table ends with padding to the nearest 4th byte so the Floats that come after are aligned correctly.&lt;br /&gt;
&lt;br /&gt;
=== Inverse Bind Matrix Table ===&lt;br /&gt;
This table contains Inverse Bind Matrices for each joint in [[#JNT1_-_Joint_Hierarchy|JNT1]]. The EVP1 section itself contains no size of this table, but the number of Inverse Bind Matrices is always equal to the amount of Joints in the model.&amp;lt;br/&amp;gt;Each entry is a 3 Row 4 Column Matrix (Mtx34), and is stored as 3 Vector4 values.&lt;br /&gt;
&lt;br /&gt;
== DRW1 - Skinning Assignments ==&lt;br /&gt;
This section contains a map which redirects skinning information to the correct location: either JNT1 (Single Matrix) or EVP1 (Multi-Matrix)&amp;lt;br/&amp;gt;The Destination Type list and Destination ID list must be equal in length.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;DRW1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Entries stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Destination Type list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Destination ID list offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Destination Type List ===&lt;br /&gt;
This is an array of bytes that dictates the destination type. It is ordered so that all the &#039;&#039;&#039;Joint&#039;&#039;&#039;s come first, and all the &#039;&#039;&#039;Envelope&#039;&#039;&#039;s second.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Joint || Redirects to a Joint within [[#JNT1_-_Joint_Hierarchy|JNT1]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Envelope || Redirects to an Envelope in [[#EVP1_-_Skinning_Envelopes|EVP1]]&lt;br /&gt;
|}&lt;br /&gt;
It&#039;s worth noting that Nintendo&#039;s development tools had a bug in it where all the &#039;&#039;&#039;Envelope&#039;&#039;&#039; entries were duplicated. Some JSystem games do not care about this, but certain games try to explicitly ignore this data, and therefore require the wasteful duplicate data.&lt;br /&gt;
&lt;br /&gt;
=== Destination ID List ===&lt;br /&gt;
This is an array of UInt16 that simply dictate an index into the provided section.&lt;br /&gt;
&lt;br /&gt;
DRW1 ends with padding to the nearest 32.&lt;br /&gt;
&lt;br /&gt;
== JNT1 - Joint Hierarchy ==&lt;br /&gt;
The &#039;&#039;&#039;J&#039;&#039;&#039;oi&#039;&#039;&#039;nt&#039;&#039;&#039; Hierarchy section defines the rigging skeleton of a model. There can only be one skeleton per model.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;JNT1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Joints stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Joint Data table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Remap table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Name table offset&amp;lt;br/&amp;gt;&amp;lt;small&amp;gt;0 if not present.&amp;lt;/small&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Joint Data ===&lt;br /&gt;
Each joint includes positional data and a bounding box which is used by the game for determining rendering range automatically.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int16 || Matrix Type&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || UInt8 || Parent Scale inheritance&amp;lt;br/&amp;gt;0 = Follow parent joint&#039;s scale&amp;lt;br/&amp;gt;1 = Ignore parent joint&#039;s scale&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt8 || Padding (0xFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Float || Scale X&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Float || Scale Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Float || Scale Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int16 || Rotation X&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || Int16 || Rotation Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int16 || Rotation Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x16 || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Float || Translation X&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Float || Translation Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Float || Translation Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Float || Bounding Sphere&amp;lt;br/&amp;gt;Should encapsulate all vertices that the joint affects&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Float || Bounding Box Minimum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C || Float || Bounding Box Minimum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x30 || Float || Bounding Box Minimum Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x34 || Float || Bounding Box Maximum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x38 || Float || Bounding Box Maximum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C || Float || Bounding Box Maximum Z&lt;br /&gt;
|}&lt;br /&gt;
Rotation is stored between -0x7FFF and 0x7FFF, which ranges -180 degrees and 180 degrees.&lt;br /&gt;
&lt;br /&gt;
== SHP1 - Shape Information==&lt;br /&gt;
The &#039;&#039;&#039;Sh&#039;&#039;&#039;a&#039;&#039;&#039;p&#039;&#039;&#039;e Information section determines how to use the data in the [[#VTX1_-_Vertex_Data|VTX1]] section to create shapes.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;SHP1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Shapes stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Shape Init Data offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Remap table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Name table offset&amp;lt;br/&amp;gt;&amp;lt;small&amp;gt;0 if not present, which it usually isn&#039;t.&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || Vertex Index Attribute table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Int32 || Weight Index table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Int32 || Primitive Data offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Int32 || Matrix Group Data offset (entry count must equal the entry count of the GXDisplayList group table)&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Int32 || Matrix Group Definition table offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Shape Data ===&lt;br /&gt;
Each shape denotes a Matrix Calculation type, which is used for Billboarding, as well as multi-joint skinning.&amp;lt;br/&amp;gt;A shape also hosts a collection of Matrix Groups. If the geometry needs to be weighted to more than 10 [[#DRW1_-_Skinning_Assignments|DRW1]] matrices, more than one Matrix Group is needed.&amp;lt;br/&amp;gt;A single Matrix Group can have multiple Primitives in it, but these Primitives must share the same set of [[#DRW1_-_Skinning_Assignments|DRW1]] matrices.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;TODO: Figure out what happens in the event that more than 10 are needed (such as one vertex being weighted to 11 bones). Is it just straight up not allowed?&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt8 || Matrix Type&lt;br /&gt;
&lt;br /&gt;
* 0 = Single Joint&lt;br /&gt;
&lt;br /&gt;
* 1 = Billboard Joint&lt;br /&gt;
&lt;br /&gt;
* 2 = Billboard Joint (Y axis only)&lt;br /&gt;
&lt;br /&gt;
* 3 = Multiple Joints&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || UInt8 || Padding (0xFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Int16 || Matrix Group count&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int16 || Vertex Index Attribute offset&amp;lt;br/&amp;gt;Relative to the Vertex Index Attribute Table offset defined in SHP1&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Int16 || Matrix Group Data index&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || First Matrix Group Definition index&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Float || Bounding Sphere&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Float || Bounding Box Minimum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Float || Bounding Box Minimum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Float || Bounding Box Minimum Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Float || Bounding Box Maximum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Float || Bounding Box Maximum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Float || Bounding Box Maximum Z&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Vertex Index Attribute Table ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int32 || An [[#Index%20Buffer%20Formats|index buffer]] attribute target&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || An [[#Index%20Buffer%20Formats|index buffer]] type&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Index Buffer Formats ====&lt;br /&gt;
Each of the Buffers in this section have a format descriptor. This allows different types of data storage, allowing for smaller files.&lt;br /&gt;
&lt;br /&gt;
These attributes line up with either a direct value that is stored in the shape, or an index into a [[#VTX1_-_Vertex_Data|VTX1]] [[#Vertex%20Buffer%20Formats|data buffer]].&amp;lt;br/&amp;gt;Only one indexer can exist for each attribute.&lt;br /&gt;
&lt;br /&gt;
The Attribute Target tells the game what this index buffer is used for.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Attribute Targets&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || POSITION_MATRIX || This is a direct list of indices into the Matrix Group&#039;s Weight collection. Required for Shapes that use Multiple Joint skinning.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || TEXTURE_0_MATRIX || &#039;&#039;Uses the Direct type. Seems to break models that use it, and no official models in either galaxy game use it.&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || TEXTURE_1_MATRIX || &#039;&#039;Uses the Direct type. Seems to break models that use it, and no official models in either galaxy game use it.&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || TEXTURE_2_MATRIX || &#039;&#039;Uses the Direct type. Seems to break models that use it, and no official models in either galaxy game use it.&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || TEXTURE_3_MATRIX || &#039;&#039;Uses the Direct type. Seems to break models that use it, and no official models in either galaxy game use it.&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000005 || TEXTURE_4_MATRIX || &#039;&#039;Uses the Direct type. Seems to break models that use it, and no official models in either galaxy game use it.&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000006 || TEXTURE_5_MATRIX || &#039;&#039;Uses the Direct type. Seems to break models that use it, and no official models in either galaxy game use it.&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000007 || TEXTURE_6_MATRIX || &#039;&#039;Uses the Direct type. Seems to break models that use it, and no official models in either galaxy game use it.&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000008 || TEXTURE_7_MATRIX || &#039;&#039;Uses the Direct type. Seems to break models that use it, and no official models in either galaxy game use it.&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000009 || POSITION || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;POSITION&amp;quot; buffer. Required.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000A || NORMAL || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;NORMAL&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000B || COLOR_0 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;COLOR_0&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000C || COLOR_1 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;COLOR_1&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000D || TEXCOORD_0 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_0&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000E || TEXCOORD_1 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_1&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000F || TEXCOORD_2 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_2&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000010 || TEXCOORD_3 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_3&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000011 || TEXCOORD_4 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_4&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000012 || TEXCOORD_5 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_5&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000013 || TEXCOORD_6 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_6&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000014 || TEXCOORD_7 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_7&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000019 || TANGENT || &#039;&#039;This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TANGENT&amp;quot; buffer, but we don&#039;t yet know what that buffer does.&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x000000FF || List End || A buffer using this target will end the descriptor list.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Data Type of an Index Buffer determines the size of each Index. Direct Buffers can only be 1 byte per value.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Data Types&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || None || Only used for the List End&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || Direct || 1 byte per value. Only used for data that is not stored within [[#VTX1_-_Vertex_Data|VTX1]]&amp;lt;br/&amp;gt;Needs to be divided by 3 for some reason...&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || UInt8 || 1 byte per value (0 to 255). Indexes a buffer in [[#VTX1_-_Vertex_Data|VTX1]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || UInt16 || 2 bytes per value (0 to 65535). Indexes a buffer in [[#VTX1_-_Vertex_Data|VTX1]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Primitive Data ===&lt;br /&gt;
This chunk contains raw primitives. These are what hold the index buffers.&amp;lt;br/&amp;gt;The Index Buffers are ordered the same way the Index Buffer Attributes are ordered. For example, POSITION (UInt16), NORMAL (UInt16), COLOR_0 (UInt8), TEXCOORD_0 (UInt16), would result in the following byte structure: &#039;&#039;&#039;PPPP NNNN C0 TXC0&#039;&#039;&#039;&amp;lt;br/&amp;gt;This repeats for each vertex in the primitive.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Uint8 || Primitive Type&lt;br /&gt;
&lt;br /&gt;
* 0x80 = Individual Quads&lt;br /&gt;
&lt;br /&gt;
* 0x90 = Individual Triangles&lt;br /&gt;
&lt;br /&gt;
* 0x98 = Triangle Strip&lt;br /&gt;
&lt;br /&gt;
* 0xA0 = Triangle Fan&lt;br /&gt;
&lt;br /&gt;
* 0xA8 = Individual Lines&lt;br /&gt;
&lt;br /&gt;
* 0xB0 = Line Strip&lt;br /&gt;
&lt;br /&gt;
* 0xB8 = Individual Points&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;TODO: Figure out if Quads, Lines, Line Strips, and Points work.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;small&amp;gt;TODO: Figure out if &amp;quot;Quad Strips&amp;quot; exist at 0x88.&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int16 || Vertex Count&lt;br /&gt;
|}&lt;br /&gt;
Each Matrix Group&#039;s primitive collection MUST be padded to the nearest 32. The game dies if you don&#039;t.&lt;br /&gt;
&lt;br /&gt;
=== Matrix Group Definition Table ===&lt;br /&gt;
This table defines a list of Matrix Groups for each Shape. A Shape can have multiple Matrix Groups, but only stores the index of the first one. This means that all the Matrix Groups for a given Shape must come directly one after another.&amp;lt;br/&amp;gt;It contains only two values: The size of all Primitive Data within this group, and an offset to the first Primitive (relative to the Primitive Data offset defined in SHP1).&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int32 || Primitive Data size&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || First Primitive offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Matrix Group Data Table ===&lt;br /&gt;
This table contains definitions of sub-segments inside the Weight Index Table. How these values are used differs based on the shape matrix calculation type, but official files generally set both usages up correctly regardless.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int16 || [[#DRW1_-_Skinning_Assignments|DRW1]] Matrix ID&amp;lt;br/&amp;gt;This is only used with Single Joint shape matrix calculation.&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Int16 || Matrix Count&amp;lt;br/&amp;gt;This is only used with Multiple Joint shape matrix calculation.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || Starting Weight Index&amp;lt;br/&amp;gt;This is only used with Multiple Joint shape matrix calculation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Weight Index Table ===&lt;br /&gt;
This table contains several indices into [[#DRW1_-_Skinning_Assignments|DRW1]].&amp;lt;br/&amp;gt;Each index is a Signed 16 value.&amp;lt;br/&amp;gt;The values may also contain 0xFFFF, which indicates that the last used index should be used instead.&amp;lt;br/&amp;gt;Matrix Groups can select a segment of these indices (up to 10) for use. A Matrix Group must not start with 0xFFFF.&lt;br /&gt;
&lt;br /&gt;
== MAT2 - Material List (Old) ==&lt;br /&gt;
Technically supported by the game, but not known to be used by any model.&lt;br /&gt;
&lt;br /&gt;
== MAT3 - Material List ==&lt;br /&gt;
Contains information for &#039;&#039;&#039;Mat&#039;&#039;&#039;erials to fill the rendered geometry with.&lt;br /&gt;
&lt;br /&gt;
== MDL3 - Display List ==&lt;br /&gt;
Contains raw material GX opcodes to speed up rendering.&lt;br /&gt;
&lt;br /&gt;
== TEX1 - Texture Data ==&lt;br /&gt;
The &#039;&#039;&#039;Tex&#039;&#039;&#039;ture Information section holds several embedded [[BTI_(File_Format)|BTI]] files that [[#MAT3_-_Material_List|MAT3]] can reference by index for texture assignment.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;TEX1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of [[BTI_(File_Format)|BTI]] files stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || [[BTI_(File_Format)|BTI]] Header Table Offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Name table offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The texture data locations are defined by the [[BTI_(File_Format)|BTI]] headers (which themselves are located directly one after another at the Header Table)&amp;lt;br/&amp;gt;&lt;br /&gt;
This structure allows multiple textures that have the same visual data to have their headers point to just one block of visual data. In other words, two identical textures can be &amp;quot;compressed&amp;quot; into one while still having their own properties (wrapping, filtering, etc.)&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=Cutscenes&amp;diff=1028</id>
		<title>Cutscenes</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=Cutscenes&amp;diff=1028"/>
		<updated>2026-04-30T18:05:46Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: tools&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Files]]&lt;br /&gt;
[[Category:Lists]]&lt;br /&gt;
{{WIP}}&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;&#039;Todo:&#039;&#039;&#039;&lt;br /&gt;
*Finish the hardcoded cutscene names.&lt;br /&gt;
*More info and research on the use of canm and supported objects.&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Cutscenes are flexible, complex scenes, which can execute more freedom in contrast to the SimpleDemoExecutor.&lt;br /&gt;
These scenes consist of individual sequences that are played in order. In each sequence, several actions can be executed from certain frames, such as changing the player&#039;s position, camera movements, sound effects, and more. To each sequence (and subsequence) different actions are linked, which are then executed at the time of this sequence.&lt;br /&gt;
&lt;br /&gt;
You can best visualize this in a kind of timeline. The timeline consists of the individual sequences, which consist of several actions. At the same time single subscequences can be executed together with the actual sequences.&lt;br /&gt;
&lt;br /&gt;
==Structure==&lt;br /&gt;
[[File:Cutscene_Visual-Representation.png|thumb|A visual representation of the first Yoshi Meets cutscene.]]&lt;br /&gt;
A cutscene is activated by a demo object via SW_APPEAR within the map and loads several sheet BCSV files located in the demo.arc archive of the respective galaxy/zone. The demo object loads the bcsv files using its defined sheet name and additional &amp;quot;Demo&amp;quot; in front of the file name of the BSCV attached and a respective sheet type at the end of the file name (e.g. &#039;&#039;&#039;Demo&#039;&#039;&#039;AfterGameOver&#039;&#039;&#039;Time&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
In addition, the demo object has its own cutscene name, which is only used in certain cases (e.g. to load certain sequences for [[Starship Mario]]) and also for camera codes. Certain names can be recognized by the game and then loads additional hardcoded settings such as behavior after scene completion. A list of these names [[Cutscenes#Hardcoded_Cutscene_Names|can be found below]].&lt;br /&gt;
&lt;br /&gt;
Objects other than the player object itself can be linked to the cutscene. These then use a cutscene group ID, which on the one hand must match the demo object ID and on the other hand must be entered in the action sheet together with the object&#039;s name. If the object is entered in the [[ObjNameTable]], the name from the Japanese column must be entered instead.&lt;br /&gt;
&lt;br /&gt;
If there are several identical objects that are part of a cutscene, you can also define a cast group id for one specific object to distinguish it from the other identical objects for the scene.&lt;br /&gt;
&lt;br /&gt;
===Time===&lt;br /&gt;
Defines the individual sequences with their names and length. They are played in the order they are in the list.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Field Name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| PartName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Name of the sequence&lt;br /&gt;
|-&lt;br /&gt;
| TotalStep&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| Duration of the sequence in frames&lt;br /&gt;
|-&lt;br /&gt;
| SuspendFlag&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| If set to 1, pauses the cutscene and resumes gameplay. The cutscene will continue from here next time it is activated.&lt;br /&gt;
|-&lt;br /&gt;
| WaitUserInputFlag&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===SubPart===&lt;br /&gt;
Runs additional subsequences in parallel during a sequence.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Field Name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| SubPartName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Name of the sub sequence&lt;br /&gt;
|-&lt;br /&gt;
| SubPartTotalStep&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| The length of the sub sequence&lt;br /&gt;
|-&lt;br /&gt;
| MainPartName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Name of the main sequence this sub sequence belongs to&lt;br /&gt;
|-&lt;br /&gt;
| MainPartStep&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| The frame of the main sequence this sub sequence starts at&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Action===&lt;br /&gt;
Picks up objects and can position them to a given GeneralPos and play an animation.&lt;br /&gt;
&lt;br /&gt;
All animation types are supported. For more control you can use [[ActorInfo#ActorInfo|ActorAnimCtrl.bcsv]] for your objects to define multiple animation names of different animation types to the animation name defined in the cutscene. &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Field Name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| PartName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Sequence Name&lt;br /&gt;
|-&lt;br /&gt;
| CastName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Name of the target object. Either Japanese name defined in [[ObjNameTable]], or &#039;&#039;ModelName&#039;&#039; defined in [[ProductMapObjDataTable]].&lt;br /&gt;
|-&lt;br /&gt;
| CastID&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| Optional Cast ID of the target object. -1 = Deactivated.&amp;lt;br&amp;gt;&lt;br /&gt;
To target a specific object among identical objects that are part of the cutscene.&lt;br /&gt;
|-&lt;br /&gt;
| ActionType&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| Pick an Action Type from the table below.&lt;br /&gt;
|-&lt;br /&gt;
| PosName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Name of the GeneralPos object for destination location&lt;br /&gt;
|-&lt;br /&gt;
| AnimName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Name of the animation, which can be loaded either from the ARC archive object or from a separate ARC archive with the additional name &amp;quot;Anim&amp;quot;.&lt;br /&gt;
|}&lt;br /&gt;
====Action Types====&lt;br /&gt;
Note that these action types are not available for any object that registers as a &amp;quot;Simple Demo Cast&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===== SMG1 =====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! ID !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Apppear || Makes the object Appear.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Kill || Makes the object Disappear (using it&#039;s Kill function).&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Special Function || Executes a function that the object specifically registered to the cutscene. This is object specific, and not every object has one.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Special Nerve || Sets the objects Nerve to a nerve specifically registered to the cutscene. This is object specific, and not every object has one.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || On SW_A || The SW_A of this object will be activated.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || On SW_B || The SW_B of this object will be activated.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || Show Model || The model of the object will be unhidden.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || Hide Model || The model of the object will be hidden.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Start NPC Message || Start a conversation with an NPC. Effectively useless because NPC&#039;s do not register their text to cutscenes unless the cutscene has a specific name.&lt;br /&gt;
|-&lt;br /&gt;
| 9 || Start NPC Message (Alt) || Start a conversation with an NPC without stopping Mario&#039;s current animation. Effectively useless because NPC&#039;s do not register their text to cutscenes unless the cutscene has a specific name.&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Duplicate of 9 || Duplicate of 9.&lt;br /&gt;
|-&lt;br /&gt;
| 11 || Play Animation || Plays the animation that &amp;quot;AnimName&amp;quot; is set to. This happens for all Action Types.&lt;br /&gt;
|-&lt;br /&gt;
| 12 || Off SW_A || The SW_A of this object will be deactivated.&lt;br /&gt;
|-&lt;br /&gt;
| 13 || Off SW_B || The SW_B of this object will be deactivated.&lt;br /&gt;
|}&lt;br /&gt;
===== SMG2 =====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! ID !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Play Animation || Plays the animation that &amp;quot;AnimName&amp;quot; is set to. This happens for all Action Types.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Apppear || Makes the object Appear.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Kill || Makes the object Disappear (using it&#039;s Kill function).&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Special Function || Executes a function that the object specifically registered to the cutscene. This is object specific, and not every object has one.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Special Nerve || Sets the objects Nerve to a nerve specifically registered to the cutscene. This is object specific, and not every object has one.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || On SW_A || The SW_A of this object will be activated.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || On SW_B || The SW_B of this object will be activated.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || Show Model || The model of the object will be unhidden.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Hide Model || The model of the object will be hidden.&lt;br /&gt;
|-&lt;br /&gt;
| 9 || Start NPC Message || Start a conversation with an NPC. Effectively useless because NPC&#039;s do not register their text to cutscenes unless the cutscene has a specific name.&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Start NPC Message (Alt) || Start a conversation with an NPC without stopping Mario&#039;s current animation. Effectively useless because NPC&#039;s do not register their text to cutscenes unless the cutscene has a specific name.&lt;br /&gt;
|-&lt;br /&gt;
| 11 || Duplicate of 10 || Duplicate of 10.&lt;br /&gt;
|-&lt;br /&gt;
| 12 || Off SW_A || The SW_A of this object will be deactivated.&lt;br /&gt;
|-&lt;br /&gt;
| 13 || Off SW_B || The SW_B of this object will be deactivated.&lt;br /&gt;
|-&lt;br /&gt;
| 14 || Request Movement Off || Tries to pause execution of this object.&lt;br /&gt;
|-&lt;br /&gt;
| 15 || Request Movement On || Tries to resume execution of this object.&lt;br /&gt;
|-&lt;br /&gt;
| 16 || StoryBookWarpDemo || Unknown. Related to StoryBookWarpDemo. Uses 1 as arg.&lt;br /&gt;
|-&lt;br /&gt;
| 17 || StoryBookWarpDemo || Unknown. Related to StoryBookWarpDemo. Uses 0 as arg.&lt;br /&gt;
|-&lt;br /&gt;
| 18 || StoryBookWarpDemo || Unknown. Related to StoryBookWarpDemo.&lt;br /&gt;
|-&lt;br /&gt;
| 19 || StoryBookWarpDemo || Unknown. Related to StoryBookWarpDemo.&lt;br /&gt;
|-&lt;br /&gt;
| 20 || ? || Unknown. Used at the end of the cutscene where Mario meets Yoshi for the first time.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Player===&lt;br /&gt;
Can position Mario/Luigi to a specific GeneralPos and play an animation.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Field Name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| PartName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Name of the sequence&lt;br /&gt;
|-&lt;br /&gt;
| PosName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Name of the GeneralPos to teleport the player to&lt;br /&gt;
|-&lt;br /&gt;
| BckName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Name of the animation from /ObjectData/MarioAnime.arc to play. (All other animationtypes than BCK are also supported)&lt;br /&gt;
|-&lt;br /&gt;
| Visible&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Camera===&lt;br /&gt;
Can play cameras, which can be played one after another. Can use either a camera code from the Map archive&#039;s [[Cameras|CameraParam.bcam]] file, or a key frame camera animation which are controlled via [[CANM]] files, which must be located in the object archive of the targeted object.&amp;lt;/br&amp;gt;&lt;br /&gt;
By default the camera is fixed on Mario/Luigi.&amp;lt;/br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For BCAM usage, the Camera ID name to be used is composed of the &#039;&#039;PartName&#039;&#039; and the &#039;&#039;Cutscenename&#039;&#039; (not the sheet name): &#039;&#039;&#039;e:&amp;lt;small&amp;gt;Cutscenename&amp;lt;/small&amp;gt;[&amp;lt;small&amp;gt;PartName&amp;lt;/small&amp;gt;]&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
For CANM usage, the name defined in &#039;&#039;AnimCameraName&#039;&#039; must match the CANM file&#039;s name and needs to be placed in the root of the targeted object&#039;s archive.&amp;lt;/br&amp;gt;&lt;br /&gt;
Seems to be supported only by certain objects. This has not yet been fully explored.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Field Name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| PartName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Name of the sequence&lt;br /&gt;
|-&lt;br /&gt;
| CameraTargetName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Japanese Name of the object the camera is focused to. (Primarily uses ObjNameTable names)&lt;br /&gt;
|-&lt;br /&gt;
| CameraTargetCastID&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| Cast ID of the object&lt;br /&gt;
|-&lt;br /&gt;
| AnimCameraName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| CANM file name (&amp;quot;.canm&amp;quot; extension optional) which must be placed in the root of the targeted object&#039;s archive.&lt;br /&gt;
|-&lt;br /&gt;
| AnimCameraStartFrame&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| The part frame to begin the camera on. -1 will have the camera interpolate to the start of the CANM&lt;br /&gt;
|-&lt;br /&gt;
| AnimCameraEndFrame&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| IsContinuous&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Sound===&lt;br /&gt;
Can change music and play sound effects.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Field Name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| PartName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Name of the sequence&lt;br /&gt;
|-&lt;br /&gt;
| Bgm&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| [[List_of_Music|Name of the music]] to play.&lt;br /&gt;
|-&lt;br /&gt;
| SystemSe&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| [[List_of_Sounds_(SMG2)|Name of the soundeffect]] to play. &lt;br /&gt;
|-&lt;br /&gt;
| ActionSe&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| ReturnBgm&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BgmWipeoutFrame&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| Duration in frames for fading out the music. -1 = No fade-out&lt;br /&gt;
|-&lt;br /&gt;
| AllSoundStopFrame&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Wipe===&lt;br /&gt;
Can perform a fade out animation.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Field Name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| PartName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Name of the sequence&lt;br /&gt;
|-&lt;br /&gt;
| WipeName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| The wipe to use. See the [[#WipeName|WipeName]] table below.&lt;br /&gt;
|-&lt;br /&gt;
| WipeType&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| The function for the Wipe to perform. See the [[#WipeType|WipeType]] table below.&lt;br /&gt;
|-&lt;br /&gt;
| WipeFrame&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| The amount of frames that the wipe will move for. Higher values = Slower movement&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====WipeName====&lt;br /&gt;
Below is a list of available WipeName values:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 円ワイプ || Circle Wipe&lt;br /&gt;
|-&lt;br /&gt;
| フェードワイプ || Black Fade&lt;br /&gt;
|-&lt;br /&gt;
| 白フェードワイプ || White Fade&lt;br /&gt;
|-&lt;br /&gt;
| ゲームオーバー || Game Over&lt;br /&gt;
|-&lt;br /&gt;
| クッパ || Bowser Face (Death wipe)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: The Mario wipe is missing because the Mario wipe is a System Wipe and not a Scene Wipe. DemoWipes can only be Scene Wipes.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====WipeType====&lt;br /&gt;
Below is the list of Wipe functions. The table below uses the Black Fade as an example.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Open Wipe (Fade to Gameplay)&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Close Wipe (Fade to Black)&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Force Open Wipe (Cut to Gameplay)&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Force Close Wipe (Cut to Black)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Tip: If you need to change wipes while the wipe is closed, use Force Close before using Open for a smoother transition.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Hardcoded Cutscene Names===&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;&#039;Todo:&#039;&#039;&#039; Finish this.&amp;lt;/small&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Cutscene Name&lt;br /&gt;
! Meaning&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| ベビチコ出会い&lt;br /&gt;
| Master Luma Meeting&lt;br /&gt;
| -Uses hardcoded cameras&amp;lt;br /&amp;gt;-Activates spin after completion when the galaxy uses the StageType &amp;quot;Storybook&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Tools==&lt;br /&gt;
The tools can be found on the [https://www.lumasworkshop.com/tools/ tools and libraries page].&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=RARC_(File_Format)&amp;diff=964</id>
		<title>RARC (File Format)</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=RARC_(File_Format)&amp;diff=964"/>
		<updated>2025-12-26T18:44:51Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: Fix documentation for File Nodes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:File formats]]&lt;br /&gt;
&#039;&#039;&#039;RARC&#039;&#039;&#039; stands for &#039;&#039;&#039;R&#039;&#039;&#039;esource &#039;&#039;&#039;ARC&#039;&#039;&#039;hive. These files make up a majority of the files that you see on the game&#039;s disc, under the extension &#039;&#039;.arc&#039;&#039;. &#039;&#039;&#039;RARC&#039;&#039;&#039; files are archives, containing multiple files and folders inside. This format was also used on the Nintendo GameCube.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;Resource&#039;&#039; in the file name here breaks the common convention they used in naming most similar formats intending it to signify &#039;&#039;Revolution&#039;&#039; instead, the codename for the Nintendo Wii. Proof of this is known and can be seen in the various references in the game files to the Official tool Nintendo used for creating and managing this file format, &#039;&#039;Resarc&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
= Format Specifications =&lt;br /&gt;
Below you&#039;ll find helpful tables on how the file is structured&lt;br /&gt;
== Header ==&lt;br /&gt;
Each RARC starts with a &#039;&#039;header&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || &amp;quot;RARC&amp;quot; in ASCII&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt32 || Size of the entire file&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || UInt32 || Data Header Offset (Always 0x20)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || UInt32 || Offset to the File Data section minus 0x20&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || UInt32 || Length of the File Data section&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || UInt32 || Size of all the MRAM Files in the File Data section&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || UInt32 || Size of all the ARAM Files in the File Data section&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || UInt32 || Size of all the DVD Files in the File Data section&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
== Data Header ==&lt;br /&gt;
This section has information on the entire archive&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt32 || The number of Directory Nodes&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt32 || Offset to the Directory Nodes section minus 0x20 (always 0x20)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || UInt32 || The number of File Nodes&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || UInt32 || Offset to the File Nodes section minus 0x20&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || UInt32 || Size of the String Table&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || UInt32 || String Table offset minus 0x20&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || UInt16 || The next available File Index&lt;br /&gt;
|-&lt;br /&gt;
| 0x1A || bool || Keeps the File ID&#039;s Synced (Always 0x01, or TRUE in SMG)&lt;br /&gt;
|-&lt;br /&gt;
| 0x1B || UInt8[5] || Padding, All 0x00&#039;s&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
== Directory Node section ==&lt;br /&gt;
This section is a list of information for each folder (or, subdirectory) in the archive.&amp;lt;br/&amp;gt;&lt;br /&gt;
Each list entry looks like this:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || The first 4 characters in the Directory&#039;s name in all caps.&amp;lt;br/&amp;gt;Example: &amp;quot;RootFolder&amp;quot; = &amp;quot;ROOT&amp;quot;, and &amp;quot;Tmp&amp;quot; = &amp;quot;TMP &amp;quot; (Names less than 4 characters are padded to 4 characters with spaces)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt32 || Offset to the Directory&#039;s name in the String Table&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || UInt16 || Hash of the Directory&#039;s name&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || UInt16 || The number of File Nodes in this directory&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || UInt32 || Offset to the first File Node in the File Nodes section&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
== File Node section ==&lt;br /&gt;
This section is a list of information for each file in the archive. It also contains entries for directories so we can know which directory belongs where.&amp;lt;br/&amp;gt;&lt;br /&gt;
Each list entry looks like this:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt16 || Node Index (0xFFFF if this entry represents a subdirectory)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt16 || Hash of the Node&#039;s name&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Uint32 || This is a uint8 (0xFF000000) and uint24 (0x00FFFFFF).&amp;lt;br/&amp;gt;The uint8 defines certain Node Attributes. See the Node Attributes table below.&amp;lt;br/&amp;gt;The uint24 defines the offset to the Node&#039;s name in the String Table.&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || UInt32 || If this node represents a file: Offset to the File&#039;s Data in the File Data section.&amp;lt;br/&amp;gt;If this node represents a directory: Directory Node section index to use&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || UInt32 || If this node represents a file: Size of the File&#039;s Data.&amp;lt;br/&amp;gt;If this node represents a directory: The size of the Directory Node (always 0x10)&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
=== Node Attributes ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! Mask !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || FILE || This node is a File&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || DIRECTORY || This node is a Directory&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || COMPRESSED || This node&#039;s file is compressed&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || PRELOAD_TO_MRAM || Set the file to be loaded into Main RAM&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || PRELOAD_TO_ARAM || Set the file to be loaded into Auxiliary RAM (GameCube only)&lt;br /&gt;
|-&lt;br /&gt;
| 0x40 || LOAD_FROM_DVD || Set the file to be loaded right off the DVD when needed&lt;br /&gt;
|-&lt;br /&gt;
| 0x80 || YAZ0_COMPRESSED || This node&#039;s file is specifically YAZ0 compressed. Enable the COMPRESSED flag as well when using this&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Among the File Nodes are nodes for a &amp;quot;..&amp;quot; and &amp;quot;.&amp;quot; directory. The &amp;quot;.&amp;quot; entry points to the current directory, and the &amp;quot;..&amp;quot; directory points to the parent directory (or 0xFFFFFFFF if the current directory is the topmost directory).&lt;br /&gt;
&lt;br /&gt;
== String Table ==&lt;br /&gt;
This section is composed of NULL-terminated ASCII strings. The above information references these strings.&lt;br /&gt;
&lt;br /&gt;
== File Data section ==&lt;br /&gt;
This section is a chunk of all the data that files in the archive contain. Files are sorted in a specific order, and are padded to the nearest 32 byte boundary.&amp;lt;br/&amp;gt;The sorting order is MRAM Files then ARAM Files then DVD Files.&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=955</id>
		<title>BMD/BDL (File Format)</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=955"/>
		<updated>2025-10-26T23:47:02Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: Prelimary MAT3 &amp;amp; MDL3 docs&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:File formats]]&lt;br /&gt;
{{WIP}}&lt;br /&gt;
&lt;br /&gt;
BMD (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;M&#039;&#039;&#039;o&#039;&#039;&#039;d&#039;&#039;&#039;el) and BDL (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;D&#039;&#039;&#039;isplay &#039;&#039;&#039;L&#039;&#039;&#039;ist) are two 3D model formats used in &#039;&#039;Super Mario Galaxy&#039;&#039; and &#039;&#039;Super Mario Galaxy 2&#039;&#039;, among a few other &#039;&#039;Wii&#039;&#039; and &#039;&#039;GameCube&#039;&#039; games, such as &#039;&#039;Super Mario Sunshine&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These two formats hold the same data, except BDL contains an additional set of data which is used for faster rendering speeds.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Super Mario Galaxy&#039;&#039; &amp;amp; &#039;&#039;Super Mario Galaxy 2&#039;&#039; contain J3DLoader versions 21 and 26.&lt;br /&gt;
&lt;br /&gt;
== File Header ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || The magic that tells the game which format this file is. (ASCII)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bmd2&#039;&#039;&#039; for BMD (J3DLoader V21)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bmd3&#039;&#039;&#039; for BMD (J3DLoader v26)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bdl4&#039;&#039;&#039; for BDL (J3DLoader v26)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int32 || The total size of the file&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || The number of chunks present in this file.&amp;lt;br/&amp;gt;&#039;&#039;&#039;8&#039;&#039;&#039; for BMD&amp;lt;br/&amp;gt;&#039;&#039;&#039;9&#039;&#039;&#039; for BDL&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Subversion Header ===&lt;br /&gt;
This part of the header is not used, and can be anything.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || A 4 character value representing the Subversion. Usually SVR3 for SMG/2.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Byte[12] || Twelve bytes of padding. Usually these are &#039;&#039;&#039;0xFF&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== INF1 - Scene Information ==&lt;br /&gt;
The &#039;&#039;&#039;Inf&#039;&#039;&#039;ormation section hosts a hierarchy of Joints, Materials, and Shapes, which are used to render the model.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;INF1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || [[#J3DLoader%20Flags|J3DLoader Flags]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Matrix Group Data Count&amp;lt;br/&amp;gt;Referring to the Matrix Group Data in [[#SHP1_-_Shape_Information|SHP1]]&amp;lt;br/&amp;gt;&amp;lt;small&amp;gt;Stored in a variable by the game, but not used to dictate the actual number of Matrix Groups.&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Vertex Count&amp;lt;br/&amp;gt;Always equals the number of entries in the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;POSITION&amp;quot; [[#Vertex%20Buffer%20Formats|data buffer]]&amp;lt;br/&amp;gt;&amp;lt;small&amp;gt;Stored in a variable by the game, but never used for anything. The game reads Vertex Data directly from the [[#Vertex%20Buffer%20Formats|data buffer]]s without bounds checking.&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Relative offset to the [[#Scene%20Hierarchy|Scene Hierarchy]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== J3DLoader Flags ===&lt;br /&gt;
The J3DLoader contains several flags which affect how models are handled. There are more than what are shown here, however, those must be applied by the game itself in the code.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000000 || No flags applied (TODO: Check if this defaults to basic matrix calculation)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000001 || Use Autodesk Softimage matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000010 || Use Autodesk Maya matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000100 || Use Basic matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000001000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000010000 || UseImmidiateMtx (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000100000 || UsePostTexMtx (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000001000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000010000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000100000000 || NoMatrixTransform (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000001000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000010000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000100000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0001000000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0010000000000000 || DoBdlMaterialCalc&lt;br /&gt;
|-&lt;br /&gt;
| 0b0100000000000000 || NoBdlMaterialPatch - If set, skips the call to &#039;&#039;&#039;J3DModelLoader::readPatchedMaterial&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0b1000000000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
For all BMD files, the game always includes load flags &#039;&#039;Material_PE_Full&#039;&#039;, &#039;&#039;Material_UseIndirect&#039;&#039;, &#039;&#039;UseUniqueMaterials&#039;&#039;, and &#039;&#039;UNKNOWN_21&#039;&#039;.&amp;lt;br/&amp;gt;&lt;br /&gt;
For all BDL files, the game always includes load flags &#039;&#039;Material_UseIndirect&#039;&#039;, and &#039;&#039;UseUniqueMaterials&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;gt; &#039;&#039;Note: Changing the load flags by changing the code doesn&#039;t seem to do much.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Scene Hierarchy ===&lt;br /&gt;
Each model is constructed using a Scene Hierarchy. This simply determines the order of bones (in turn, defining the parent/child relations), material assignments, and Shape assignments.&lt;br /&gt;
&lt;br /&gt;
Each node consists of the following:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt16 || Node Type.&amp;lt;br/&amp;gt;0x00 = Marks the end of the node list&amp;lt;br/&amp;gt;0x01 = Creates a new child of the previous node&amp;lt;br/&amp;gt;0x02 = Finishes the child node and returns ownership to the previous node&amp;lt;br/&amp;gt;0x10 = Joint Assignment node. &amp;quot;Data&amp;quot; holds the Joint ID (index into JNT1)&amp;lt;br/&amp;gt;0x11 = Material assignment. &amp;quot;Data&amp;quot; holds the Material ID (index into MAT3)&amp;lt;br/&amp;gt;0x12 = Shape Assignment. &amp;quot;Data&amp;quot; holds the Shape ID (index into SHP1)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt16 || A Data value. Used by some nodes to index into other chunks. Usage depends on the node type.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The node list is padded to the nearest 32.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== VTX1 - Vertex Data ==&lt;br /&gt;
The &#039;&#039;&#039;V&#039;&#039;&#039;er&#039;&#039;&#039;t&#039;&#039;&#039;e&#039;&#039;&#039;x&#039;&#039;&#039; Data section contains the actual number values used for the properties of the geometry. It also includes the information on how the values are formatted.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;VTX1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int32 || Buffer Format list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || &amp;quot;POSITION&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || &amp;quot;NORMAL&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || &amp;quot;TANGENT&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || &amp;quot;COLOR_0&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Int32 || &amp;quot;COLOR_1&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Int32 || &amp;quot;TEXCOORD_0&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Int32 || &amp;quot;TEXCOORD_1&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Int32 || &amp;quot;TEXCOORD_2&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C || Int32 || &amp;quot;TEXCOORD_3&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x30 || Int32 || &amp;quot;TEXCOORD_4&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x34 || Int32 || &amp;quot;TEXCOORD_5&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x38 || Int32 || &amp;quot;TEXCOORD_6&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C || Int32 || &amp;quot;TEXCOORD_7&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Vertex Buffer Formats ===&lt;br /&gt;
Each of the Buffers in this section have a format descriptor. This allows different types of data storage, allowing for smaller files.&lt;br /&gt;
&lt;br /&gt;
Each format descriptor contains an Attribute Target, a Component Count, a Data Type, and a Mantissa shifter (to allow floats to be stored as smaller datatypes compared to FLOAT).&amp;lt;br/&amp;gt;Only one descriptor can exist for each attribute.&lt;br /&gt;
&lt;br /&gt;
The Attribute Target tells the game what this buffer is used for.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Attribute Targets&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000009 || POSITION || This buffer represents the positions of vertices in the model. Basically required for all visual models.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000A || NORMAL || This buffer represents vertex normals, used for the engine&#039;s vertex shading. Not needed if no material requires it.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000B || COLOR_0 || This buffer is available for Vertex Colors.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000C || COLOR_1 || This buffer is available for Vertex Colors.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000D || TEXCOORD_0 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000E || TEXCOORD_1 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000F || TEXCOORD_2 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000010 || TEXCOORD_3 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000011 || TEXCOORD_4 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000012 || TEXCOORD_5 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000013 || TEXCOORD_6 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000014 || TEXCOORD_7 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000019 || TANGENT || &#039;&#039;Currently unknown exactly what goes in here.&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x000000FF || List End || A buffer using this target will end the descriptor list.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The component count tells the game how many parts of the component that there are. Note that the values are considered based on the attribute target they&#039;re assigned to.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Component Count&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || POSITION_XY || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || POSITION_XYZ || Represents a position in 3D space with 3 values: X, Y, and Z.&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || NORMAL_XYZ || Represents a normal vector in 3D space with 3 values: X, Y, and Z.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || NORMAL_NBT || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || NORMAL_NBT3 || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || COLOR_RGB || Represents a color value with only Red, Green, and Blue values.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || COLOR_RGBA || Represents a color value with Red, Green, Blue, and Alpha values.&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || TEXCOORD_S || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || TEXCOORD_ST || Represents a UV texture coordinate with 2 values: X and Y.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Data Type tells the game how many bytes each value is, in the sense that an Int32 is 4 bytes, a Int16 is 2 bytes, a Float is 4 bytes, etc.&amp;lt;br/&amp;gt;Note that the Color values have a different set of options.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Data Types&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || UInt8 || 1 byte per value (0 to 255)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || Int8 || 1 byte per value (-128 to 127)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || UInt16 || 2 bytes per value (0 to 65535)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || Int16 || 2 bytes per value (-32,768 to 32,767)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || Float || 4 bytes per value&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || RGB565 || 2 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || RGB8 || 3 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || RGBX8 || 3 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || RGBA4 || 2 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || RGBA6 || 4 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000005 || RGBA8 || 4 bytes per color&lt;br /&gt;
|}&lt;br /&gt;
&amp;gt; &#039;&#039;Note: Both games require colors to be 4 bytes wide at all times, so changing from RGBA8 is worthless.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== EVP1 - Skinning Envelopes ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;EVP1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Envelopes stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Envelope Size Table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Envelope Joint Index Table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Envelope Weight Table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || Inverse Bind Matrix Table offset&lt;br /&gt;
|}&lt;br /&gt;
This section is padded to the nearest 32.&lt;br /&gt;
&lt;br /&gt;
=== Envelope Size Table ===&lt;br /&gt;
This table simply consists of an array of UInt8, where each value dictates how many entries are in a given Envelope.&lt;br /&gt;
&lt;br /&gt;
=== Envelope Joint Index Table ===&lt;br /&gt;
This table consists of the actual [[#JNT1_-_Joint_Hierarchy|JNT1]] index values. Each value is a UInt16, and are ordered directly based on the Envelope Size Table. (The first Envelope&#039;s values come directly after each other, then the second envelope&#039;s values, etc.)&lt;br /&gt;
&lt;br /&gt;
=== Envelope Weight Table ===&lt;br /&gt;
This table consists of joint weighting values which determine how much of an effect the given Joint Index has on this envelope. Each value is a Float, and are ordered directly based on the Envelope Size Table. (The first Envelope&#039;s values come directly after each other, then the second envelope&#039;s values, etc.)&lt;br /&gt;
&lt;br /&gt;
This table ends with padding to the nearest 4th byte so the Floats that come after are aligned correctly.&lt;br /&gt;
&lt;br /&gt;
=== Inverse Bind Matrix Table ===&lt;br /&gt;
This table contains Inverse Bind Matrices for each joint in [[#JNT1_-_Joint_Hierarchy|JNT1]]. The EVP1 section itself contains no size of this table, but the number of Inverse Bind Matrices is always equal to the amount of Joints in the model.&amp;lt;br/&amp;gt;Each entry is a 3 Row 4 Column Matrix (Mtx34), and is stored as 3 Vector4 values.&lt;br /&gt;
&lt;br /&gt;
== DRW1 - Skinning Assignments ==&lt;br /&gt;
This section contains a map which redirects skinning information to the correct location: either JNT1 (Single Matrix) or EVP1 (Multi-Matrix)&amp;lt;br/&amp;gt;The Destination Type list and Destination ID list must be equal in length.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;DRW1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Entries stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Destination Type list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Destination ID list offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Destination Type List ===&lt;br /&gt;
This is an array of bytes that dictates the destination type. It is ordered so that all the &#039;&#039;&#039;Joint&#039;&#039;&#039;s come first, and all the &#039;&#039;&#039;Envelope&#039;&#039;&#039;s second.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Joint || Redirects to a Joint within [[#JNT1_-_Joint_Hierarchy|JNT1]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Envelope || Redirects to an Envelope in [[#EVP1_-_Skinning_Envelopes|EVP1]]&lt;br /&gt;
|}&lt;br /&gt;
It&#039;s worth noting that Nintendo&#039;s development tools had a bug in it where all the &#039;&#039;&#039;Envelope&#039;&#039;&#039; entries were duplicated. Some JSystem games do not care about this, but certain games try to explicitly ignore this data, and therefore require the wasteful duplicate data.&lt;br /&gt;
&lt;br /&gt;
=== Destination ID List ===&lt;br /&gt;
This is an array of UInt16 that simply dictate an index into the provided section.&lt;br /&gt;
&lt;br /&gt;
DRW1 ends with padding to the nearest 32.&lt;br /&gt;
&lt;br /&gt;
== JNT1 - Joint Hierarchy ==&lt;br /&gt;
The &#039;&#039;&#039;J&#039;&#039;&#039;oi&#039;&#039;&#039;nt&#039;&#039;&#039; Hierarchy section defines the rigging skeleton of a model. There can only be one skeleton per model.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;JNT1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Joints stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Joint Data table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Remap table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Name table offset&amp;lt;br/&amp;gt;&amp;lt;small&amp;gt;0 if not present.&amp;lt;/small&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Joint Data ===&lt;br /&gt;
Each joint includes positional data and a bounding box which is used by the game for determining rendering range automatically.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int16 || Matrix Type&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || UInt8 || Parent Scale inheritance&amp;lt;br/&amp;gt;0 = Follow parent joint&#039;s scale&amp;lt;br/&amp;gt;1 = Ignore parent joint&#039;s scale&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt8 || Padding (0xFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Float || Scale X&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Float || Scale Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Float || Scale Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int16 || Rotation X&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || Int16 || Rotation Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int16 || Rotation Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x16 || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Float || Translation X&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Float || Translation Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Float || Translation Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Float || Bounding Sphere&amp;lt;br/&amp;gt;Should encapsulate all vertices that the joint affects&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Float || Bounding Box Minimum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C || Float || Bounding Box Minimum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x30 || Float || Bounding Box Minimum Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x34 || Float || Bounding Box Maximum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x38 || Float || Bounding Box Maximum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C || Float || Bounding Box Maximum Z&lt;br /&gt;
|}&lt;br /&gt;
Rotation is stored between -0x7FFF and 0x7FFF, which ranges -180 degrees and 180 degrees.&lt;br /&gt;
&lt;br /&gt;
== SHP1 - Shape Information==&lt;br /&gt;
The &#039;&#039;&#039;Sh&#039;&#039;&#039;a&#039;&#039;&#039;p&#039;&#039;&#039;e Information section determines how to use the data in the [[#VTX1_-_Vertex_Data|VTX1]] section to create shapes.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;SHP1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Shapes stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Shape Init Data offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Remap table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Name table offset&amp;lt;br/&amp;gt;&amp;lt;small&amp;gt;0 if not present, which it usually isn&#039;t.&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || Vertex Index Attribute table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Int32 || Weight Index table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Int32 || Primitive Data offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Int32 || Matrix Group Data offset (entry count must equal the entry count of the GXDisplayList group table)&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Int32 || Matrix Group Definition table offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Shape Data ===&lt;br /&gt;
Each shape denotes a Matrix Calculation type, which is used for Billboarding, as well as multi-joint skinning.&amp;lt;br/&amp;gt;A shape also hosts a collection of Matrix Groups. If the geometry needs to be weighted to more than 10 [[#DRW1_-_Skinning_Assignments|DRW1]] matrices, more than one Matrix Group is needed.&amp;lt;br/&amp;gt;A single Matrix Group can have multiple Primitives in it, but these Primitives must share the same set of [[#DRW1_-_Skinning_Assignments|DRW1]] matrices.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;TODO: Figure out what happens in the event that more than 10 are needed (such as one vertex being weighted to 11 bones). Is it just straight up not allowed?&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt8 || Matrix Type&lt;br /&gt;
&lt;br /&gt;
* 0 = Single Joint&lt;br /&gt;
&lt;br /&gt;
* 1 = Billboard Joint&lt;br /&gt;
&lt;br /&gt;
* 2 = Billboard Joint (Y axis only)&lt;br /&gt;
&lt;br /&gt;
* 3 = Multiple Joints&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || UInt8 || Padding (0xFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Int16 || Matrix Group count&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int16 || Vertex Index Attribute offset&amp;lt;br/&amp;gt;Relative to the Vertex Index Attribute Table offset defined in SHP1&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Int16 || Matrix Group Data index&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || First Matrix Group Definition index&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Float || Bounding Sphere&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Float || Bounding Box Minimum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Float || Bounding Box Minimum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Float || Bounding Box Minimum Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Float || Bounding Box Maximum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Float || Bounding Box Maximum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Float || Bounding Box Maximum Z&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Vertex Index Attribute Table ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int32 || An [[#Index%20Buffer%20Formats|index buffer]] attribute target&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || An [[#Index%20Buffer%20Formats|index buffer]] type&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Index Buffer Formats ====&lt;br /&gt;
Each of the Buffers in this section have a format descriptor. This allows different types of data storage, allowing for smaller files.&lt;br /&gt;
&lt;br /&gt;
These attributes line up with either a direct value that is stored in the shape, or an index into a [[#VTX1_-_Vertex_Data|VTX1]] [[#Vertex%20Buffer%20Formats|data buffer]].&amp;lt;br/&amp;gt;Only one indexer can exist for each attribute.&lt;br /&gt;
&lt;br /&gt;
The Attribute Target tells the game what this index buffer is used for.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Attribute Targets&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || POSITION_MATRIX || This is a direct list of indices into the Matrix Group&#039;s Weight collection. Required for Shapes that use Multiple Joint skinning.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || TEXTURE_0_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || TEXTURE_1_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || TEXTURE_2_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || TEXTURE_3_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000005 || TEXTURE_4_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000006 || TEXTURE_5_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000007 || TEXTURE_6_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000008 || TEXTURE_7_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000009 || POSITION || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;POSITION&amp;quot; buffer. Required.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000A || NORMAL || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;NORMAL&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000B || COLOR_0 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;COLOR_0&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000C || COLOR_1 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;COLOR_1&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000D || TEXCOORD_0 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_0&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000E || TEXCOORD_1 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_1&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000F || TEXCOORD_2 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_2&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000010 || TEXCOORD_3 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_3&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000011 || TEXCOORD_4 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_4&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000012 || TEXCOORD_5 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_5&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000013 || TEXCOORD_6 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_6&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000014 || TEXCOORD_7 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_7&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000019 || TANGENT || &#039;&#039;This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TANGENT&amp;quot; buffer, but we don&#039;t yet know what that buffer does.&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x000000FF || List End || A buffer using this target will end the descriptor list.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Data Type of an Index Buffer determines the size of each Index. Direct Buffers can only be 1 byte per value.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Data Types&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || None || Only used for the List End&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || Direct || 1 byte per value. Only used for data that is not stored within [[#VTX1_-_Vertex_Data|VTX1]]&amp;lt;br/&amp;gt;Needs to be divided by 3 for some reason...&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || UInt8 || 1 byte per value (0 to 255). Indexes a buffer in [[#VTX1_-_Vertex_Data|VTX1]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || UInt16 || 2 bytes per value (0 to 65535). Indexes a buffer in [[#VTX1_-_Vertex_Data|VTX1]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Primitive Data ===&lt;br /&gt;
This chunk contains raw primitives. These are what hold the index buffers.&amp;lt;br/&amp;gt;The Index Buffers are ordered the same way the Index Buffer Attributes are ordered. For example, POSITION (UInt16), NORMAL (UInt16), COLOR_0 (UInt8), TEXCOORD_0 (UInt16), would result in the following byte structure: &#039;&#039;&#039;PPPP NNNN C0 TXC0&#039;&#039;&#039;&amp;lt;br/&amp;gt;This repeats for each vertex in the primitive.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Uint8 || Primitive Type&lt;br /&gt;
&lt;br /&gt;
* 0x80 = Individual Quads&lt;br /&gt;
&lt;br /&gt;
* 0x90 = Individual Triangles&lt;br /&gt;
&lt;br /&gt;
* 0x98 = Triangle Strip&lt;br /&gt;
&lt;br /&gt;
* 0xA0 = Triangle Fan&lt;br /&gt;
&lt;br /&gt;
* 0xA8 = Individual Lines&lt;br /&gt;
&lt;br /&gt;
* 0xB0 = Line Strip&lt;br /&gt;
&lt;br /&gt;
* 0xB8 = Individual Points&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;TODO: Figure out if Quads, Lines, Line Strips, and Points work.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;small&amp;gt;TODO: Figure out if &amp;quot;Quad Strips&amp;quot; exist at 0x88.&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int16 || Vertex Count&lt;br /&gt;
|}&lt;br /&gt;
Each Matrix Group&#039;s primitive collection MUST be padded to the nearest 32. The game dies if you don&#039;t.&lt;br /&gt;
&lt;br /&gt;
=== Matrix Group Definition Table ===&lt;br /&gt;
This table defines a list of Matrix Groups for each Shape. A Shape can have multiple Matrix Groups, but only stores the index of the first one. This means that all the Matrix Groups for a given Shape must come directly one after another.&amp;lt;br/&amp;gt;It contains only two values: The size of all Primitive Data within this group, and an offset to the first Primitive (relative to the Primitive Data offset defined in SHP1).&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int32 || Primitive Data size&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || First Primitive offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Matrix Group Data Table ===&lt;br /&gt;
This table contains definitions of sub-segments inside the Weight Index Table. How these values are used differs based on the shape matrix calculation type, but official files generally set both usages up correctly regardless.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int16 || [[#DRW1_-_Skinning_Assignments|DRW1]] Matrix ID&amp;lt;br/&amp;gt;This is only used with Single Joint shape matrix calculation.&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Int16 || Matrix Count&amp;lt;br/&amp;gt;This is only used with Multiple Joint shape matrix calculation.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || Starting Weight Index&amp;lt;br/&amp;gt;This is only used with Multiple Joint shape matrix calculation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Weight Index Table ===&lt;br /&gt;
This table contains several indices into [[#DRW1_-_Skinning_Assignments|DRW1]].&amp;lt;br/&amp;gt;Each index is a Signed 16 value.&amp;lt;br/&amp;gt;The values may also contain 0xFFFF, which indicates that the last used index should be used instead.&amp;lt;br/&amp;gt;Matrix Groups can select a segment of these indices (up to 10) for use. A Matrix Group must not start with 0xFFFF.&lt;br /&gt;
&lt;br /&gt;
== MAT2 - Material List (Old) ==&lt;br /&gt;
Technically supported by the game, but not known to be used by any model.&lt;br /&gt;
&lt;br /&gt;
== MAT3 - Material List ==&lt;br /&gt;
Contains information for &#039;&#039;&#039;Mat&#039;&#039;&#039;erials to fill the rendered geometry with.&lt;br /&gt;
&lt;br /&gt;
== MDL3 - Display List ==&lt;br /&gt;
Contains raw material GX opcodes to speed up rendering.&lt;br /&gt;
&lt;br /&gt;
== TEX1 - Texture Data ==&lt;br /&gt;
The &#039;&#039;&#039;Tex&#039;&#039;&#039;ture Information section holds several embedded [[BTI_(File_Format)|BTI]] files that [[#MAT3_-_Material_List|MAT3]] can reference by index for texture assignment.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;TEX1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of [[BTI_(File_Format)|BTI]] files stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || [[BTI_(File_Format)|BTI]] Header Table Offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Name table offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The texture data locations are defined by the [[BTI_(File_Format)|BTI]] headers (which themselves are located directly one after another at the Header Table)&amp;lt;br/&amp;gt;&lt;br /&gt;
This structure allows multiple textures that have the same visual data to have their headers point to just one block of visual data. In other words, two identical textures can be &amp;quot;compressed&amp;quot; into one while still having their own properties (wrapping, filtering, etc.)&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=954</id>
		<title>BMD/BDL (File Format)</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=954"/>
		<updated>2025-10-26T21:29:59Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: EVP1&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:File formats]]&lt;br /&gt;
{{WIP}}&lt;br /&gt;
&lt;br /&gt;
BMD (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;M&#039;&#039;&#039;o&#039;&#039;&#039;d&#039;&#039;&#039;el) and BDL (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;D&#039;&#039;&#039;isplay &#039;&#039;&#039;L&#039;&#039;&#039;ist) are two 3D model formats used in &#039;&#039;Super Mario Galaxy&#039;&#039; and &#039;&#039;Super Mario Galaxy 2&#039;&#039;, among a few other &#039;&#039;Wii&#039;&#039; and &#039;&#039;GameCube&#039;&#039; games, such as &#039;&#039;Super Mario Sunshine&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These two formats hold the same data, except BDL contains an additional set of data which is used for faster rendering speeds.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Super Mario Galaxy&#039;&#039; &amp;amp; &#039;&#039;Super Mario Galaxy 2&#039;&#039; contain J3DLoader versions 21 and 26.&lt;br /&gt;
&lt;br /&gt;
== File Header ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || The magic that tells the game which format this file is. (ASCII)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bmd2&#039;&#039;&#039; for BMD (J3DLoader V21)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bmd3&#039;&#039;&#039; for BMD (J3DLoader v26)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bdl4&#039;&#039;&#039; for BDL (J3DLoader v26)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int32 || The total size of the file&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || The number of chunks present in this file.&amp;lt;br/&amp;gt;&#039;&#039;&#039;8&#039;&#039;&#039; for BMD&amp;lt;br/&amp;gt;&#039;&#039;&#039;9&#039;&#039;&#039; for BDL&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Subversion Header ===&lt;br /&gt;
This part of the header is not used, and can be anything.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || A 4 character value representing the Subversion. Usually SVR3 for SMG/2.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Byte[12] || Twelve bytes of padding. Usually these are &#039;&#039;&#039;0xFF&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== INF1 - Scene Information ==&lt;br /&gt;
The &#039;&#039;&#039;Inf&#039;&#039;&#039;ormation section hosts a hierarchy of Joints, Materials, and Shapes, which are used to render the model.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;INF1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || [[#J3DLoader%20Flags|J3DLoader Flags]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Matrix Group Data Count&amp;lt;br/&amp;gt;Referring to the Matrix Group Data in [[#SHP1_-_Shape_Information|SHP1]]&amp;lt;br/&amp;gt;&amp;lt;small&amp;gt;Stored in a variable by the game, but not used to dictate the actual number of Matrix Groups.&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Vertex Count&amp;lt;br/&amp;gt;Always equals the number of entries in the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;POSITION&amp;quot; [[#Vertex%20Buffer%20Formats|data buffer]]&amp;lt;br/&amp;gt;&amp;lt;small&amp;gt;Stored in a variable by the game, but never used for anything. The game reads Vertex Data directly from the [[#Vertex%20Buffer%20Formats|data buffer]]s without bounds checking.&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Relative offset to the [[#Scene%20Hierarchy|Scene Hierarchy]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== J3DLoader Flags ===&lt;br /&gt;
The J3DLoader contains several flags which affect how models are handled. There are more than what are shown here, however, those must be applied by the game itself in the code.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000000 || No flags applied (TODO: Check if this defaults to basic matrix calculation)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000001 || Use Autodesk Softimage matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000010 || Use Autodesk Maya matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000100 || Use Basic matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000001000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000010000 || UseImmidiateMtx (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000100000 || UsePostTexMtx (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000001000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000010000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000100000000 || NoMatrixTransform (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000001000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000010000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000100000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0001000000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0010000000000000 || DoBdlMaterialCalc&lt;br /&gt;
|-&lt;br /&gt;
| 0b0100000000000000 || NoBdlMaterialPatch - If set, skips the call to &#039;&#039;&#039;J3DModelLoader::readPatchedMaterial&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0b1000000000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
For all BMD files, the game always includes load flags &#039;&#039;Material_PE_Full&#039;&#039;, &#039;&#039;Material_UseIndirect&#039;&#039;, &#039;&#039;UseUniqueMaterials&#039;&#039;, and &#039;&#039;UNKNOWN_21&#039;&#039;.&amp;lt;br/&amp;gt;&lt;br /&gt;
For all BDL files, the game always includes load flags &#039;&#039;Material_UseIndirect&#039;&#039;, and &#039;&#039;UseUniqueMaterials&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;gt; &#039;&#039;Note: Changing the load flags by changing the code doesn&#039;t seem to do much.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Scene Hierarchy ===&lt;br /&gt;
Each model is constructed using a Scene Hierarchy. This simply determines the order of bones (in turn, defining the parent/child relations), material assignments, and Shape assignments.&lt;br /&gt;
&lt;br /&gt;
Each node consists of the following:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt16 || Node Type.&amp;lt;br/&amp;gt;0x00 = Marks the end of the node list&amp;lt;br/&amp;gt;0x01 = Creates a new child of the previous node&amp;lt;br/&amp;gt;0x02 = Finishes the child node and returns ownership to the previous node&amp;lt;br/&amp;gt;0x10 = Joint Assignment node. &amp;quot;Data&amp;quot; holds the Joint ID (index into JNT1)&amp;lt;br/&amp;gt;0x11 = Material assignment. &amp;quot;Data&amp;quot; holds the Material ID (index into MAT3)&amp;lt;br/&amp;gt;0x12 = Shape Assignment. &amp;quot;Data&amp;quot; holds the Shape ID (index into SHP1)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt16 || A Data value. Used by some nodes to index into other chunks. Usage depends on the node type.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The node list is padded to the nearest 32.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== VTX1 - Vertex Data ==&lt;br /&gt;
The &#039;&#039;&#039;V&#039;&#039;&#039;er&#039;&#039;&#039;t&#039;&#039;&#039;e&#039;&#039;&#039;x&#039;&#039;&#039; Data section contains the actual number values used for the properties of the geometry. It also includes the information on how the values are formatted.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;VTX1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int32 || Buffer Format list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || &amp;quot;POSITION&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || &amp;quot;NORMAL&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || &amp;quot;TANGENT&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || &amp;quot;COLOR_0&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Int32 || &amp;quot;COLOR_1&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Int32 || &amp;quot;TEXCOORD_0&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Int32 || &amp;quot;TEXCOORD_1&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Int32 || &amp;quot;TEXCOORD_2&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C || Int32 || &amp;quot;TEXCOORD_3&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x30 || Int32 || &amp;quot;TEXCOORD_4&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x34 || Int32 || &amp;quot;TEXCOORD_5&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x38 || Int32 || &amp;quot;TEXCOORD_6&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C || Int32 || &amp;quot;TEXCOORD_7&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Vertex Buffer Formats ===&lt;br /&gt;
Each of the Buffers in this section have a format descriptor. This allows different types of data storage, allowing for smaller files.&lt;br /&gt;
&lt;br /&gt;
Each format descriptor contains an Attribute Target, a Component Count, a Data Type, and a Mantissa shifter (to allow floats to be stored as smaller datatypes compared to FLOAT).&amp;lt;br/&amp;gt;Only one descriptor can exist for each attribute.&lt;br /&gt;
&lt;br /&gt;
The Attribute Target tells the game what this buffer is used for.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Attribute Targets&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000009 || POSITION || This buffer represents the positions of vertices in the model. Basically required for all visual models.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000A || NORMAL || This buffer represents vertex normals, used for the engine&#039;s vertex shading. Not needed if no material requires it.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000B || COLOR_0 || This buffer is available for Vertex Colors.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000C || COLOR_1 || This buffer is available for Vertex Colors.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000D || TEXCOORD_0 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000E || TEXCOORD_1 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000F || TEXCOORD_2 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000010 || TEXCOORD_3 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000011 || TEXCOORD_4 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000012 || TEXCOORD_5 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000013 || TEXCOORD_6 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000014 || TEXCOORD_7 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000019 || TANGENT || &#039;&#039;Currently unknown exactly what goes in here.&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x000000FF || List End || A buffer using this target will end the descriptor list.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The component count tells the game how many parts of the component that there are. Note that the values are considered based on the attribute target they&#039;re assigned to.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Component Count&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || POSITION_XY || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || POSITION_XYZ || Represents a position in 3D space with 3 values: X, Y, and Z.&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || NORMAL_XYZ || Represents a normal vector in 3D space with 3 values: X, Y, and Z.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || NORMAL_NBT || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || NORMAL_NBT3 || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || COLOR_RGB || Represents a color value with only Red, Green, and Blue values.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || COLOR_RGBA || Represents a color value with Red, Green, Blue, and Alpha values.&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || TEXCOORD_S || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || TEXCOORD_ST || Represents a UV texture coordinate with 2 values: X and Y.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Data Type tells the game how many bytes each value is, in the sense that an Int32 is 4 bytes, a Int16 is 2 bytes, a Float is 4 bytes, etc.&amp;lt;br/&amp;gt;Note that the Color values have a different set of options.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Data Types&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || UInt8 || 1 byte per value (0 to 255)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || Int8 || 1 byte per value (-128 to 127)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || UInt16 || 2 bytes per value (0 to 65535)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || Int16 || 2 bytes per value (-32,768 to 32,767)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || Float || 4 bytes per value&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || RGB565 || 2 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || RGB8 || 3 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || RGBX8 || 3 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || RGBA4 || 2 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || RGBA6 || 4 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000005 || RGBA8 || 4 bytes per color&lt;br /&gt;
|}&lt;br /&gt;
&amp;gt; &#039;&#039;Note: Both games require colors to be 4 bytes wide at all times, so changing from RGBA8 is worthless.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== EVP1 - Skinning Envelopes ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;EVP1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Envelopes stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Envelope Size Table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Envelope Joint Index Table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Envelope Weight Table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || Inverse Bind Matrix Table offset&lt;br /&gt;
|}&lt;br /&gt;
This section is padded to the nearest 32.&lt;br /&gt;
&lt;br /&gt;
=== Envelope Size Table ===&lt;br /&gt;
This table simply consists of an array of UInt8, where each value dictates how many entries are in a given Envelope.&lt;br /&gt;
&lt;br /&gt;
=== Envelope Joint Index Table ===&lt;br /&gt;
This table consists of the actual [[#JNT1_-_Joint_Hierarchy|JNT1]] index values. Each value is a UInt16, and are ordered directly based on the Envelope Size Table. (The first Envelope&#039;s values come directly after each other, then the second envelope&#039;s values, etc.)&lt;br /&gt;
&lt;br /&gt;
=== Envelope Weight Table ===&lt;br /&gt;
This table consists of joint weighting values which determine how much of an effect the given Joint Index has on this envelope. Each value is a Float, and are ordered directly based on the Envelope Size Table. (The first Envelope&#039;s values come directly after each other, then the second envelope&#039;s values, etc.)&lt;br /&gt;
&lt;br /&gt;
This table ends with padding to the nearest 4th byte so the Floats that come after are aligned correctly.&lt;br /&gt;
&lt;br /&gt;
=== Inverse Bind Matrix Table ===&lt;br /&gt;
This table contains Inverse Bind Matrices for each joint in [[#JNT1_-_Joint_Hierarchy|JNT1]]. The EVP1 section itself contains no size of this table, but the number of Inverse Bind Matrices is always equal to the amount of Joints in the model.&amp;lt;br/&amp;gt;Each entry is a 3 Row 4 Column Matrix (Mtx34), and is stored as 3 Vector4 values.&lt;br /&gt;
&lt;br /&gt;
== DRW1 - Skinning Assignments ==&lt;br /&gt;
This section contains a map which redirects skinning information to the correct location: either JNT1 (Single Matrix) or EVP1 (Multi-Matrix)&amp;lt;br/&amp;gt;The Destination Type list and Destination ID list must be equal in length.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;DRW1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Entries stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Destination Type list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Destination ID list offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Destination Type List ===&lt;br /&gt;
This is an array of bytes that dictates the destination type. It is ordered so that all the &#039;&#039;&#039;Joint&#039;&#039;&#039;s come first, and all the &#039;&#039;&#039;Envelope&#039;&#039;&#039;s second.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Joint || Redirects to a Joint within [[#JNT1_-_Joint_Hierarchy|JNT1]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Envelope || Redirects to an Envelope in [[#EVP1_-_Skinning_Envelopes|EVP1]]&lt;br /&gt;
|}&lt;br /&gt;
It&#039;s worth noting that Nintendo&#039;s development tools had a bug in it where all the &#039;&#039;&#039;Envelope&#039;&#039;&#039; entries were duplicated. Some JSystem games do not care about this, but certain games try to explicitly ignore this data, and therefore require the wasteful duplicate data.&lt;br /&gt;
&lt;br /&gt;
=== Destination ID List ===&lt;br /&gt;
This is an array of UInt16 that simply dictate an index into the provided section.&lt;br /&gt;
&lt;br /&gt;
DRW1 ends with padding to the nearest 32.&lt;br /&gt;
&lt;br /&gt;
== JNT1 - Joint Hierarchy ==&lt;br /&gt;
The &#039;&#039;&#039;J&#039;&#039;&#039;oi&#039;&#039;&#039;nt&#039;&#039;&#039; Hierarchy section defines the rigging skeleton of a model. There can only be one skeleton per model.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;JNT1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Joints stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Joint Data table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Remap table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Name table offset&amp;lt;br/&amp;gt;&amp;lt;small&amp;gt;0 if not present.&amp;lt;/small&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Joint Data ===&lt;br /&gt;
Each joint includes positional data and a bounding box which is used by the game for determining rendering range automatically.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int16 || Matrix Type&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || UInt8 || Parent Scale inheritance&amp;lt;br/&amp;gt;0 = Follow parent joint&#039;s scale&amp;lt;br/&amp;gt;1 = Ignore parent joint&#039;s scale&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt8 || Padding (0xFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Float || Scale X&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Float || Scale Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Float || Scale Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int16 || Rotation X&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || Int16 || Rotation Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int16 || Rotation Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x16 || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Float || Translation X&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Float || Translation Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Float || Translation Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Float || Bounding Sphere&amp;lt;br/&amp;gt;Should encapsulate all vertices that the joint affects&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Float || Bounding Box Minimum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C || Float || Bounding Box Minimum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x30 || Float || Bounding Box Minimum Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x34 || Float || Bounding Box Maximum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x38 || Float || Bounding Box Maximum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C || Float || Bounding Box Maximum Z&lt;br /&gt;
|}&lt;br /&gt;
Rotation is stored between -0x7FFF and 0x7FFF, which ranges -180 degrees and 180 degrees.&lt;br /&gt;
&lt;br /&gt;
== SHP1 - Shape Information==&lt;br /&gt;
The &#039;&#039;&#039;Sh&#039;&#039;&#039;a&#039;&#039;&#039;p&#039;&#039;&#039;e Information section determines how to use the data in the [[#VTX1_-_Vertex_Data|VTX1]] section to create shapes.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;SHP1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Shapes stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Shape Init Data offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Remap table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Name table offset&amp;lt;br/&amp;gt;(Generally not used, and thus set to 0)&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || Vertex Index Attribute table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Int32 || Weight Index table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Int32 || Primitive Data offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Int32 || Matrix Group Data offset (entry count must equal the entry count of the GXDisplayList group table)&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Int32 || Matrix Group Definition table offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Shape Data ===&lt;br /&gt;
Each shape denotes a Matrix Calculation type, which is used for Billboarding, as well as multi-joint skinning.&amp;lt;br/&amp;gt;A shape also hosts a collection of Matrix Groups. If the geometry needs to be weighted to more than 10 [[#DRW1_-_Skinning_Assignments|DRW1]] matrices, more than one Matrix Group is needed.&amp;lt;br/&amp;gt;A single Matrix Group can have multiple Primitives in it, but these Primitives must share the same set of [[#DRW1_-_Skinning_Assignments|DRW1]] matrices.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;TODO: Figure out what happens in the event that more than 10 are needed (such as one vertex being weighted to 11 bones). Is it just straight up not allowed?&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt8 || Matrix Type&lt;br /&gt;
&lt;br /&gt;
* 0 = Single Joint&lt;br /&gt;
&lt;br /&gt;
* 1 = Billboard Joint&lt;br /&gt;
&lt;br /&gt;
* 2 = Billboard Joint (Y axis only)&lt;br /&gt;
&lt;br /&gt;
* 3 = Multiple Joints&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || UInt8 || Padding (0xFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Int16 || Matrix Group count&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int16 || Vertex Index Attribute offset&amp;lt;br/&amp;gt;Relative to the Vertex Index Attribute Table offset defined in SHP1&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Int16 || Matrix Group Data index&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || First Matrix Group Definition index&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Float || Bounding Sphere&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Float || Bounding Box Minimum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Float || Bounding Box Minimum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Float || Bounding Box Minimum Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Float || Bounding Box Maximum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Float || Bounding Box Maximum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Float || Bounding Box Maximum Z&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Vertex Index Attribute Table ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int32 || An [[#Index%20Buffer%20Formats|index buffer]] attribute target&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || An [[#Index%20Buffer%20Formats|index buffer]] type&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Index Buffer Formats ====&lt;br /&gt;
Each of the Buffers in this section have a format descriptor. This allows different types of data storage, allowing for smaller files.&lt;br /&gt;
&lt;br /&gt;
These attributes line up with either a direct value that is stored in the shape, or an index into a [[#VTX1_-_Vertex_Data|VTX1]] [[#Vertex%20Buffer%20Formats|data buffer]].&amp;lt;br/&amp;gt;Only one indexer can exist for each attribute.&lt;br /&gt;
&lt;br /&gt;
The Attribute Target tells the game what this index buffer is used for.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Attribute Targets&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || POSITION_MATRIX || This is a direct list of indices into the Matrix Group&#039;s Weight collection. Required for Shapes that use Multiple Joint skinning.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || TEXTURE_0_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || TEXTURE_1_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || TEXTURE_2_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || TEXTURE_3_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000005 || TEXTURE_4_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000006 || TEXTURE_5_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000007 || TEXTURE_6_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000008 || TEXTURE_7_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000009 || POSITION || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;POSITION&amp;quot; buffer. Required.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000A || NORMAL || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;NORMAL&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000B || COLOR_0 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;COLOR_0&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000C || COLOR_1 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;COLOR_1&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000D || TEXCOORD_0 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_0&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000E || TEXCOORD_1 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_1&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000F || TEXCOORD_2 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_2&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000010 || TEXCOORD_3 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_3&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000011 || TEXCOORD_4 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_4&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000012 || TEXCOORD_5 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_5&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000013 || TEXCOORD_6 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_6&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000014 || TEXCOORD_7 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_7&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000019 || TANGENT || &#039;&#039;This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TANGENT&amp;quot; buffer, but we don&#039;t yet know what that buffer does.&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x000000FF || List End || A buffer using this target will end the descriptor list.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Data Type of an Index Buffer determines the size of each Index. Direct Buffers can only be 1 byte per value.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Data Types&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || None || Only used for the List End&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || Direct || 1 byte per value. Only used for data that is not stored within [[#VTX1_-_Vertex_Data|VTX1]]&amp;lt;br/&amp;gt;Needs to be divided by 3 for some reason...&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || UInt8 || 1 byte per value (0 to 255). Indexes a buffer in [[#VTX1_-_Vertex_Data|VTX1]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || UInt16 || 2 bytes per value (0 to 65535). Indexes a buffer in [[#VTX1_-_Vertex_Data|VTX1]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Primitive Data ===&lt;br /&gt;
This chunk contains raw primitives. These are what hold the index buffers.&amp;lt;br/&amp;gt;The Index Buffers are ordered the same way the Index Buffer Attributes are ordered. For example, POSITION (UInt16), NORMAL (UInt16), COLOR_0 (UInt8), TEXCOORD_0 (UInt16), would result in the following byte structure: &#039;&#039;&#039;PPPP NNNN C0 TXC0&#039;&#039;&#039;&amp;lt;br/&amp;gt;This repeats for each vertex in the primitive.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Uint8 || Primitive Type&lt;br /&gt;
&lt;br /&gt;
* 0x80 = Individual Quads&lt;br /&gt;
&lt;br /&gt;
* 0x90 = Individual Triangles&lt;br /&gt;
&lt;br /&gt;
* 0x98 = Triangle Strip&lt;br /&gt;
&lt;br /&gt;
* 0xA0 = Triangle Fan&lt;br /&gt;
&lt;br /&gt;
* 0xA8 = Individual Lines&lt;br /&gt;
&lt;br /&gt;
* 0xB0 = Line Strip&lt;br /&gt;
&lt;br /&gt;
* 0xB8 = Individual Points&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;TODO: Figure out if Quads, Lines, Line Strips, and Points work.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;small&amp;gt;TODO: Figure out if &amp;quot;Quad Strips&amp;quot; exist at 0x88.&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int16 || Vertex Count&lt;br /&gt;
|}&lt;br /&gt;
Each Matrix Group&#039;s primitive collection MUST be padded to the nearest 32. The game dies if you don&#039;t.&lt;br /&gt;
&lt;br /&gt;
=== Matrix Group Definition Table ===&lt;br /&gt;
This table defines a list of Matrix Groups for each Shape. A Shape can have multiple Matrix Groups, but only stores the index of the first one. This means that all the Matrix Groups for a given Shape must come directly one after another.&amp;lt;br/&amp;gt;It contains only two values: The size of all Primitive Data within this group, and an offset to the first Primitive (relative to the Primitive Data offset defined in SHP1).&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int32 || Primitive Data size&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || First Primitive offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Matrix Group Data Table ===&lt;br /&gt;
This table contains definitions of sub-segments inside the Weight Index Table. How these values are used differs based on the shape matrix calculation type, but official files generally set both usages up correctly regardless.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int16 || [[#DRW1_-_Skinning_Assignments|DRW1]] Matrix ID&amp;lt;br/&amp;gt;This is only used with Single Joint shape matrix calculation.&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Int16 || Matrix Count&amp;lt;br/&amp;gt;This is only used with Multiple Joint shape matrix calculation.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || Starting Weight Index&amp;lt;br/&amp;gt;This is only used with Multiple Joint shape matrix calculation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Weight Index Table ===&lt;br /&gt;
This table contains several indices into [[#DRW1_-_Skinning_Assignments|DRW1]].&amp;lt;br/&amp;gt;Each index is a Signed 16 value.&amp;lt;br/&amp;gt;The values may also contain 0xFFFF, which indicates that the last used index should be used instead.&amp;lt;br/&amp;gt;Matrix Groups can select a segment of these indices (up to 10) for use. A Matrix Group must not start with 0xFFFF.&lt;br /&gt;
&lt;br /&gt;
== MAT2 - Material List (Old) ==&lt;br /&gt;
Technically supported by the game, but not known to be used by any model.&lt;br /&gt;
&lt;br /&gt;
== MAT3 - Material List ==&lt;br /&gt;
&lt;br /&gt;
== MDL3 - Display List ==&lt;br /&gt;
&lt;br /&gt;
== TEX1 - Texture Data ==&lt;br /&gt;
The &#039;&#039;&#039;Tex&#039;&#039;&#039;ture Information section holds several embedded [[BTI_(File_Format)|BTI]] files that [[#MAT3_-_Material_List|MAT3]] can reference by index for texture assignment.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;TEX1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of [[BTI_(File_Format)|BTI]] files stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || [[BTI_(File_Format)|BTI]] Header Table Offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Name table offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The texture data locations are defined by the [[BTI_(File_Format)|BTI]] headers (which themselves are located directly one after another at the Header Table)&amp;lt;br/&amp;gt;&lt;br /&gt;
This structure allows multiple textures that have the same visual data to have their headers point to just one block of visual data. In other words, two identical textures can be &amp;quot;compressed&amp;quot; into one while still having their own properties (wrapping, filtering, etc.)&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=953</id>
		<title>BMD/BDL (File Format)</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=953"/>
		<updated>2025-10-26T01:20:08Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: Add DRW1&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:File formats]]&lt;br /&gt;
{{WIP}}&lt;br /&gt;
&lt;br /&gt;
BMD (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;M&#039;&#039;&#039;o&#039;&#039;&#039;d&#039;&#039;&#039;el) and BDL (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;D&#039;&#039;&#039;isplay &#039;&#039;&#039;L&#039;&#039;&#039;ist) are two 3D model formats used in &#039;&#039;Super Mario Galaxy&#039;&#039; and &#039;&#039;Super Mario Galaxy 2&#039;&#039;, among a few other &#039;&#039;Wii&#039;&#039; and &#039;&#039;GameCube&#039;&#039; games, such as &#039;&#039;Super Mario Sunshine&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These two formats hold the same data, except BDL contains an additional set of data which is used for faster rendering speeds.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Super Mario Galaxy&#039;&#039; &amp;amp; &#039;&#039;Super Mario Galaxy 2&#039;&#039; contain J3DLoader versions 21 and 26.&lt;br /&gt;
&lt;br /&gt;
== File Header ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || The magic that tells the game which format this file is. (ASCII)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bmd2&#039;&#039;&#039; for BMD (J3DLoader V21)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bmd3&#039;&#039;&#039; for BMD (J3DLoader v26)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bdl4&#039;&#039;&#039; for BDL (J3DLoader v26)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int32 || The total size of the file&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || The number of chunks present in this file.&amp;lt;br/&amp;gt;&#039;&#039;&#039;8&#039;&#039;&#039; for BMD&amp;lt;br/&amp;gt;&#039;&#039;&#039;9&#039;&#039;&#039; for BDL&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Subversion Header ===&lt;br /&gt;
This part of the header is not used, and can be anything.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || A 4 character value representing the Subversion. Usually SVR3 for SMG/2.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Byte[12] || Twelve bytes of padding. Usually these are &#039;&#039;&#039;0xFF&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== INF1 - Scene Information ==&lt;br /&gt;
The &#039;&#039;&#039;Inf&#039;&#039;&#039;ormation section hosts a hierarchy of Joints, Materials, and Shapes, which are used to render the model.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;INF1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || [[#J3DLoader%20Flags|J3DLoader Flags]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Matrix Group Data Count&amp;lt;br/&amp;gt;Referring to the Matrix Group Data in [[#SHP1_-_Shape_Information|SHP1]]&amp;lt;br/&amp;gt;&amp;lt;small&amp;gt;Stored in a variable by the game, but not used to dictate the actual number of Matrix Groups.&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Vertex Count&amp;lt;br/&amp;gt;Always equals the number of entries in the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;POSITION&amp;quot; [[#Vertex%20Buffer%20Formats|data buffer]]&amp;lt;br/&amp;gt;&amp;lt;small&amp;gt;Stored in a variable by the game, but never used for anything. The game reads Vertex Data directly from the [[#Vertex%20Buffer%20Formats|data buffer]]s without bounds checking.&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Relative offset to the [[#Scene%20Hierarchy|Scene Hierarchy]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== J3DLoader Flags ===&lt;br /&gt;
The J3DLoader contains several flags which affect how models are handled. There are more than what are shown here, however, those must be applied by the game itself in the code.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000000 || No flags applied (TODO: Check if this defaults to basic matrix calculation)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000001 || Use Autodesk Softimage matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000010 || Use Autodesk Maya matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000100 || Use Basic matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000001000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000010000 || UseImmidiateMtx (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000100000 || UsePostTexMtx (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000001000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000010000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000100000000 || NoMatrixTransform (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000001000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000010000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000100000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0001000000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0010000000000000 || DoBdlMaterialCalc&lt;br /&gt;
|-&lt;br /&gt;
| 0b0100000000000000 || NoBdlMaterialPatch - If set, skips the call to &#039;&#039;&#039;J3DModelLoader::readPatchedMaterial&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0b1000000000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
For all BMD files, the game always includes load flags &#039;&#039;Material_PE_Full&#039;&#039;, &#039;&#039;Material_UseIndirect&#039;&#039;, &#039;&#039;UseUniqueMaterials&#039;&#039;, and &#039;&#039;UNKNOWN_21&#039;&#039;.&amp;lt;br/&amp;gt;&lt;br /&gt;
For all BDL files, the game always includes load flags &#039;&#039;Material_UseIndirect&#039;&#039;, and &#039;&#039;UseUniqueMaterials&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;gt; &#039;&#039;Note: Changing the load flags by changing the code doesn&#039;t seem to do much.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Scene Hierarchy ===&lt;br /&gt;
Each model is constructed using a Scene Hierarchy. This simply determines the order of bones (in turn, defining the parent/child relations), material assignments, and Shape assignments.&lt;br /&gt;
&lt;br /&gt;
Each node consists of the following:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt16 || Node Type.&amp;lt;br/&amp;gt;0x00 = Marks the end of the node list&amp;lt;br/&amp;gt;0x01 = Creates a new child of the previous node&amp;lt;br/&amp;gt;0x02 = Finishes the child node and returns ownership to the previous node&amp;lt;br/&amp;gt;0x10 = Joint Assignment node. &amp;quot;Data&amp;quot; holds the Joint ID (index into JNT1)&amp;lt;br/&amp;gt;0x11 = Material assignment. &amp;quot;Data&amp;quot; holds the Material ID (index into MAT3)&amp;lt;br/&amp;gt;0x12 = Shape Assignment. &amp;quot;Data&amp;quot; holds the Shape ID (index into SHP1)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt16 || A Data value. Used by some nodes to index into other chunks. Usage depends on the node type.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The node list is padded to the nearest 32.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== VTX1 - Vertex Data ==&lt;br /&gt;
The &#039;&#039;&#039;V&#039;&#039;&#039;er&#039;&#039;&#039;t&#039;&#039;&#039;e&#039;&#039;&#039;x&#039;&#039;&#039; Data section contains the actual number values used for the properties of the geometry. It also includes the information on how the values are formatted.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;VTX1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int32 || Buffer Format list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || &amp;quot;POSITION&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || &amp;quot;NORMAL&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || &amp;quot;TANGENT&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || &amp;quot;COLOR_0&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Int32 || &amp;quot;COLOR_1&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Int32 || &amp;quot;TEXCOORD_0&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Int32 || &amp;quot;TEXCOORD_1&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Int32 || &amp;quot;TEXCOORD_2&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C || Int32 || &amp;quot;TEXCOORD_3&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x30 || Int32 || &amp;quot;TEXCOORD_4&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x34 || Int32 || &amp;quot;TEXCOORD_5&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x38 || Int32 || &amp;quot;TEXCOORD_6&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C || Int32 || &amp;quot;TEXCOORD_7&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Vertex Buffer Formats ===&lt;br /&gt;
Each of the Buffers in this section have a format descriptor. This allows different types of data storage, allowing for smaller files.&lt;br /&gt;
&lt;br /&gt;
Each format descriptor contains an Attribute Target, a Component Count, a Data Type, and a Mantissa shifter (to allow floats to be stored as smaller datatypes compared to FLOAT).&amp;lt;br/&amp;gt;Only one descriptor can exist for each attribute.&lt;br /&gt;
&lt;br /&gt;
The Attribute Target tells the game what this buffer is used for.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Attribute Targets&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000009 || POSITION || This buffer represents the positions of vertices in the model. Basically required for all visual models.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000A || NORMAL || This buffer represents vertex normals, used for the engine&#039;s vertex shading. Not needed if no material requires it.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000B || COLOR_0 || This buffer is available for Vertex Colors.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000C || COLOR_1 || This buffer is available for Vertex Colors.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000D || TEXCOORD_0 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000E || TEXCOORD_1 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000F || TEXCOORD_2 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000010 || TEXCOORD_3 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000011 || TEXCOORD_4 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000012 || TEXCOORD_5 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000013 || TEXCOORD_6 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000014 || TEXCOORD_7 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000019 || TANGENT || &#039;&#039;Currently unknown exactly what goes in here.&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x000000FF || List End || A buffer using this target will end the descriptor list.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The component count tells the game how many parts of the component that there are. Note that the values are considered based on the attribute target they&#039;re assigned to.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Component Count&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || POSITION_XY || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || POSITION_XYZ || Represents a position in 3D space with 3 values: X, Y, and Z.&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || NORMAL_XYZ || Represents a normal vector in 3D space with 3 values: X, Y, and Z.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || NORMAL_NBT || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || NORMAL_NBT3 || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || COLOR_RGB || Represents a color value with only Red, Green, and Blue values.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || COLOR_RGBA || Represents a color value with Red, Green, Blue, and Alpha values.&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || TEXCOORD_S || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || TEXCOORD_ST || Represents a UV texture coordinate with 2 values: X and Y.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Data Type tells the game how many bytes each value is, in the sense that an Int32 is 4 bytes, a Int16 is 2 bytes, a Float is 4 bytes, etc.&amp;lt;br/&amp;gt;Note that the Color values have a different set of options.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Data Types&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || UInt8 || 1 byte per value (0 to 255)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || Int8 || 1 byte per value (-128 to 127)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || UInt16 || 2 bytes per value (0 to 65535)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || Int16 || 2 bytes per value (-32,768 to 32,767)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || Float || 4 bytes per value&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || RGB565 || 2 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || RGB8 || 3 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || RGBX8 || 3 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || RGBA4 || 2 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || RGBA6 || 4 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000005 || RGBA8 || 4 bytes per color&lt;br /&gt;
|}&lt;br /&gt;
&amp;gt; &#039;&#039;Note: Both games require colors to be 4 bytes wide at all times, so changing from RGBA8 is worthless.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== EVP1 - Skinning Envelopes ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;EVP1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Envelopes stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || &amp;quot;Joint Count&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || &amp;quot;&#039;Joint Count&#039; list index&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || &amp;quot;Joint Weight&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || &amp;quot;Inverse Bind Matrices&amp;quot; list offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== DRW1 - Skinning Assignments ==&lt;br /&gt;
This section contains a map which redirects skinning information to the correct location: either JNT1 (Single Matrix) or EVP1 (Multi-Matrix)&amp;lt;br/&amp;gt;The Destination Type list and Destination ID list must be equal in length.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;DRW1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Entries stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Destination Type list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Destination ID list offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Destination Type List ===&lt;br /&gt;
This is an array of bytes that dictates the destination type. It is ordered so that all the &#039;&#039;&#039;Joint&#039;&#039;&#039;s come first, and all the &#039;&#039;&#039;Envelope&#039;&#039;&#039;s second.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Joint || Redirects to a Joint within [[#JNT1_-_Joint_Hierarchy|JNT1]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || Envelope || Redirects to an Envelope in [[#EVP1_-_Skinning_Envelopes|EVP1]]&lt;br /&gt;
|}&lt;br /&gt;
It&#039;s worth noting that Nintendo&#039;s development tools had a bug in it where all the &#039;&#039;&#039;Envelope&#039;&#039;&#039; entries were duplicated. Some JSystem games do not care about this, but certain games try to explicitly ignore this data, and therefore require the wasteful duplicate data.&lt;br /&gt;
&lt;br /&gt;
=== Destination ID List ===&lt;br /&gt;
This is an array of UInt16 that simply dictate an index into the provided section.&lt;br /&gt;
&lt;br /&gt;
DRW1 ends with padding to the nearest 32.&lt;br /&gt;
&lt;br /&gt;
== JNT1 - Joint Hierarchy ==&lt;br /&gt;
The &#039;&#039;&#039;J&#039;&#039;&#039;oi&#039;&#039;&#039;nt&#039;&#039;&#039; Hierarchy section defines the rigging skeleton of a model. There can only be one skeleton per model.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;JNT1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Joints stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Joint Data table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Remap table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Name table offset&amp;lt;br/&amp;gt;&amp;lt;small&amp;gt;0 if not present.&amp;lt;/small&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Joint Data ===&lt;br /&gt;
Each joint includes positional data and a bounding box which is used by the game for determining rendering range automatically.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int16 || Matrix Type&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || UInt8 || Parent Scale inheritance&amp;lt;br/&amp;gt;0 = Follow parent joint&#039;s scale&amp;lt;br/&amp;gt;1 = Ignore parent joint&#039;s scale&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt8 || Padding (0xFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Float || Scale X&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Float || Scale Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Float || Scale Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int16 || Rotation X&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || Int16 || Rotation Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int16 || Rotation Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x16 || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Float || Translation X&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Float || Translation Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Float || Translation Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Float || Bounding Sphere&amp;lt;br/&amp;gt;Should encapsulate all vertices that the joint affects&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Float || Bounding Box Minimum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C || Float || Bounding Box Minimum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x30 || Float || Bounding Box Minimum Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x34 || Float || Bounding Box Maximum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x38 || Float || Bounding Box Maximum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C || Float || Bounding Box Maximum Z&lt;br /&gt;
|}&lt;br /&gt;
Rotation is stored between -0x7FFF and 0x7FFF, which ranges -180 degrees and 180 degrees.&lt;br /&gt;
&lt;br /&gt;
== SHP1 - Shape Information==&lt;br /&gt;
The &#039;&#039;&#039;Sh&#039;&#039;&#039;a&#039;&#039;&#039;p&#039;&#039;&#039;e Information section determines how to use the data in the [[#VTX1_-_Vertex_Data|VTX1]] section to create shapes.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;SHP1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Shapes stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Shape Init Data offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Remap table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Name table offset&amp;lt;br/&amp;gt;(Generally not used, and thus set to 0)&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || Vertex Index Attribute table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Int32 || Weight Index table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Int32 || Primitive Data offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Int32 || Matrix Group Data offset (entry count must equal the entry count of the GXDisplayList group table)&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Int32 || Matrix Group Definition table offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Shape Data ===&lt;br /&gt;
Each shape denotes a Matrix Calculation type, which is used for Billboarding, as well as multi-joint skinning.&amp;lt;br/&amp;gt;A shape also hosts a collection of Matrix Groups. If the geometry needs to be weighted to more than 10 [[#DRW1_-_Skinning_Assignments|DRW1]] matrices, more than one Matrix Group is needed.&amp;lt;br/&amp;gt;A single Matrix Group can have multiple Primitives in it, but these Primitives must share the same set of [[#DRW1_-_Skinning_Assignments|DRW1]] matrices.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;TODO: Figure out what happens in the event that more than 10 are needed (such as one vertex being weighted to 11 bones). Is it just straight up not allowed?&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt8 || Matrix Type&lt;br /&gt;
&lt;br /&gt;
* 0 = Single Joint&lt;br /&gt;
&lt;br /&gt;
* 1 = Billboard Joint&lt;br /&gt;
&lt;br /&gt;
* 2 = Billboard Joint (Y axis only)&lt;br /&gt;
&lt;br /&gt;
* 3 = Multiple Joints&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || UInt8 || Padding (0xFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Int16 || Matrix Group count&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int16 || Vertex Index Attribute offset&amp;lt;br/&amp;gt;Relative to the Vertex Index Attribute Table offset defined in SHP1&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Int16 || Matrix Group Data index&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || First Matrix Group Definition index&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Float || Bounding Sphere&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Float || Bounding Box Minimum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Float || Bounding Box Minimum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Float || Bounding Box Minimum Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Float || Bounding Box Maximum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Float || Bounding Box Maximum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Float || Bounding Box Maximum Z&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Vertex Index Attribute Table ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int32 || An [[#Index%20Buffer%20Formats|index buffer]] attribute target&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || An [[#Index%20Buffer%20Formats|index buffer]] type&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Index Buffer Formats ====&lt;br /&gt;
Each of the Buffers in this section have a format descriptor. This allows different types of data storage, allowing for smaller files.&lt;br /&gt;
&lt;br /&gt;
These attributes line up with either a direct value that is stored in the shape, or an index into a [[#VTX1_-_Vertex_Data|VTX1]] [[#Vertex%20Buffer%20Formats|data buffer]].&amp;lt;br/&amp;gt;Only one indexer can exist for each attribute.&lt;br /&gt;
&lt;br /&gt;
The Attribute Target tells the game what this index buffer is used for.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Attribute Targets&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || POSITION_MATRIX || This is a direct list of indices into the Matrix Group&#039;s Weight collection. Required for Shapes that use Multiple Joint skinning.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || TEXTURE_0_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || TEXTURE_1_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || TEXTURE_2_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || TEXTURE_3_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000005 || TEXTURE_4_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000006 || TEXTURE_5_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000007 || TEXTURE_6_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000008 || TEXTURE_7_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000009 || POSITION || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;POSITION&amp;quot; buffer. Required.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000A || NORMAL || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;NORMAL&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000B || COLOR_0 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;COLOR_0&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000C || COLOR_1 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;COLOR_1&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000D || TEXCOORD_0 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_0&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000E || TEXCOORD_1 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_1&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000F || TEXCOORD_2 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_2&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000010 || TEXCOORD_3 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_3&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000011 || TEXCOORD_4 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_4&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000012 || TEXCOORD_5 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_5&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000013 || TEXCOORD_6 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_6&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000014 || TEXCOORD_7 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_7&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000019 || TANGENT || &#039;&#039;This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TANGENT&amp;quot; buffer, but we don&#039;t yet know what that buffer does.&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x000000FF || List End || A buffer using this target will end the descriptor list.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Data Type of an Index Buffer determines the size of each Index. Direct Buffers can only be 1 byte per value.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Data Types&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || None || Only used for the List End&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || Direct || 1 byte per value. Only used for data that is not stored within [[#VTX1_-_Vertex_Data|VTX1]]&amp;lt;br/&amp;gt;Needs to be divided by 3 for some reason...&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || UInt8 || 1 byte per value (0 to 255). Indexes a buffer in [[#VTX1_-_Vertex_Data|VTX1]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || UInt16 || 2 bytes per value (0 to 65535). Indexes a buffer in [[#VTX1_-_Vertex_Data|VTX1]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Primitive Data ===&lt;br /&gt;
This chunk contains raw primitives. These are what hold the index buffers.&amp;lt;br/&amp;gt;The Index Buffers are ordered the same way the Index Buffer Attributes are ordered. For example, POSITION (UInt16), NORMAL (UInt16), COLOR_0 (UInt8), TEXCOORD_0 (UInt16), would result in the following byte structure: &#039;&#039;&#039;PPPP NNNN C0 TXC0&#039;&#039;&#039;&amp;lt;br/&amp;gt;This repeats for each vertex in the primitive.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Uint8 || Primitive Type&lt;br /&gt;
&lt;br /&gt;
* 0x80 = Individual Quads&lt;br /&gt;
&lt;br /&gt;
* 0x90 = Individual Triangles&lt;br /&gt;
&lt;br /&gt;
* 0x98 = Triangle Strip&lt;br /&gt;
&lt;br /&gt;
* 0xA0 = Triangle Fan&lt;br /&gt;
&lt;br /&gt;
* 0xA8 = Individual Lines&lt;br /&gt;
&lt;br /&gt;
* 0xB0 = Line Strip&lt;br /&gt;
&lt;br /&gt;
* 0xB8 = Individual Points&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;TODO: Figure out if Quads, Lines, Line Strips, and Points work.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;small&amp;gt;TODO: Figure out if &amp;quot;Quad Strips&amp;quot; exist at 0x88.&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int16 || Vertex Count&lt;br /&gt;
|}&lt;br /&gt;
Each Matrix Group&#039;s primitive collection MUST be padded to the nearest 32. The game dies if you don&#039;t.&lt;br /&gt;
&lt;br /&gt;
=== Matrix Group Definition Table ===&lt;br /&gt;
This table defines a list of Matrix Groups for each Shape. A Shape can have multiple Matrix Groups, but only stores the index of the first one. This means that all the Matrix Groups for a given Shape must come directly one after another.&amp;lt;br/&amp;gt;It contains only two values: The size of all Primitive Data within this group, and an offset to the first Primitive (relative to the Primitive Data offset defined in SHP1).&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int32 || Primitive Data size&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || First Primitive offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Matrix Group Data Table ===&lt;br /&gt;
This table contains definitions of sub-segments inside the Weight Index Table. How these values are used differs based on the shape matrix calculation type, but official files generally set both usages up correctly regardless.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int16 || [[#DRW1_-_Skinning_Assignments|DRW1]] Matrix ID&amp;lt;br/&amp;gt;This is only used with Single Joint shape matrix calculation.&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Int16 || Matrix Count&amp;lt;br/&amp;gt;This is only used with Multiple Joint shape matrix calculation.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || Starting Weight Index&amp;lt;br/&amp;gt;This is only used with Multiple Joint shape matrix calculation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Weight Index Table ===&lt;br /&gt;
This table contains several indices into [[#DRW1_-_Skinning_Assignments|DRW1]].&amp;lt;br/&amp;gt;Each index is a Signed 16 value.&amp;lt;br/&amp;gt;The values may also contain 0xFFFF, which indicates that the last used index should be used instead.&amp;lt;br/&amp;gt;Matrix Groups can select a segment of these indices (up to 10) for use. A Matrix Group must not start with 0xFFFF.&lt;br /&gt;
&lt;br /&gt;
== MAT2 - Material List (Old) ==&lt;br /&gt;
Technically supported by the game, but not known to be used by any model.&lt;br /&gt;
&lt;br /&gt;
== MAT3 - Material List ==&lt;br /&gt;
&lt;br /&gt;
== MDL3 - Display List ==&lt;br /&gt;
&lt;br /&gt;
== TEX1 - Texture Data ==&lt;br /&gt;
The &#039;&#039;&#039;Tex&#039;&#039;&#039;ture Information section holds several embedded [[BTI_(File_Format)|BTI]] files that [[#MAT3_-_Material_List|MAT3]] can reference by index for texture assignment.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;TEX1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of [[BTI_(File_Format)|BTI]] files stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || [[BTI_(File_Format)|BTI]] Header Table Offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Name table offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The texture data locations are defined by the [[BTI_(File_Format)|BTI]] headers (which themselves are located directly one after another at the Header Table)&amp;lt;br/&amp;gt;&lt;br /&gt;
This structure allows multiple textures that have the same visual data to have their headers point to just one block of visual data. In other words, two identical textures can be &amp;quot;compressed&amp;quot; into one while still having their own properties (wrapping, filtering, etc.)&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=952</id>
		<title>BMD/BDL (File Format)</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=952"/>
		<updated>2025-10-26T00:43:51Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: /* Primitive Data */ Turns out you need to pad the primitive collections&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:File formats]]&lt;br /&gt;
{{WIP}}&lt;br /&gt;
&lt;br /&gt;
BMD (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;M&#039;&#039;&#039;o&#039;&#039;&#039;d&#039;&#039;&#039;el) and BDL (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;D&#039;&#039;&#039;isplay &#039;&#039;&#039;L&#039;&#039;&#039;ist) are two 3D model formats used in &#039;&#039;Super Mario Galaxy&#039;&#039; and &#039;&#039;Super Mario Galaxy 2&#039;&#039;, among a few other &#039;&#039;Wii&#039;&#039; and &#039;&#039;GameCube&#039;&#039; games, such as &#039;&#039;Super Mario Sunshine&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These two formats hold the same data, except BDL contains an additional set of data which is used for faster rendering speeds.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Super Mario Galaxy&#039;&#039; &amp;amp; &#039;&#039;Super Mario Galaxy 2&#039;&#039; contain J3DLoader versions 21 and 26.&lt;br /&gt;
&lt;br /&gt;
== File Header ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || The magic that tells the game which format this file is. (ASCII)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bmd2&#039;&#039;&#039; for BMD (J3DLoader V21)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bmd3&#039;&#039;&#039; for BMD (J3DLoader v26)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bdl4&#039;&#039;&#039; for BDL (J3DLoader v26)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int32 || The total size of the file&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || The number of chunks present in this file.&amp;lt;br/&amp;gt;&#039;&#039;&#039;8&#039;&#039;&#039; for BMD&amp;lt;br/&amp;gt;&#039;&#039;&#039;9&#039;&#039;&#039; for BDL&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Subversion Header ===&lt;br /&gt;
This part of the header is not used, and can be anything.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || A 4 character value representing the Subversion. Usually SVR3 for SMG/2.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Byte[12] || Twelve bytes of padding. Usually these are &#039;&#039;&#039;0xFF&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== INF1 - Scene Information ==&lt;br /&gt;
The &#039;&#039;&#039;Inf&#039;&#039;&#039;ormation section hosts a hierarchy of Joints, Materials, and Shapes, which are used to render the model.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;INF1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || [[#J3DLoader%20Flags|J3DLoader Flags]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Matrix Group Data Count&amp;lt;br/&amp;gt;Referring to the Matrix Group Data in [[#SHP1_-_Shape_Information|SHP1]]&amp;lt;br/&amp;gt;&amp;lt;small&amp;gt;Stored in a variable by the game, but not used to dictate the actual number of Matrix Groups.&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Vertex Count&amp;lt;br/&amp;gt;Always equals the number of entries in the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;POSITION&amp;quot; [[#Vertex%20Buffer%20Formats|data buffer]]&amp;lt;br/&amp;gt;&amp;lt;small&amp;gt;Stored in a variable by the game, but never used for anything. The game reads Vertex Data directly from the [[#Vertex%20Buffer%20Formats|data buffer]]s without bounds checking.&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Relative offset to the [[#Scene%20Hierarchy|Scene Hierarchy]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== J3DLoader Flags ===&lt;br /&gt;
The J3DLoader contains several flags which affect how models are handled. There are more than what are shown here, however, those must be applied by the game itself in the code.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000000 || No flags applied (TODO: Check if this defaults to basic matrix calculation)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000001 || Use Autodesk Softimage matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000010 || Use Autodesk Maya matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000100 || Use Basic matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000001000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000010000 || UseImmidiateMtx (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000100000 || UsePostTexMtx (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000001000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000010000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000100000000 || NoMatrixTransform (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000001000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000010000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000100000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0001000000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0010000000000000 || DoBdlMaterialCalc&lt;br /&gt;
|-&lt;br /&gt;
| 0b0100000000000000 || NoBdlMaterialPatch - If set, skips the call to &#039;&#039;&#039;J3DModelLoader::readPatchedMaterial&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0b1000000000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
For all BMD files, the game always includes load flags &#039;&#039;Material_PE_Full&#039;&#039;, &#039;&#039;Material_UseIndirect&#039;&#039;, &#039;&#039;UseUniqueMaterials&#039;&#039;, and &#039;&#039;UNKNOWN_21&#039;&#039;.&amp;lt;br/&amp;gt;&lt;br /&gt;
For all BDL files, the game always includes load flags &#039;&#039;Material_UseIndirect&#039;&#039;, and &#039;&#039;UseUniqueMaterials&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;gt; &#039;&#039;Note: Changing the load flags by changing the code doesn&#039;t seem to do much.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Scene Hierarchy ===&lt;br /&gt;
Each model is constructed using a Scene Hierarchy. This simply determines the order of bones (in turn, defining the parent/child relations), material assignments, and Shape assignments.&lt;br /&gt;
&lt;br /&gt;
Each node consists of the following:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt16 || Node Type.&amp;lt;br/&amp;gt;0x00 = Marks the end of the node list&amp;lt;br/&amp;gt;0x01 = Creates a new child of the previous node&amp;lt;br/&amp;gt;0x02 = Finishes the child node and returns ownership to the previous node&amp;lt;br/&amp;gt;0x10 = Joint Assignment node. &amp;quot;Data&amp;quot; holds the Joint ID (index into JNT1)&amp;lt;br/&amp;gt;0x11 = Material assignment. &amp;quot;Data&amp;quot; holds the Material ID (index into MAT3)&amp;lt;br/&amp;gt;0x12 = Shape Assignment. &amp;quot;Data&amp;quot; holds the Shape ID (index into SHP1)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt16 || A Data value. Used by some nodes to index into other chunks. Usage depends on the node type.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The node list is padded to the nearest 32.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== VTX1 - Vertex Data ==&lt;br /&gt;
The &#039;&#039;&#039;V&#039;&#039;&#039;er&#039;&#039;&#039;t&#039;&#039;&#039;e&#039;&#039;&#039;x&#039;&#039;&#039; Data section contains the actual number values used for the properties of the geometry. It also includes the information on how the values are formatted.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;VTX1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int32 || Buffer Format list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || &amp;quot;POSITION&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || &amp;quot;NORMAL&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || &amp;quot;TANGENT&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || &amp;quot;COLOR_0&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Int32 || &amp;quot;COLOR_1&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Int32 || &amp;quot;TEXCOORD_0&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Int32 || &amp;quot;TEXCOORD_1&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Int32 || &amp;quot;TEXCOORD_2&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C || Int32 || &amp;quot;TEXCOORD_3&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x30 || Int32 || &amp;quot;TEXCOORD_4&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x34 || Int32 || &amp;quot;TEXCOORD_5&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x38 || Int32 || &amp;quot;TEXCOORD_6&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C || Int32 || &amp;quot;TEXCOORD_7&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Vertex Buffer Formats ===&lt;br /&gt;
Each of the Buffers in this section have a format descriptor. This allows different types of data storage, allowing for smaller files.&lt;br /&gt;
&lt;br /&gt;
Each format descriptor contains an Attribute Target, a Component Count, a Data Type, and a Mantissa shifter (to allow floats to be stored as smaller datatypes compared to FLOAT).&amp;lt;br/&amp;gt;Only one descriptor can exist for each attribute.&lt;br /&gt;
&lt;br /&gt;
The Attribute Target tells the game what this buffer is used for.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Attribute Targets&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000009 || POSITION || This buffer represents the positions of vertices in the model. Basically required for all visual models.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000A || NORMAL || This buffer represents vertex normals, used for the engine&#039;s vertex shading. Not needed if no material requires it.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000B || COLOR_0 || This buffer is available for Vertex Colors.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000C || COLOR_1 || This buffer is available for Vertex Colors.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000D || TEXCOORD_0 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000E || TEXCOORD_1 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000F || TEXCOORD_2 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000010 || TEXCOORD_3 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000011 || TEXCOORD_4 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000012 || TEXCOORD_5 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000013 || TEXCOORD_6 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000014 || TEXCOORD_7 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000019 || TANGENT || &#039;&#039;Currently unknown exactly what goes in here.&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x000000FF || List End || A buffer using this target will end the descriptor list.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The component count tells the game how many parts of the component that there are. Note that the values are considered based on the attribute target they&#039;re assigned to.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Component Count&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || POSITION_XY || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || POSITION_XYZ || Represents a position in 3D space with 3 values: X, Y, and Z.&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || NORMAL_XYZ || Represents a normal vector in 3D space with 3 values: X, Y, and Z.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || NORMAL_NBT || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || NORMAL_NBT3 || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || COLOR_RGB || Represents a color value with only Red, Green, and Blue values.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || COLOR_RGBA || Represents a color value with Red, Green, Blue, and Alpha values.&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || TEXCOORD_S || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || TEXCOORD_ST || Represents a UV texture coordinate with 2 values: X and Y.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Data Type tells the game how many bytes each value is, in the sense that an Int32 is 4 bytes, a Int16 is 2 bytes, a Float is 4 bytes, etc.&amp;lt;br/&amp;gt;Note that the Color values have a different set of options.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Data Types&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || UInt8 || 1 byte per value (0 to 255)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || Int8 || 1 byte per value (-128 to 127)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || UInt16 || 2 bytes per value (0 to 65535)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || Int16 || 2 bytes per value (-32,768 to 32,767)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || Float || 4 bytes per value&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || RGB565 || 2 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || RGB8 || 3 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || RGBX8 || 3 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || RGBA4 || 2 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || RGBA6 || 4 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000005 || RGBA8 || 4 bytes per color&lt;br /&gt;
|}&lt;br /&gt;
&amp;gt; &#039;&#039;Note: Both games require colors to be 4 bytes wide at all times, so changing from RGBA8 is worthless.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== EVP1 - Skinning Envelopes ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;EVP1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Envelopes stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || &amp;quot;Joint Count&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || &amp;quot;&#039;Joint Count&#039; list index&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || &amp;quot;Joint Weight&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || &amp;quot;Inverse Bind Matrices&amp;quot; list offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== DRW1 - Skinning Assignments ==&lt;br /&gt;
&lt;br /&gt;
== JNT1 - Joint Hierarchy ==&lt;br /&gt;
The &#039;&#039;&#039;J&#039;&#039;&#039;oi&#039;&#039;&#039;nt&#039;&#039;&#039; Hierarchy section defines the rigging skeleton of a model. There can only be one skeleton per model.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;JNT1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Joints stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Joint Data table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Remap table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Name table offset&amp;lt;br/&amp;gt;&amp;lt;small&amp;gt;0 if not present.&amp;lt;/small&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Joint Data ===&lt;br /&gt;
Each joint includes positional data and a bounding box which is used by the game for determining rendering range automatically.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int16 || Matrix Type&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || UInt8 || Parent Scale inheritance&amp;lt;br/&amp;gt;0 = Follow parent joint&#039;s scale&amp;lt;br/&amp;gt;1 = Ignore parent joint&#039;s scale&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt8 || Padding (0xFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Float || Scale X&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Float || Scale Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Float || Scale Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int16 || Rotation X&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || Int16 || Rotation Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int16 || Rotation Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x16 || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Float || Translation X&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Float || Translation Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Float || Translation Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Float || Bounding Sphere&amp;lt;br/&amp;gt;Should encapsulate all vertices that the joint affects&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Float || Bounding Box Minimum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C || Float || Bounding Box Minimum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x30 || Float || Bounding Box Minimum Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x34 || Float || Bounding Box Maximum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x38 || Float || Bounding Box Maximum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C || Float || Bounding Box Maximum Z&lt;br /&gt;
|}&lt;br /&gt;
Rotation is stored between -0x7FFF and 0x7FFF, which ranges -180 degrees and 180 degrees.&lt;br /&gt;
&lt;br /&gt;
== SHP1 - Shape Information==&lt;br /&gt;
The &#039;&#039;&#039;Sh&#039;&#039;&#039;a&#039;&#039;&#039;p&#039;&#039;&#039;e Information section determines how to use the data in the [[#VTX1_-_Vertex_Data|VTX1]] section to create shapes.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;SHP1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Shapes stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Shape Init Data offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Remap table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Name table offset&amp;lt;br/&amp;gt;(Generally not used, and thus set to 0)&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || Vertex Index Attribute table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Int32 || Weight Index table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Int32 || Primitive Data offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Int32 || Matrix Group Data offset (entry count must equal the entry count of the GXDisplayList group table)&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Int32 || Matrix Group Definition table offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Shape Data ===&lt;br /&gt;
Each shape denotes a Matrix Calculation type, which is used for Billboarding, as well as multi-joint skinning.&amp;lt;br/&amp;gt;A shape also hosts a collection of Matrix Groups. If the geometry needs to be weighted to more than 10 [[#DRW1_-_Skinning_Assignments|DRW1]] matrices, more than one Matrix Group is needed.&amp;lt;br/&amp;gt;A single Matrix Group can have multiple Primitives in it, but these Primitives must share the same set of [[#DRW1_-_Skinning_Assignments|DRW1]] matrices.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;TODO: Figure out what happens in the event that more than 10 are needed (such as one vertex being weighted to 11 bones). Is it just straight up not allowed?&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt8 || Matrix Type&lt;br /&gt;
&lt;br /&gt;
* 0 = Single Joint&lt;br /&gt;
&lt;br /&gt;
* 1 = Billboard Joint&lt;br /&gt;
&lt;br /&gt;
* 2 = Billboard Joint (Y axis only)&lt;br /&gt;
&lt;br /&gt;
* 3 = Multiple Joints&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || UInt8 || Padding (0xFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Int16 || Matrix Group count&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int16 || Vertex Index Attribute offset&amp;lt;br/&amp;gt;Relative to the Vertex Index Attribute Table offset defined in SHP1&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Int16 || Matrix Group Data index&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || First Matrix Group Definition index&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Float || Bounding Sphere&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Float || Bounding Box Minimum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Float || Bounding Box Minimum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Float || Bounding Box Minimum Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Float || Bounding Box Maximum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Float || Bounding Box Maximum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Float || Bounding Box Maximum Z&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Vertex Index Attribute Table ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int32 || An [[#Index%20Buffer%20Formats|index buffer]] attribute target&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || An [[#Index%20Buffer%20Formats|index buffer]] type&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Index Buffer Formats ====&lt;br /&gt;
Each of the Buffers in this section have a format descriptor. This allows different types of data storage, allowing for smaller files.&lt;br /&gt;
&lt;br /&gt;
These attributes line up with either a direct value that is stored in the shape, or an index into a [[#VTX1_-_Vertex_Data|VTX1]] [[#Vertex%20Buffer%20Formats|data buffer]].&amp;lt;br/&amp;gt;Only one indexer can exist for each attribute.&lt;br /&gt;
&lt;br /&gt;
The Attribute Target tells the game what this index buffer is used for.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Attribute Targets&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || POSITION_MATRIX || This is a direct list of indices into the Matrix Group&#039;s Weight collection. Required for Shapes that use Multiple Joint skinning.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || TEXTURE_0_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || TEXTURE_1_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || TEXTURE_2_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || TEXTURE_3_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000005 || TEXTURE_4_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000006 || TEXTURE_5_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000007 || TEXTURE_6_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000008 || TEXTURE_7_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000009 || POSITION || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;POSITION&amp;quot; buffer. Required.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000A || NORMAL || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;NORMAL&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000B || COLOR_0 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;COLOR_0&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000C || COLOR_1 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;COLOR_1&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000D || TEXCOORD_0 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_0&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000E || TEXCOORD_1 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_1&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000F || TEXCOORD_2 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_2&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000010 || TEXCOORD_3 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_3&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000011 || TEXCOORD_4 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_4&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000012 || TEXCOORD_5 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_5&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000013 || TEXCOORD_6 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_6&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000014 || TEXCOORD_7 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_7&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000019 || TANGENT || &#039;&#039;This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TANGENT&amp;quot; buffer, but we don&#039;t yet know what that buffer does.&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x000000FF || List End || A buffer using this target will end the descriptor list.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Data Type of an Index Buffer determines the size of each Index. Direct Buffers can only be 1 byte per value.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Data Types&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || None || Only used for the List End&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || Direct || 1 byte per value. Only used for data that is not stored within [[#VTX1_-_Vertex_Data|VTX1]]&amp;lt;br/&amp;gt;Needs to be divided by 3 for some reason...&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || UInt8 || 1 byte per value (0 to 255). Indexes a buffer in [[#VTX1_-_Vertex_Data|VTX1]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || UInt16 || 2 bytes per value (0 to 65535). Indexes a buffer in [[#VTX1_-_Vertex_Data|VTX1]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Primitive Data ===&lt;br /&gt;
This chunk contains raw primitives. These are what hold the index buffers.&amp;lt;br/&amp;gt;The Index Buffers are ordered the same way the Index Buffer Attributes are ordered. For example, POSITION (UInt16), NORMAL (UInt16), COLOR_0 (UInt8), TEXCOORD_0 (UInt16), would result in the following byte structure: &#039;&#039;&#039;PPPP NNNN C0 TXC0&#039;&#039;&#039;&amp;lt;br/&amp;gt;This repeats for each vertex in the primitive.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Uint8 || Primitive Type&lt;br /&gt;
&lt;br /&gt;
* 0x80 = Individual Quads&lt;br /&gt;
&lt;br /&gt;
* 0x90 = Individual Triangles&lt;br /&gt;
&lt;br /&gt;
* 0x98 = Triangle Strip&lt;br /&gt;
&lt;br /&gt;
* 0xA0 = Triangle Fan&lt;br /&gt;
&lt;br /&gt;
* 0xA8 = Individual Lines&lt;br /&gt;
&lt;br /&gt;
* 0xB0 = Line Strip&lt;br /&gt;
&lt;br /&gt;
* 0xB8 = Individual Points&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;TODO: Figure out if Quads, Lines, Line Strips, and Points work.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;small&amp;gt;TODO: Figure out if &amp;quot;Quad Strips&amp;quot; exist at 0x88.&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int16 || Vertex Count&lt;br /&gt;
|}&lt;br /&gt;
Each Matrix Group&#039;s primitive collection MUST be padded to the nearest 32. The game dies if you don&#039;t.&lt;br /&gt;
&lt;br /&gt;
=== Matrix Group Definition Table ===&lt;br /&gt;
This table defines a list of Matrix Groups for each Shape. A Shape can have multiple Matrix Groups, but only stores the index of the first one. This means that all the Matrix Groups for a given Shape must come directly one after another.&amp;lt;br/&amp;gt;It contains only two values: The size of all Primitive Data within this group, and an offset to the first Primitive (relative to the Primitive Data offset defined in SHP1).&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int32 || Primitive Data size&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || First Primitive offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Matrix Group Data Table ===&lt;br /&gt;
This table contains definitions of sub-segments inside the Weight Index Table. How these values are used differs based on the shape matrix calculation type, but official files generally set both usages up correctly regardless.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int16 || [[#DRW1_-_Skinning_Assignments|DRW1]] Matrix ID&amp;lt;br/&amp;gt;This is only used with Single Joint shape matrix calculation.&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Int16 || Matrix Count&amp;lt;br/&amp;gt;This is only used with Multiple Joint shape matrix calculation.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || Starting Weight Index&amp;lt;br/&amp;gt;This is only used with Multiple Joint shape matrix calculation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Weight Index Table ===&lt;br /&gt;
This table contains several indices into [[#DRW1_-_Skinning_Assignments|DRW1]].&amp;lt;br/&amp;gt;Each index is a Signed 16 value.&amp;lt;br/&amp;gt;The values may also contain 0xFFFF, which indicates that the last used index should be used instead.&amp;lt;br/&amp;gt;Matrix Groups can select a segment of these indices (up to 10) for use. A Matrix Group must not start with 0xFFFF.&lt;br /&gt;
&lt;br /&gt;
== MAT2 - Material List (Old) ==&lt;br /&gt;
Technically supported by the game, but not known to be used by any model.&lt;br /&gt;
&lt;br /&gt;
== MAT3 - Material List ==&lt;br /&gt;
&lt;br /&gt;
== MDL3 - Display List ==&lt;br /&gt;
&lt;br /&gt;
== TEX1 - Texture Data ==&lt;br /&gt;
The &#039;&#039;&#039;Tex&#039;&#039;&#039;ture Information section holds several embedded [[BTI_(File_Format)|BTI]] files that [[#MAT3_-_Material_List|MAT3]] can reference by index for texture assignment.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;TEX1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of [[BTI_(File_Format)|BTI]] files stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || [[BTI_(File_Format)|BTI]] Header Table Offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Name table offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The texture data locations are defined by the [[BTI_(File_Format)|BTI]] headers (which themselves are located directly one after another at the Header Table)&amp;lt;br/&amp;gt;&lt;br /&gt;
This structure allows multiple textures that have the same visual data to have their headers point to just one block of visual data. In other words, two identical textures can be &amp;quot;compressed&amp;quot; into one while still having their own properties (wrapping, filtering, etc.)&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=951</id>
		<title>BMD/BDL (File Format)</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=951"/>
		<updated>2025-10-25T23:36:27Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: /* JNT1 - Joint Hierarchy */ Fix formatting on the last minor edit&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:File formats]]&lt;br /&gt;
{{WIP}}&lt;br /&gt;
&lt;br /&gt;
BMD (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;M&#039;&#039;&#039;o&#039;&#039;&#039;d&#039;&#039;&#039;el) and BDL (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;D&#039;&#039;&#039;isplay &#039;&#039;&#039;L&#039;&#039;&#039;ist) are two 3D model formats used in &#039;&#039;Super Mario Galaxy&#039;&#039; and &#039;&#039;Super Mario Galaxy 2&#039;&#039;, among a few other &#039;&#039;Wii&#039;&#039; and &#039;&#039;GameCube&#039;&#039; games, such as &#039;&#039;Super Mario Sunshine&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These two formats hold the same data, except BDL contains an additional set of data which is used for faster rendering speeds.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Super Mario Galaxy&#039;&#039; &amp;amp; &#039;&#039;Super Mario Galaxy 2&#039;&#039; contain J3DLoader versions 21 and 26.&lt;br /&gt;
&lt;br /&gt;
== File Header ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || The magic that tells the game which format this file is. (ASCII)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bmd2&#039;&#039;&#039; for BMD (J3DLoader V21)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bmd3&#039;&#039;&#039; for BMD (J3DLoader v26)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bdl4&#039;&#039;&#039; for BDL (J3DLoader v26)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int32 || The total size of the file&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || The number of chunks present in this file.&amp;lt;br/&amp;gt;&#039;&#039;&#039;8&#039;&#039;&#039; for BMD&amp;lt;br/&amp;gt;&#039;&#039;&#039;9&#039;&#039;&#039; for BDL&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Subversion Header ===&lt;br /&gt;
This part of the header is not used, and can be anything.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || A 4 character value representing the Subversion. Usually SVR3 for SMG/2.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Byte[12] || Twelve bytes of padding. Usually these are &#039;&#039;&#039;0xFF&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== INF1 - Scene Information ==&lt;br /&gt;
The &#039;&#039;&#039;Inf&#039;&#039;&#039;ormation section hosts a hierarchy of Joints, Materials, and Shapes, which are used to render the model.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;INF1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || [[#J3DLoader%20Flags|J3DLoader Flags]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Matrix Group Data Count&amp;lt;br/&amp;gt;Referring to the Matrix Group Data in [[#SHP1_-_Shape_Information|SHP1]]&amp;lt;br/&amp;gt;&amp;lt;small&amp;gt;Stored in a variable by the game, but not used to dictate the actual number of Matrix Groups.&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Vertex Count&amp;lt;br/&amp;gt;Always equals the number of entries in the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;POSITION&amp;quot; [[#Vertex%20Buffer%20Formats|data buffer]]&amp;lt;br/&amp;gt;&amp;lt;small&amp;gt;Stored in a variable by the game, but never used for anything. The game reads Vertex Data directly from the [[#Vertex%20Buffer%20Formats|data buffer]]s without bounds checking.&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Relative offset to the [[#Scene%20Hierarchy|Scene Hierarchy]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== J3DLoader Flags ===&lt;br /&gt;
The J3DLoader contains several flags which affect how models are handled. There are more than what are shown here, however, those must be applied by the game itself in the code.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000000 || No flags applied (TODO: Check if this defaults to basic matrix calculation)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000001 || Use Autodesk Softimage matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000010 || Use Autodesk Maya matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000100 || Use Basic matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000001000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000010000 || UseImmidiateMtx (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000100000 || UsePostTexMtx (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000001000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000010000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000100000000 || NoMatrixTransform (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000001000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000010000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000100000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0001000000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0010000000000000 || DoBdlMaterialCalc&lt;br /&gt;
|-&lt;br /&gt;
| 0b0100000000000000 || NoBdlMaterialPatch - If set, skips the call to &#039;&#039;&#039;J3DModelLoader::readPatchedMaterial&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0b1000000000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
For all BMD files, the game always includes load flags &#039;&#039;Material_PE_Full&#039;&#039;, &#039;&#039;Material_UseIndirect&#039;&#039;, &#039;&#039;UseUniqueMaterials&#039;&#039;, and &#039;&#039;UNKNOWN_21&#039;&#039;.&amp;lt;br/&amp;gt;&lt;br /&gt;
For all BDL files, the game always includes load flags &#039;&#039;Material_UseIndirect&#039;&#039;, and &#039;&#039;UseUniqueMaterials&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;gt; &#039;&#039;Note: Changing the load flags by changing the code doesn&#039;t seem to do much.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Scene Hierarchy ===&lt;br /&gt;
Each model is constructed using a Scene Hierarchy. This simply determines the order of bones (in turn, defining the parent/child relations), material assignments, and Shape assignments.&lt;br /&gt;
&lt;br /&gt;
Each node consists of the following:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt16 || Node Type.&amp;lt;br/&amp;gt;0x00 = Marks the end of the node list&amp;lt;br/&amp;gt;0x01 = Creates a new child of the previous node&amp;lt;br/&amp;gt;0x02 = Finishes the child node and returns ownership to the previous node&amp;lt;br/&amp;gt;0x10 = Joint Assignment node. &amp;quot;Data&amp;quot; holds the Joint ID (index into JNT1)&amp;lt;br/&amp;gt;0x11 = Material assignment. &amp;quot;Data&amp;quot; holds the Material ID (index into MAT3)&amp;lt;br/&amp;gt;0x12 = Shape Assignment. &amp;quot;Data&amp;quot; holds the Shape ID (index into SHP1)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt16 || A Data value. Used by some nodes to index into other chunks. Usage depends on the node type.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The node list is padded to the nearest 32.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== VTX1 - Vertex Data ==&lt;br /&gt;
The &#039;&#039;&#039;V&#039;&#039;&#039;er&#039;&#039;&#039;t&#039;&#039;&#039;e&#039;&#039;&#039;x&#039;&#039;&#039; Data section contains the actual number values used for the properties of the geometry. It also includes the information on how the values are formatted.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;VTX1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int32 || Buffer Format list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || &amp;quot;POSITION&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || &amp;quot;NORMAL&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || &amp;quot;TANGENT&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || &amp;quot;COLOR_0&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Int32 || &amp;quot;COLOR_1&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Int32 || &amp;quot;TEXCOORD_0&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Int32 || &amp;quot;TEXCOORD_1&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Int32 || &amp;quot;TEXCOORD_2&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C || Int32 || &amp;quot;TEXCOORD_3&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x30 || Int32 || &amp;quot;TEXCOORD_4&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x34 || Int32 || &amp;quot;TEXCOORD_5&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x38 || Int32 || &amp;quot;TEXCOORD_6&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C || Int32 || &amp;quot;TEXCOORD_7&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Vertex Buffer Formats ===&lt;br /&gt;
Each of the Buffers in this section have a format descriptor. This allows different types of data storage, allowing for smaller files.&lt;br /&gt;
&lt;br /&gt;
Each format descriptor contains an Attribute Target, a Component Count, a Data Type, and a Mantissa shifter (to allow floats to be stored as smaller datatypes compared to FLOAT).&amp;lt;br/&amp;gt;Only one descriptor can exist for each attribute.&lt;br /&gt;
&lt;br /&gt;
The Attribute Target tells the game what this buffer is used for.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Attribute Targets&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000009 || POSITION || This buffer represents the positions of vertices in the model. Basically required for all visual models.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000A || NORMAL || This buffer represents vertex normals, used for the engine&#039;s vertex shading. Not needed if no material requires it.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000B || COLOR_0 || This buffer is available for Vertex Colors.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000C || COLOR_1 || This buffer is available for Vertex Colors.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000D || TEXCOORD_0 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000E || TEXCOORD_1 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000F || TEXCOORD_2 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000010 || TEXCOORD_3 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000011 || TEXCOORD_4 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000012 || TEXCOORD_5 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000013 || TEXCOORD_6 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000014 || TEXCOORD_7 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000019 || TANGENT || &#039;&#039;Currently unknown exactly what goes in here.&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x000000FF || List End || A buffer using this target will end the descriptor list.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The component count tells the game how many parts of the component that there are. Note that the values are considered based on the attribute target they&#039;re assigned to.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Component Count&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || POSITION_XY || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || POSITION_XYZ || Represents a position in 3D space with 3 values: X, Y, and Z.&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || NORMAL_XYZ || Represents a normal vector in 3D space with 3 values: X, Y, and Z.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || NORMAL_NBT || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || NORMAL_NBT3 || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || COLOR_RGB || Represents a color value with only Red, Green, and Blue values.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || COLOR_RGBA || Represents a color value with Red, Green, Blue, and Alpha values.&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || TEXCOORD_S || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || TEXCOORD_ST || Represents a UV texture coordinate with 2 values: X and Y.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Data Type tells the game how many bytes each value is, in the sense that an Int32 is 4 bytes, a Int16 is 2 bytes, a Float is 4 bytes, etc.&amp;lt;br/&amp;gt;Note that the Color values have a different set of options.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Data Types&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || UInt8 || 1 byte per value (0 to 255)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || Int8 || 1 byte per value (-128 to 127)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || UInt16 || 2 bytes per value (0 to 65535)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || Int16 || 2 bytes per value (-32,768 to 32,767)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || Float || 4 bytes per value&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || RGB565 || 2 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || RGB8 || 3 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || RGBX8 || 3 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || RGBA4 || 2 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || RGBA6 || 4 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000005 || RGBA8 || 4 bytes per color&lt;br /&gt;
|}&lt;br /&gt;
&amp;gt; &#039;&#039;Note: Both games require colors to be 4 bytes wide at all times, so changing from RGBA8 is worthless.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== EVP1 - Skinning Envelopes ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;EVP1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Envelopes stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || &amp;quot;Joint Count&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || &amp;quot;&#039;Joint Count&#039; list index&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || &amp;quot;Joint Weight&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || &amp;quot;Inverse Bind Matrices&amp;quot; list offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== DRW1 - Skinning Assignments ==&lt;br /&gt;
&lt;br /&gt;
== JNT1 - Joint Hierarchy ==&lt;br /&gt;
The &#039;&#039;&#039;J&#039;&#039;&#039;oi&#039;&#039;&#039;nt&#039;&#039;&#039; Hierarchy section defines the rigging skeleton of a model. There can only be one skeleton per model.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;JNT1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Joints stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Joint Data table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Remap table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Name table offset&amp;lt;br/&amp;gt;&amp;lt;small&amp;gt;0 if not present.&amp;lt;/small&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Joint Data ===&lt;br /&gt;
Each joint includes positional data and a bounding box which is used by the game for determining rendering range automatically.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int16 || Matrix Type&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || UInt8 || Parent Scale inheritance&amp;lt;br/&amp;gt;0 = Follow parent joint&#039;s scale&amp;lt;br/&amp;gt;1 = Ignore parent joint&#039;s scale&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt8 || Padding (0xFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Float || Scale X&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Float || Scale Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Float || Scale Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int16 || Rotation X&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || Int16 || Rotation Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int16 || Rotation Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x16 || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Float || Translation X&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Float || Translation Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Float || Translation Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Float || Bounding Sphere&amp;lt;br/&amp;gt;Should encapsulate all vertices that the joint affects&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Float || Bounding Box Minimum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C || Float || Bounding Box Minimum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x30 || Float || Bounding Box Minimum Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x34 || Float || Bounding Box Maximum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x38 || Float || Bounding Box Maximum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C || Float || Bounding Box Maximum Z&lt;br /&gt;
|}&lt;br /&gt;
Rotation is stored between -0x7FFF and 0x7FFF, which ranges -180 degrees and 180 degrees.&lt;br /&gt;
&lt;br /&gt;
== SHP1 - Shape Information==&lt;br /&gt;
The &#039;&#039;&#039;Sh&#039;&#039;&#039;a&#039;&#039;&#039;p&#039;&#039;&#039;e Information section determines how to use the data in the [[#VTX1_-_Vertex_Data|VTX1]] section to create shapes.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;SHP1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Shapes stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Shape Init Data offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Remap table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Name table offset&amp;lt;br/&amp;gt;(Generally not used, and thus set to 0)&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || Vertex Index Attribute table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Int32 || Weight Index table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Int32 || Primitive Data offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Int32 || Matrix Group Data offset (entry count must equal the entry count of the GXDisplayList group table)&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Int32 || Matrix Group Definition table offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Shape Data ===&lt;br /&gt;
Each shape denotes a Matrix Calculation type, which is used for Billboarding, as well as multi-joint skinning.&amp;lt;br/&amp;gt;A shape also hosts a collection of Matrix Groups. If the geometry needs to be weighted to more than 10 [[#DRW1_-_Skinning_Assignments|DRW1]] matrices, more than one Matrix Group is needed.&amp;lt;br/&amp;gt;A single Matrix Group can have multiple Primitives in it, but these Primitives must share the same set of [[#DRW1_-_Skinning_Assignments|DRW1]] matrices.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;TODO: Figure out what happens in the event that more than 10 are needed (such as one vertex being weighted to 11 bones). Is it just straight up not allowed?&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt8 || Matrix Type&lt;br /&gt;
&lt;br /&gt;
* 0 = Single Joint&lt;br /&gt;
&lt;br /&gt;
* 1 = Billboard Joint&lt;br /&gt;
&lt;br /&gt;
* 2 = Billboard Joint (Y axis only)&lt;br /&gt;
&lt;br /&gt;
* 3 = Multiple Joints&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || UInt8 || Padding (0xFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Int16 || Matrix Group count&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int16 || Vertex Index Attribute offset&amp;lt;br/&amp;gt;Relative to the Vertex Index Attribute Table offset defined in SHP1&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Int16 || Matrix Group Data index&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || First Matrix Group Definition index&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Float || Bounding Sphere&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Float || Bounding Box Minimum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Float || Bounding Box Minimum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Float || Bounding Box Minimum Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Float || Bounding Box Maximum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Float || Bounding Box Maximum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Float || Bounding Box Maximum Z&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Vertex Index Attribute Table ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int32 || An [[#Index%20Buffer%20Formats|index buffer]] attribute target&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || An [[#Index%20Buffer%20Formats|index buffer]] type&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Index Buffer Formats ====&lt;br /&gt;
Each of the Buffers in this section have a format descriptor. This allows different types of data storage, allowing for smaller files.&lt;br /&gt;
&lt;br /&gt;
These attributes line up with either a direct value that is stored in the shape, or an index into a [[#VTX1_-_Vertex_Data|VTX1]] [[#Vertex%20Buffer%20Formats|data buffer]].&amp;lt;br/&amp;gt;Only one indexer can exist for each attribute.&lt;br /&gt;
&lt;br /&gt;
The Attribute Target tells the game what this index buffer is used for.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Attribute Targets&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || POSITION_MATRIX || This is a direct list of indices into the Matrix Group&#039;s Weight collection. Required for Shapes that use Multiple Joint skinning.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || TEXTURE_0_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || TEXTURE_1_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || TEXTURE_2_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || TEXTURE_3_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000005 || TEXTURE_4_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000006 || TEXTURE_5_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000007 || TEXTURE_6_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000008 || TEXTURE_7_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000009 || POSITION || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;POSITION&amp;quot; buffer. Required.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000A || NORMAL || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;NORMAL&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000B || COLOR_0 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;COLOR_0&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000C || COLOR_1 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;COLOR_1&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000D || TEXCOORD_0 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_0&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000E || TEXCOORD_1 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_1&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000F || TEXCOORD_2 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_2&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000010 || TEXCOORD_3 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_3&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000011 || TEXCOORD_4 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_4&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000012 || TEXCOORD_5 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_5&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000013 || TEXCOORD_6 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_6&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000014 || TEXCOORD_7 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_7&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000019 || TANGENT || &#039;&#039;This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TANGENT&amp;quot; buffer, but we don&#039;t yet know what that buffer does.&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x000000FF || List End || A buffer using this target will end the descriptor list.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Data Type of an Index Buffer determines the size of each Index. Direct Buffers can only be 1 byte per value.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Data Types&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || None || Only used for the List End&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || Direct || 1 byte per value. Only used for data that is not stored within [[#VTX1_-_Vertex_Data|VTX1]]&amp;lt;br/&amp;gt;Needs to be divided by 3 for some reason...&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || UInt8 || 1 byte per value (0 to 255). Indexes a buffer in [[#VTX1_-_Vertex_Data|VTX1]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || UInt16 || 2 bytes per value (0 to 65535). Indexes a buffer in [[#VTX1_-_Vertex_Data|VTX1]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Primitive Data ===&lt;br /&gt;
This chunk contains raw primitives. These are what hold the index buffers.&amp;lt;br/&amp;gt;The Index Buffers are ordered the same way the Index Buffer Attributes are ordered. For example, POSITION (UInt16), NORMAL (UInt16), COLOR_0 (UInt8), TEXCOORD_0 (UInt16), would result in the following byte structure: &#039;&#039;&#039;PPPP NNNN C0 TXC0&#039;&#039;&#039;&amp;lt;br/&amp;gt;This repeats for each vertex in the primitive.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Uint8 || Primitive Type&lt;br /&gt;
&lt;br /&gt;
* 0x80 = Individual Quads&lt;br /&gt;
&lt;br /&gt;
* 0x90 = Individual Triangles&lt;br /&gt;
&lt;br /&gt;
* 0x98 = Triangle Strip&lt;br /&gt;
&lt;br /&gt;
* 0xA0 = Triangle Fan&lt;br /&gt;
&lt;br /&gt;
* 0xA8 = Individual Lines&lt;br /&gt;
&lt;br /&gt;
* 0xB0 = Line Strip&lt;br /&gt;
&lt;br /&gt;
* 0xB8 = Individual Points&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;TODO: Figure out if Quads, Lines, Line Strips, and Points work.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;small&amp;gt;TODO: Figure out if &amp;quot;Quad Strips&amp;quot; exist at 0x88.&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int16 || Vertex Count&lt;br /&gt;
|}&lt;br /&gt;
Each Matrix Group&#039;s primitives are padded to the nearest 32.&lt;br /&gt;
&amp;lt;small&amp;gt;TODO: Figure out if the padding is allowed to be omitted.&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Matrix Group Definition Table ===&lt;br /&gt;
This table defines a list of Matrix Groups for each Shape. A Shape can have multiple Matrix Groups, but only stores the index of the first one. This means that all the Matrix Groups for a given Shape must come directly one after another.&amp;lt;br/&amp;gt;It contains only two values: The size of all Primitive Data within this group, and an offset to the first Primitive (relative to the Primitive Data offset defined in SHP1).&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int32 || Primitive Data size&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || First Primitive offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Matrix Group Data Table ===&lt;br /&gt;
This table contains definitions of sub-segments inside the Weight Index Table. How these values are used differs based on the shape matrix calculation type, but official files generally set both usages up correctly regardless.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int16 || [[#DRW1_-_Skinning_Assignments|DRW1]] Matrix ID&amp;lt;br/&amp;gt;This is only used with Single Joint shape matrix calculation.&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Int16 || Matrix Count&amp;lt;br/&amp;gt;This is only used with Multiple Joint shape matrix calculation.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || Starting Weight Index&amp;lt;br/&amp;gt;This is only used with Multiple Joint shape matrix calculation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Weight Index Table ===&lt;br /&gt;
This table contains several indices into [[#DRW1_-_Skinning_Assignments|DRW1]].&amp;lt;br/&amp;gt;Each index is a Signed 16 value.&amp;lt;br/&amp;gt;The values may also contain 0xFFFF, which indicates that the last used index should be used instead.&amp;lt;br/&amp;gt;Matrix Groups can select a segment of these indices (up to 10) for use. A Matrix Group must not start with 0xFFFF.&lt;br /&gt;
&lt;br /&gt;
== MAT2 - Material List (Old) ==&lt;br /&gt;
Technically supported by the game, but not known to be used by any model.&lt;br /&gt;
&lt;br /&gt;
== MAT3 - Material List ==&lt;br /&gt;
&lt;br /&gt;
== MDL3 - Display List ==&lt;br /&gt;
&lt;br /&gt;
== TEX1 - Texture Data ==&lt;br /&gt;
The &#039;&#039;&#039;Tex&#039;&#039;&#039;ture Information section holds several embedded [[BTI_(File_Format)|BTI]] files that [[#MAT3_-_Material_List|MAT3]] can reference by index for texture assignment.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;TEX1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of [[BTI_(File_Format)|BTI]] files stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || [[BTI_(File_Format)|BTI]] Header Table Offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Name table offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The texture data locations are defined by the [[BTI_(File_Format)|BTI]] headers (which themselves are located directly one after another at the Header Table)&amp;lt;br/&amp;gt;&lt;br /&gt;
This structure allows multiple textures that have the same visual data to have their headers point to just one block of visual data. In other words, two identical textures can be &amp;quot;compressed&amp;quot; into one while still having their own properties (wrapping, filtering, etc.)&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=950</id>
		<title>BMD/BDL (File Format)</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=950"/>
		<updated>2025-10-25T23:35:32Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: Joint Name Table can be excluded from the file&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:File formats]]&lt;br /&gt;
{{WIP}}&lt;br /&gt;
&lt;br /&gt;
BMD (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;M&#039;&#039;&#039;o&#039;&#039;&#039;d&#039;&#039;&#039;el) and BDL (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;D&#039;&#039;&#039;isplay &#039;&#039;&#039;L&#039;&#039;&#039;ist) are two 3D model formats used in &#039;&#039;Super Mario Galaxy&#039;&#039; and &#039;&#039;Super Mario Galaxy 2&#039;&#039;, among a few other &#039;&#039;Wii&#039;&#039; and &#039;&#039;GameCube&#039;&#039; games, such as &#039;&#039;Super Mario Sunshine&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These two formats hold the same data, except BDL contains an additional set of data which is used for faster rendering speeds.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Super Mario Galaxy&#039;&#039; &amp;amp; &#039;&#039;Super Mario Galaxy 2&#039;&#039; contain J3DLoader versions 21 and 26.&lt;br /&gt;
&lt;br /&gt;
== File Header ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || The magic that tells the game which format this file is. (ASCII)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bmd2&#039;&#039;&#039; for BMD (J3DLoader V21)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bmd3&#039;&#039;&#039; for BMD (J3DLoader v26)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bdl4&#039;&#039;&#039; for BDL (J3DLoader v26)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int32 || The total size of the file&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || The number of chunks present in this file.&amp;lt;br/&amp;gt;&#039;&#039;&#039;8&#039;&#039;&#039; for BMD&amp;lt;br/&amp;gt;&#039;&#039;&#039;9&#039;&#039;&#039; for BDL&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Subversion Header ===&lt;br /&gt;
This part of the header is not used, and can be anything.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || A 4 character value representing the Subversion. Usually SVR3 for SMG/2.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Byte[12] || Twelve bytes of padding. Usually these are &#039;&#039;&#039;0xFF&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== INF1 - Scene Information ==&lt;br /&gt;
The &#039;&#039;&#039;Inf&#039;&#039;&#039;ormation section hosts a hierarchy of Joints, Materials, and Shapes, which are used to render the model.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;INF1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || [[#J3DLoader%20Flags|J3DLoader Flags]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Matrix Group Data Count&amp;lt;br/&amp;gt;Referring to the Matrix Group Data in [[#SHP1_-_Shape_Information|SHP1]]&amp;lt;br/&amp;gt;&amp;lt;small&amp;gt;Stored in a variable by the game, but not used to dictate the actual number of Matrix Groups.&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Vertex Count&amp;lt;br/&amp;gt;Always equals the number of entries in the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;POSITION&amp;quot; [[#Vertex%20Buffer%20Formats|data buffer]]&amp;lt;br/&amp;gt;&amp;lt;small&amp;gt;Stored in a variable by the game, but never used for anything. The game reads Vertex Data directly from the [[#Vertex%20Buffer%20Formats|data buffer]]s without bounds checking.&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Relative offset to the [[#Scene%20Hierarchy|Scene Hierarchy]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== J3DLoader Flags ===&lt;br /&gt;
The J3DLoader contains several flags which affect how models are handled. There are more than what are shown here, however, those must be applied by the game itself in the code.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000000 || No flags applied (TODO: Check if this defaults to basic matrix calculation)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000001 || Use Autodesk Softimage matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000010 || Use Autodesk Maya matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000100 || Use Basic matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000001000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000010000 || UseImmidiateMtx (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000100000 || UsePostTexMtx (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000001000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000010000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000100000000 || NoMatrixTransform (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000001000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000010000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000100000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0001000000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0010000000000000 || DoBdlMaterialCalc&lt;br /&gt;
|-&lt;br /&gt;
| 0b0100000000000000 || NoBdlMaterialPatch - If set, skips the call to &#039;&#039;&#039;J3DModelLoader::readPatchedMaterial&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0b1000000000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
For all BMD files, the game always includes load flags &#039;&#039;Material_PE_Full&#039;&#039;, &#039;&#039;Material_UseIndirect&#039;&#039;, &#039;&#039;UseUniqueMaterials&#039;&#039;, and &#039;&#039;UNKNOWN_21&#039;&#039;.&amp;lt;br/&amp;gt;&lt;br /&gt;
For all BDL files, the game always includes load flags &#039;&#039;Material_UseIndirect&#039;&#039;, and &#039;&#039;UseUniqueMaterials&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;gt; &#039;&#039;Note: Changing the load flags by changing the code doesn&#039;t seem to do much.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Scene Hierarchy ===&lt;br /&gt;
Each model is constructed using a Scene Hierarchy. This simply determines the order of bones (in turn, defining the parent/child relations), material assignments, and Shape assignments.&lt;br /&gt;
&lt;br /&gt;
Each node consists of the following:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt16 || Node Type.&amp;lt;br/&amp;gt;0x00 = Marks the end of the node list&amp;lt;br/&amp;gt;0x01 = Creates a new child of the previous node&amp;lt;br/&amp;gt;0x02 = Finishes the child node and returns ownership to the previous node&amp;lt;br/&amp;gt;0x10 = Joint Assignment node. &amp;quot;Data&amp;quot; holds the Joint ID (index into JNT1)&amp;lt;br/&amp;gt;0x11 = Material assignment. &amp;quot;Data&amp;quot; holds the Material ID (index into MAT3)&amp;lt;br/&amp;gt;0x12 = Shape Assignment. &amp;quot;Data&amp;quot; holds the Shape ID (index into SHP1)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt16 || A Data value. Used by some nodes to index into other chunks. Usage depends on the node type.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The node list is padded to the nearest 32.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== VTX1 - Vertex Data ==&lt;br /&gt;
The &#039;&#039;&#039;V&#039;&#039;&#039;er&#039;&#039;&#039;t&#039;&#039;&#039;e&#039;&#039;&#039;x&#039;&#039;&#039; Data section contains the actual number values used for the properties of the geometry. It also includes the information on how the values are formatted.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;VTX1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int32 || Buffer Format list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || &amp;quot;POSITION&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || &amp;quot;NORMAL&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || &amp;quot;TANGENT&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || &amp;quot;COLOR_0&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Int32 || &amp;quot;COLOR_1&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Int32 || &amp;quot;TEXCOORD_0&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Int32 || &amp;quot;TEXCOORD_1&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Int32 || &amp;quot;TEXCOORD_2&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C || Int32 || &amp;quot;TEXCOORD_3&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x30 || Int32 || &amp;quot;TEXCOORD_4&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x34 || Int32 || &amp;quot;TEXCOORD_5&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x38 || Int32 || &amp;quot;TEXCOORD_6&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C || Int32 || &amp;quot;TEXCOORD_7&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Vertex Buffer Formats ===&lt;br /&gt;
Each of the Buffers in this section have a format descriptor. This allows different types of data storage, allowing for smaller files.&lt;br /&gt;
&lt;br /&gt;
Each format descriptor contains an Attribute Target, a Component Count, a Data Type, and a Mantissa shifter (to allow floats to be stored as smaller datatypes compared to FLOAT).&amp;lt;br/&amp;gt;Only one descriptor can exist for each attribute.&lt;br /&gt;
&lt;br /&gt;
The Attribute Target tells the game what this buffer is used for.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Attribute Targets&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000009 || POSITION || This buffer represents the positions of vertices in the model. Basically required for all visual models.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000A || NORMAL || This buffer represents vertex normals, used for the engine&#039;s vertex shading. Not needed if no material requires it.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000B || COLOR_0 || This buffer is available for Vertex Colors.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000C || COLOR_1 || This buffer is available for Vertex Colors.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000D || TEXCOORD_0 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000E || TEXCOORD_1 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000F || TEXCOORD_2 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000010 || TEXCOORD_3 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000011 || TEXCOORD_4 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000012 || TEXCOORD_5 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000013 || TEXCOORD_6 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000014 || TEXCOORD_7 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000019 || TANGENT || &#039;&#039;Currently unknown exactly what goes in here.&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x000000FF || List End || A buffer using this target will end the descriptor list.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The component count tells the game how many parts of the component that there are. Note that the values are considered based on the attribute target they&#039;re assigned to.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Component Count&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || POSITION_XY || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || POSITION_XYZ || Represents a position in 3D space with 3 values: X, Y, and Z.&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || NORMAL_XYZ || Represents a normal vector in 3D space with 3 values: X, Y, and Z.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || NORMAL_NBT || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || NORMAL_NBT3 || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || COLOR_RGB || Represents a color value with only Red, Green, and Blue values.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || COLOR_RGBA || Represents a color value with Red, Green, Blue, and Alpha values.&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || TEXCOORD_S || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || TEXCOORD_ST || Represents a UV texture coordinate with 2 values: X and Y.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Data Type tells the game how many bytes each value is, in the sense that an Int32 is 4 bytes, a Int16 is 2 bytes, a Float is 4 bytes, etc.&amp;lt;br/&amp;gt;Note that the Color values have a different set of options.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Data Types&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || UInt8 || 1 byte per value (0 to 255)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || Int8 || 1 byte per value (-128 to 127)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || UInt16 || 2 bytes per value (0 to 65535)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || Int16 || 2 bytes per value (-32,768 to 32,767)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || Float || 4 bytes per value&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || RGB565 || 2 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || RGB8 || 3 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || RGBX8 || 3 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || RGBA4 || 2 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || RGBA6 || 4 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000005 || RGBA8 || 4 bytes per color&lt;br /&gt;
|}&lt;br /&gt;
&amp;gt; &#039;&#039;Note: Both games require colors to be 4 bytes wide at all times, so changing from RGBA8 is worthless.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== EVP1 - Skinning Envelopes ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;EVP1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Envelopes stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || &amp;quot;Joint Count&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || &amp;quot;&#039;Joint Count&#039; list index&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || &amp;quot;Joint Weight&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || &amp;quot;Inverse Bind Matrices&amp;quot; list offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== DRW1 - Skinning Assignments ==&lt;br /&gt;
&lt;br /&gt;
== JNT1 - Joint Hierarchy ==&lt;br /&gt;
The &#039;&#039;&#039;J&#039;&#039;&#039;oi&#039;&#039;&#039;nt&#039;&#039;&#039; Hierarchy section defines the rigging skeleton of a model. There can only be one skeleton per model.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;JNT1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Joints stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Joint Data table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Remap table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Name table offset&amp;lt;b/&amp;gt;0 if not present.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Joint Data ===&lt;br /&gt;
Each joint includes positional data and a bounding box which is used by the game for determining rendering range automatically.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int16 || Matrix Type&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || UInt8 || Parent Scale inheritance&amp;lt;br/&amp;gt;0 = Follow parent joint&#039;s scale&amp;lt;br/&amp;gt;1 = Ignore parent joint&#039;s scale&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt8 || Padding (0xFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Float || Scale X&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Float || Scale Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Float || Scale Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int16 || Rotation X&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || Int16 || Rotation Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int16 || Rotation Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x16 || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Float || Translation X&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Float || Translation Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Float || Translation Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Float || Bounding Sphere&amp;lt;br/&amp;gt;Should encapsulate all vertices that the joint affects&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Float || Bounding Box Minimum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C || Float || Bounding Box Minimum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x30 || Float || Bounding Box Minimum Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x34 || Float || Bounding Box Maximum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x38 || Float || Bounding Box Maximum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C || Float || Bounding Box Maximum Z&lt;br /&gt;
|}&lt;br /&gt;
Rotation is stored between -0x7FFF and 0x7FFF, which ranges -180 degrees and 180 degrees.&lt;br /&gt;
&lt;br /&gt;
== SHP1 - Shape Information==&lt;br /&gt;
The &#039;&#039;&#039;Sh&#039;&#039;&#039;a&#039;&#039;&#039;p&#039;&#039;&#039;e Information section determines how to use the data in the [[#VTX1_-_Vertex_Data|VTX1]] section to create shapes.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;SHP1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Shapes stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Shape Init Data offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Remap table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Name table offset&amp;lt;br/&amp;gt;(Generally not used, and thus set to 0)&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || Vertex Index Attribute table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Int32 || Weight Index table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Int32 || Primitive Data offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Int32 || Matrix Group Data offset (entry count must equal the entry count of the GXDisplayList group table)&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Int32 || Matrix Group Definition table offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Shape Data ===&lt;br /&gt;
Each shape denotes a Matrix Calculation type, which is used for Billboarding, as well as multi-joint skinning.&amp;lt;br/&amp;gt;A shape also hosts a collection of Matrix Groups. If the geometry needs to be weighted to more than 10 [[#DRW1_-_Skinning_Assignments|DRW1]] matrices, more than one Matrix Group is needed.&amp;lt;br/&amp;gt;A single Matrix Group can have multiple Primitives in it, but these Primitives must share the same set of [[#DRW1_-_Skinning_Assignments|DRW1]] matrices.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;TODO: Figure out what happens in the event that more than 10 are needed (such as one vertex being weighted to 11 bones). Is it just straight up not allowed?&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt8 || Matrix Type&lt;br /&gt;
&lt;br /&gt;
* 0 = Single Joint&lt;br /&gt;
&lt;br /&gt;
* 1 = Billboard Joint&lt;br /&gt;
&lt;br /&gt;
* 2 = Billboard Joint (Y axis only)&lt;br /&gt;
&lt;br /&gt;
* 3 = Multiple Joints&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || UInt8 || Padding (0xFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Int16 || Matrix Group count&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int16 || Vertex Index Attribute offset&amp;lt;br/&amp;gt;Relative to the Vertex Index Attribute Table offset defined in SHP1&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Int16 || Matrix Group Data index&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || First Matrix Group Definition index&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Float || Bounding Sphere&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Float || Bounding Box Minimum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Float || Bounding Box Minimum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Float || Bounding Box Minimum Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Float || Bounding Box Maximum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Float || Bounding Box Maximum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Float || Bounding Box Maximum Z&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Vertex Index Attribute Table ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int32 || An [[#Index%20Buffer%20Formats|index buffer]] attribute target&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || An [[#Index%20Buffer%20Formats|index buffer]] type&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Index Buffer Formats ====&lt;br /&gt;
Each of the Buffers in this section have a format descriptor. This allows different types of data storage, allowing for smaller files.&lt;br /&gt;
&lt;br /&gt;
These attributes line up with either a direct value that is stored in the shape, or an index into a [[#VTX1_-_Vertex_Data|VTX1]] [[#Vertex%20Buffer%20Formats|data buffer]].&amp;lt;br/&amp;gt;Only one indexer can exist for each attribute.&lt;br /&gt;
&lt;br /&gt;
The Attribute Target tells the game what this index buffer is used for.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Attribute Targets&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || POSITION_MATRIX || This is a direct list of indices into the Matrix Group&#039;s Weight collection. Required for Shapes that use Multiple Joint skinning.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || TEXTURE_0_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || TEXTURE_1_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || TEXTURE_2_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || TEXTURE_3_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000005 || TEXTURE_4_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000006 || TEXTURE_5_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000007 || TEXTURE_6_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000008 || TEXTURE_7_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000009 || POSITION || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;POSITION&amp;quot; buffer. Required.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000A || NORMAL || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;NORMAL&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000B || COLOR_0 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;COLOR_0&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000C || COLOR_1 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;COLOR_1&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000D || TEXCOORD_0 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_0&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000E || TEXCOORD_1 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_1&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000F || TEXCOORD_2 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_2&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000010 || TEXCOORD_3 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_3&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000011 || TEXCOORD_4 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_4&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000012 || TEXCOORD_5 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_5&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000013 || TEXCOORD_6 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_6&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000014 || TEXCOORD_7 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_7&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000019 || TANGENT || &#039;&#039;This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TANGENT&amp;quot; buffer, but we don&#039;t yet know what that buffer does.&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x000000FF || List End || A buffer using this target will end the descriptor list.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Data Type of an Index Buffer determines the size of each Index. Direct Buffers can only be 1 byte per value.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Data Types&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || None || Only used for the List End&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || Direct || 1 byte per value. Only used for data that is not stored within [[#VTX1_-_Vertex_Data|VTX1]]&amp;lt;br/&amp;gt;Needs to be divided by 3 for some reason...&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || UInt8 || 1 byte per value (0 to 255). Indexes a buffer in [[#VTX1_-_Vertex_Data|VTX1]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || UInt16 || 2 bytes per value (0 to 65535). Indexes a buffer in [[#VTX1_-_Vertex_Data|VTX1]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Primitive Data ===&lt;br /&gt;
This chunk contains raw primitives. These are what hold the index buffers.&amp;lt;br/&amp;gt;The Index Buffers are ordered the same way the Index Buffer Attributes are ordered. For example, POSITION (UInt16), NORMAL (UInt16), COLOR_0 (UInt8), TEXCOORD_0 (UInt16), would result in the following byte structure: &#039;&#039;&#039;PPPP NNNN C0 TXC0&#039;&#039;&#039;&amp;lt;br/&amp;gt;This repeats for each vertex in the primitive.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Uint8 || Primitive Type&lt;br /&gt;
&lt;br /&gt;
* 0x80 = Individual Quads&lt;br /&gt;
&lt;br /&gt;
* 0x90 = Individual Triangles&lt;br /&gt;
&lt;br /&gt;
* 0x98 = Triangle Strip&lt;br /&gt;
&lt;br /&gt;
* 0xA0 = Triangle Fan&lt;br /&gt;
&lt;br /&gt;
* 0xA8 = Individual Lines&lt;br /&gt;
&lt;br /&gt;
* 0xB0 = Line Strip&lt;br /&gt;
&lt;br /&gt;
* 0xB8 = Individual Points&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;TODO: Figure out if Quads, Lines, Line Strips, and Points work.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;small&amp;gt;TODO: Figure out if &amp;quot;Quad Strips&amp;quot; exist at 0x88.&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int16 || Vertex Count&lt;br /&gt;
|}&lt;br /&gt;
Each Matrix Group&#039;s primitives are padded to the nearest 32.&lt;br /&gt;
&amp;lt;small&amp;gt;TODO: Figure out if the padding is allowed to be omitted.&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Matrix Group Definition Table ===&lt;br /&gt;
This table defines a list of Matrix Groups for each Shape. A Shape can have multiple Matrix Groups, but only stores the index of the first one. This means that all the Matrix Groups for a given Shape must come directly one after another.&amp;lt;br/&amp;gt;It contains only two values: The size of all Primitive Data within this group, and an offset to the first Primitive (relative to the Primitive Data offset defined in SHP1).&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int32 || Primitive Data size&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || First Primitive offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Matrix Group Data Table ===&lt;br /&gt;
This table contains definitions of sub-segments inside the Weight Index Table. How these values are used differs based on the shape matrix calculation type, but official files generally set both usages up correctly regardless.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int16 || [[#DRW1_-_Skinning_Assignments|DRW1]] Matrix ID&amp;lt;br/&amp;gt;This is only used with Single Joint shape matrix calculation.&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Int16 || Matrix Count&amp;lt;br/&amp;gt;This is only used with Multiple Joint shape matrix calculation.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || Starting Weight Index&amp;lt;br/&amp;gt;This is only used with Multiple Joint shape matrix calculation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Weight Index Table ===&lt;br /&gt;
This table contains several indices into [[#DRW1_-_Skinning_Assignments|DRW1]].&amp;lt;br/&amp;gt;Each index is a Signed 16 value.&amp;lt;br/&amp;gt;The values may also contain 0xFFFF, which indicates that the last used index should be used instead.&amp;lt;br/&amp;gt;Matrix Groups can select a segment of these indices (up to 10) for use. A Matrix Group must not start with 0xFFFF.&lt;br /&gt;
&lt;br /&gt;
== MAT2 - Material List (Old) ==&lt;br /&gt;
Technically supported by the game, but not known to be used by any model.&lt;br /&gt;
&lt;br /&gt;
== MAT3 - Material List ==&lt;br /&gt;
&lt;br /&gt;
== MDL3 - Display List ==&lt;br /&gt;
&lt;br /&gt;
== TEX1 - Texture Data ==&lt;br /&gt;
The &#039;&#039;&#039;Tex&#039;&#039;&#039;ture Information section holds several embedded [[BTI_(File_Format)|BTI]] files that [[#MAT3_-_Material_List|MAT3]] can reference by index for texture assignment.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;TEX1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of [[BTI_(File_Format)|BTI]] files stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || [[BTI_(File_Format)|BTI]] Header Table Offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Name table offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The texture data locations are defined by the [[BTI_(File_Format)|BTI]] headers (which themselves are located directly one after another at the Header Table)&amp;lt;br/&amp;gt;&lt;br /&gt;
This structure allows multiple textures that have the same visual data to have their headers point to just one block of visual data. In other words, two identical textures can be &amp;quot;compressed&amp;quot; into one while still having their own properties (wrapping, filtering, etc.)&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=949</id>
		<title>BMD/BDL (File Format)</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=949"/>
		<updated>2025-10-22T22:54:36Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: INF1 - Fixed notes on the Matrix Group Data count and Vertex count.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:File formats]]&lt;br /&gt;
{{WIP}}&lt;br /&gt;
&lt;br /&gt;
BMD (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;M&#039;&#039;&#039;o&#039;&#039;&#039;d&#039;&#039;&#039;el) and BDL (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;D&#039;&#039;&#039;isplay &#039;&#039;&#039;L&#039;&#039;&#039;ist) are two 3D model formats used in &#039;&#039;Super Mario Galaxy&#039;&#039; and &#039;&#039;Super Mario Galaxy 2&#039;&#039;, among a few other &#039;&#039;Wii&#039;&#039; and &#039;&#039;GameCube&#039;&#039; games, such as &#039;&#039;Super Mario Sunshine&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These two formats hold the same data, except BDL contains an additional set of data which is used for faster rendering speeds.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Super Mario Galaxy&#039;&#039; &amp;amp; &#039;&#039;Super Mario Galaxy 2&#039;&#039; contain J3DLoader versions 21 and 26.&lt;br /&gt;
&lt;br /&gt;
== File Header ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || The magic that tells the game which format this file is. (ASCII)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bmd2&#039;&#039;&#039; for BMD (J3DLoader V21)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bmd3&#039;&#039;&#039; for BMD (J3DLoader v26)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bdl4&#039;&#039;&#039; for BDL (J3DLoader v26)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int32 || The total size of the file&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || The number of chunks present in this file.&amp;lt;br/&amp;gt;&#039;&#039;&#039;8&#039;&#039;&#039; for BMD&amp;lt;br/&amp;gt;&#039;&#039;&#039;9&#039;&#039;&#039; for BDL&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Subversion Header ===&lt;br /&gt;
This part of the header is not used, and can be anything.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || A 4 character value representing the Subversion. Usually SVR3 for SMG/2.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Byte[12] || Twelve bytes of padding. Usually these are &#039;&#039;&#039;0xFF&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== INF1 - Scene Information ==&lt;br /&gt;
The &#039;&#039;&#039;Inf&#039;&#039;&#039;ormation section hosts a hierarchy of Joints, Materials, and Shapes, which are used to render the model.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;INF1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || [[#J3DLoader%20Flags|J3DLoader Flags]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Matrix Group Data Count&amp;lt;br/&amp;gt;Referring to the Matrix Group Data in [[#SHP1_-_Shape_Information|SHP1]]&amp;lt;br/&amp;gt;&amp;lt;small&amp;gt;Stored in a variable by the game, but not used to dictate the actual number of Matrix Groups.&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Vertex Count&amp;lt;br/&amp;gt;Always equals the number of entries in the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;POSITION&amp;quot; [[#Vertex%20Buffer%20Formats|data buffer]]&amp;lt;br/&amp;gt;&amp;lt;small&amp;gt;Stored in a variable by the game, but never used for anything. The game reads Vertex Data directly from the [[#Vertex%20Buffer%20Formats|data buffer]]s without bounds checking.&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Relative offset to the [[#Scene%20Hierarchy|Scene Hierarchy]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== J3DLoader Flags ===&lt;br /&gt;
The J3DLoader contains several flags which affect how models are handled. There are more than what are shown here, however, those must be applied by the game itself in the code.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000000 || No flags applied (TODO: Check if this defaults to basic matrix calculation)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000001 || Use Autodesk Softimage matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000010 || Use Autodesk Maya matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000100 || Use Basic matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000001000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000010000 || UseImmidiateMtx (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000100000 || UsePostTexMtx (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000001000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000010000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000100000000 || NoMatrixTransform (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000001000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000010000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000100000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0001000000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0010000000000000 || DoBdlMaterialCalc&lt;br /&gt;
|-&lt;br /&gt;
| 0b0100000000000000 || NoBdlMaterialPatch - If set, skips the call to &#039;&#039;&#039;J3DModelLoader::readPatchedMaterial&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0b1000000000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
For all BMD files, the game always includes load flags &#039;&#039;Material_PE_Full&#039;&#039;, &#039;&#039;Material_UseIndirect&#039;&#039;, &#039;&#039;UseUniqueMaterials&#039;&#039;, and &#039;&#039;UNKNOWN_21&#039;&#039;.&amp;lt;br/&amp;gt;&lt;br /&gt;
For all BDL files, the game always includes load flags &#039;&#039;Material_UseIndirect&#039;&#039;, and &#039;&#039;UseUniqueMaterials&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;gt; &#039;&#039;Note: Changing the load flags by changing the code doesn&#039;t seem to do much.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Scene Hierarchy ===&lt;br /&gt;
Each model is constructed using a Scene Hierarchy. This simply determines the order of bones (in turn, defining the parent/child relations), material assignments, and Shape assignments.&lt;br /&gt;
&lt;br /&gt;
Each node consists of the following:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt16 || Node Type.&amp;lt;br/&amp;gt;0x00 = Marks the end of the node list&amp;lt;br/&amp;gt;0x01 = Creates a new child of the previous node&amp;lt;br/&amp;gt;0x02 = Finishes the child node and returns ownership to the previous node&amp;lt;br/&amp;gt;0x10 = Joint Assignment node. &amp;quot;Data&amp;quot; holds the Joint ID (index into JNT1)&amp;lt;br/&amp;gt;0x11 = Material assignment. &amp;quot;Data&amp;quot; holds the Material ID (index into MAT3)&amp;lt;br/&amp;gt;0x12 = Shape Assignment. &amp;quot;Data&amp;quot; holds the Shape ID (index into SHP1)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt16 || A Data value. Used by some nodes to index into other chunks. Usage depends on the node type.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The node list is padded to the nearest 32.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== VTX1 - Vertex Data ==&lt;br /&gt;
The &#039;&#039;&#039;V&#039;&#039;&#039;er&#039;&#039;&#039;t&#039;&#039;&#039;e&#039;&#039;&#039;x&#039;&#039;&#039; Data section contains the actual number values used for the properties of the geometry. It also includes the information on how the values are formatted.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;VTX1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int32 || Buffer Format list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || &amp;quot;POSITION&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || &amp;quot;NORMAL&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || &amp;quot;TANGENT&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || &amp;quot;COLOR_0&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Int32 || &amp;quot;COLOR_1&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Int32 || &amp;quot;TEXCOORD_0&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Int32 || &amp;quot;TEXCOORD_1&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Int32 || &amp;quot;TEXCOORD_2&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C || Int32 || &amp;quot;TEXCOORD_3&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x30 || Int32 || &amp;quot;TEXCOORD_4&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x34 || Int32 || &amp;quot;TEXCOORD_5&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x38 || Int32 || &amp;quot;TEXCOORD_6&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C || Int32 || &amp;quot;TEXCOORD_7&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Vertex Buffer Formats ===&lt;br /&gt;
Each of the Buffers in this section have a format descriptor. This allows different types of data storage, allowing for smaller files.&lt;br /&gt;
&lt;br /&gt;
Each format descriptor contains an Attribute Target, a Component Count, a Data Type, and a Mantissa shifter (to allow floats to be stored as smaller datatypes compared to FLOAT).&amp;lt;br/&amp;gt;Only one descriptor can exist for each attribute.&lt;br /&gt;
&lt;br /&gt;
The Attribute Target tells the game what this buffer is used for.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Attribute Targets&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000009 || POSITION || This buffer represents the positions of vertices in the model. Basically required for all visual models.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000A || NORMAL || This buffer represents vertex normals, used for the engine&#039;s vertex shading. Not needed if no material requires it.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000B || COLOR_0 || This buffer is available for Vertex Colors.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000C || COLOR_1 || This buffer is available for Vertex Colors.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000D || TEXCOORD_0 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000E || TEXCOORD_1 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000F || TEXCOORD_2 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000010 || TEXCOORD_3 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000011 || TEXCOORD_4 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000012 || TEXCOORD_5 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000013 || TEXCOORD_6 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000014 || TEXCOORD_7 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000019 || TANGENT || &#039;&#039;Currently unknown exactly what goes in here.&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x000000FF || List End || A buffer using this target will end the descriptor list.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The component count tells the game how many parts of the component that there are. Note that the values are considered based on the attribute target they&#039;re assigned to.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Component Count&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || POSITION_XY || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || POSITION_XYZ || Represents a position in 3D space with 3 values: X, Y, and Z.&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || NORMAL_XYZ || Represents a normal vector in 3D space with 3 values: X, Y, and Z.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || NORMAL_NBT || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || NORMAL_NBT3 || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || COLOR_RGB || Represents a color value with only Red, Green, and Blue values.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || COLOR_RGBA || Represents a color value with Red, Green, Blue, and Alpha values.&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || TEXCOORD_S || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || TEXCOORD_ST || Represents a UV texture coordinate with 2 values: X and Y.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Data Type tells the game how many bytes each value is, in the sense that an Int32 is 4 bytes, a Int16 is 2 bytes, a Float is 4 bytes, etc.&amp;lt;br/&amp;gt;Note that the Color values have a different set of options.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Data Types&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || UInt8 || 1 byte per value (0 to 255)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || Int8 || 1 byte per value (-128 to 127)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || UInt16 || 2 bytes per value (0 to 65535)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || Int16 || 2 bytes per value (-32,768 to 32,767)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || Float || 4 bytes per value&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || RGB565 || 2 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || RGB8 || 3 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || RGBX8 || 3 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || RGBA4 || 2 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || RGBA6 || 4 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000005 || RGBA8 || 4 bytes per color&lt;br /&gt;
|}&lt;br /&gt;
&amp;gt; &#039;&#039;Note: Both games require colors to be 4 bytes wide at all times, so changing from RGBA8 is worthless.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== EVP1 - Skinning Envelopes ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;EVP1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Envelopes stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || &amp;quot;Joint Count&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || &amp;quot;&#039;Joint Count&#039; list index&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || &amp;quot;Joint Weight&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || &amp;quot;Inverse Bind Matrices&amp;quot; list offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== DRW1 - Skinning Assignments ==&lt;br /&gt;
&lt;br /&gt;
== JNT1 - Joint Hierarchy ==&lt;br /&gt;
The &#039;&#039;&#039;J&#039;&#039;&#039;oi&#039;&#039;&#039;nt&#039;&#039;&#039; Hierarchy section defines the rigging skeleton of a model. There can only be one skeleton per model.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;JNT1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Joints stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Joint Data table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Remap table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Name table offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Joint Data ===&lt;br /&gt;
Each joint includes positional data and a bounding box which is used by the game for determining rendering range automatically.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int16 || Matrix Type&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || UInt8 || Parent Scale inheritance&amp;lt;br/&amp;gt;0 = Follow parent joint&#039;s scale&amp;lt;br/&amp;gt;1 = Ignore parent joint&#039;s scale&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt8 || Padding (0xFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Float || Scale X&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Float || Scale Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Float || Scale Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int16 || Rotation X&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || Int16 || Rotation Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int16 || Rotation Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x16 || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Float || Translation X&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Float || Translation Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Float || Translation Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Float || Bounding Sphere&amp;lt;br/&amp;gt;Should encapsulate all vertices that the joint affects&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Float || Bounding Box Minimum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C || Float || Bounding Box Minimum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x30 || Float || Bounding Box Minimum Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x34 || Float || Bounding Box Maximum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x38 || Float || Bounding Box Maximum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C || Float || Bounding Box Maximum Z&lt;br /&gt;
|}&lt;br /&gt;
Rotation is stored between -0x7FFF and 0x7FFF, which ranges -180 degrees and 180 degrees.&lt;br /&gt;
&lt;br /&gt;
== SHP1 - Shape Information==&lt;br /&gt;
The &#039;&#039;&#039;Sh&#039;&#039;&#039;a&#039;&#039;&#039;p&#039;&#039;&#039;e Information section determines how to use the data in the [[#VTX1_-_Vertex_Data|VTX1]] section to create shapes.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;SHP1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Shapes stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Shape Init Data offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Remap table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Name table offset&amp;lt;br/&amp;gt;(Generally not used, and thus set to 0)&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || Vertex Index Attribute table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Int32 || Weight Index table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Int32 || Primitive Data offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Int32 || Matrix Group Data offset (entry count must equal the entry count of the GXDisplayList group table)&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Int32 || Matrix Group Definition table offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Shape Data ===&lt;br /&gt;
Each shape denotes a Matrix Calculation type, which is used for Billboarding, as well as multi-joint skinning.&amp;lt;br/&amp;gt;A shape also hosts a collection of Matrix Groups. If the geometry needs to be weighted to more than 10 [[#DRW1_-_Skinning_Assignments|DRW1]] matrices, more than one Matrix Group is needed.&amp;lt;br/&amp;gt;A single Matrix Group can have multiple Primitives in it, but these Primitives must share the same set of [[#DRW1_-_Skinning_Assignments|DRW1]] matrices.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;TODO: Figure out what happens in the event that more than 10 are needed (such as one vertex being weighted to 11 bones). Is it just straight up not allowed?&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt8 || Matrix Type&lt;br /&gt;
&lt;br /&gt;
* 0 = Single Joint&lt;br /&gt;
&lt;br /&gt;
* 1 = Billboard Joint&lt;br /&gt;
&lt;br /&gt;
* 2 = Billboard Joint (Y axis only)&lt;br /&gt;
&lt;br /&gt;
* 3 = Multiple Joints&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || UInt8 || Padding (0xFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Int16 || Matrix Group count&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int16 || Vertex Index Attribute offset&amp;lt;br/&amp;gt;Relative to the Vertex Index Attribute Table offset defined in SHP1&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Int16 || Matrix Group Data index&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || First Matrix Group Definition index&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Float || Bounding Sphere&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Float || Bounding Box Minimum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Float || Bounding Box Minimum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Float || Bounding Box Minimum Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Float || Bounding Box Maximum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Float || Bounding Box Maximum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Float || Bounding Box Maximum Z&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Vertex Index Attribute Table ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int32 || An [[#Index%20Buffer%20Formats|index buffer]] attribute target&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || An [[#Index%20Buffer%20Formats|index buffer]] type&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Index Buffer Formats ====&lt;br /&gt;
Each of the Buffers in this section have a format descriptor. This allows different types of data storage, allowing for smaller files.&lt;br /&gt;
&lt;br /&gt;
These attributes line up with either a direct value that is stored in the shape, or an index into a [[#VTX1_-_Vertex_Data|VTX1]] [[#Vertex%20Buffer%20Formats|data buffer]].&amp;lt;br/&amp;gt;Only one indexer can exist for each attribute.&lt;br /&gt;
&lt;br /&gt;
The Attribute Target tells the game what this index buffer is used for.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Attribute Targets&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || POSITION_MATRIX || This is a direct list of indices into the Matrix Group&#039;s Weight collection. Required for Shapes that use Multiple Joint skinning.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || TEXTURE_0_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || TEXTURE_1_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || TEXTURE_2_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || TEXTURE_3_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000005 || TEXTURE_4_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000006 || TEXTURE_5_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000007 || TEXTURE_6_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000008 || TEXTURE_7_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000009 || POSITION || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;POSITION&amp;quot; buffer. Required.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000A || NORMAL || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;NORMAL&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000B || COLOR_0 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;COLOR_0&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000C || COLOR_1 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;COLOR_1&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000D || TEXCOORD_0 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_0&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000E || TEXCOORD_1 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_1&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000F || TEXCOORD_2 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_2&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000010 || TEXCOORD_3 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_3&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000011 || TEXCOORD_4 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_4&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000012 || TEXCOORD_5 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_5&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000013 || TEXCOORD_6 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_6&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000014 || TEXCOORD_7 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_7&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000019 || TANGENT || &#039;&#039;This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TANGENT&amp;quot; buffer, but we don&#039;t yet know what that buffer does.&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x000000FF || List End || A buffer using this target will end the descriptor list.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Data Type of an Index Buffer determines the size of each Index. Direct Buffers can only be 1 byte per value.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Data Types&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || None || Only used for the List End&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || Direct || 1 byte per value. Only used for data that is not stored within [[#VTX1_-_Vertex_Data|VTX1]]&amp;lt;br/&amp;gt;Needs to be divided by 3 for some reason...&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || UInt8 || 1 byte per value (0 to 255). Indexes a buffer in [[#VTX1_-_Vertex_Data|VTX1]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || UInt16 || 2 bytes per value (0 to 65535). Indexes a buffer in [[#VTX1_-_Vertex_Data|VTX1]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Primitive Data ===&lt;br /&gt;
This chunk contains raw primitives. These are what hold the index buffers.&amp;lt;br/&amp;gt;The Index Buffers are ordered the same way the Index Buffer Attributes are ordered. For example, POSITION (UInt16), NORMAL (UInt16), COLOR_0 (UInt8), TEXCOORD_0 (UInt16), would result in the following byte structure: &#039;&#039;&#039;PPPP NNNN C0 TXC0&#039;&#039;&#039;&amp;lt;br/&amp;gt;This repeats for each vertex in the primitive.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Uint8 || Primitive Type&lt;br /&gt;
&lt;br /&gt;
* 0x80 = Individual Quads&lt;br /&gt;
&lt;br /&gt;
* 0x90 = Individual Triangles&lt;br /&gt;
&lt;br /&gt;
* 0x98 = Triangle Strip&lt;br /&gt;
&lt;br /&gt;
* 0xA0 = Triangle Fan&lt;br /&gt;
&lt;br /&gt;
* 0xA8 = Individual Lines&lt;br /&gt;
&lt;br /&gt;
* 0xB0 = Line Strip&lt;br /&gt;
&lt;br /&gt;
* 0xB8 = Individual Points&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;TODO: Figure out if Quads, Lines, Line Strips, and Points work.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;small&amp;gt;TODO: Figure out if &amp;quot;Quad Strips&amp;quot; exist at 0x88.&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int16 || Vertex Count&lt;br /&gt;
|}&lt;br /&gt;
Each Matrix Group&#039;s primitives are padded to the nearest 32.&lt;br /&gt;
&amp;lt;small&amp;gt;TODO: Figure out if the padding is allowed to be omitted.&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Matrix Group Definition Table ===&lt;br /&gt;
This table defines a list of Matrix Groups for each Shape. A Shape can have multiple Matrix Groups, but only stores the index of the first one. This means that all the Matrix Groups for a given Shape must come directly one after another.&amp;lt;br/&amp;gt;It contains only two values: The size of all Primitive Data within this group, and an offset to the first Primitive (relative to the Primitive Data offset defined in SHP1).&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int32 || Primitive Data size&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || First Primitive offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Matrix Group Data Table ===&lt;br /&gt;
This table contains definitions of sub-segments inside the Weight Index Table. How these values are used differs based on the shape matrix calculation type, but official files generally set both usages up correctly regardless.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int16 || [[#DRW1_-_Skinning_Assignments|DRW1]] Matrix ID&amp;lt;br/&amp;gt;This is only used with Single Joint shape matrix calculation.&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Int16 || Matrix Count&amp;lt;br/&amp;gt;This is only used with Multiple Joint shape matrix calculation.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || Starting Weight Index&amp;lt;br/&amp;gt;This is only used with Multiple Joint shape matrix calculation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Weight Index Table ===&lt;br /&gt;
This table contains several indices into [[#DRW1_-_Skinning_Assignments|DRW1]].&amp;lt;br/&amp;gt;Each index is a Signed 16 value.&amp;lt;br/&amp;gt;The values may also contain 0xFFFF, which indicates that the last used index should be used instead.&amp;lt;br/&amp;gt;Matrix Groups can select a segment of these indices (up to 10) for use. A Matrix Group must not start with 0xFFFF.&lt;br /&gt;
&lt;br /&gt;
== MAT2 - Material List (Old) ==&lt;br /&gt;
Technically supported by the game, but not known to be used by any model.&lt;br /&gt;
&lt;br /&gt;
== MAT3 - Material List ==&lt;br /&gt;
&lt;br /&gt;
== MDL3 - Display List ==&lt;br /&gt;
&lt;br /&gt;
== TEX1 - Texture Data ==&lt;br /&gt;
The &#039;&#039;&#039;Tex&#039;&#039;&#039;ture Information section holds several embedded [[BTI_(File_Format)|BTI]] files that [[#MAT3_-_Material_List|MAT3]] can reference by index for texture assignment.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;TEX1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of [[BTI_(File_Format)|BTI]] files stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || [[BTI_(File_Format)|BTI]] Header Table Offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Name table offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The texture data locations are defined by the [[BTI_(File_Format)|BTI]] headers (which themselves are located directly one after another at the Header Table)&amp;lt;br/&amp;gt;&lt;br /&gt;
This structure allows multiple textures that have the same visual data to have their headers point to just one block of visual data. In other words, two identical textures can be &amp;quot;compressed&amp;quot; into one while still having their own properties (wrapping, filtering, etc.)&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=948</id>
		<title>BMD/BDL (File Format)</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=948"/>
		<updated>2025-10-22T22:25:31Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: INF1 - Matrix Group Count and POSITION data buffer sizes are purely informative and ignored by the game upon load.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:File formats]]&lt;br /&gt;
{{WIP}}&lt;br /&gt;
&lt;br /&gt;
BMD (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;M&#039;&#039;&#039;o&#039;&#039;&#039;d&#039;&#039;&#039;el) and BDL (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;D&#039;&#039;&#039;isplay &#039;&#039;&#039;L&#039;&#039;&#039;ist) are two 3D model formats used in &#039;&#039;Super Mario Galaxy&#039;&#039; and &#039;&#039;Super Mario Galaxy 2&#039;&#039;, among a few other &#039;&#039;Wii&#039;&#039; and &#039;&#039;GameCube&#039;&#039; games, such as &#039;&#039;Super Mario Sunshine&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These two formats hold the same data, except BDL contains an additional set of data which is used for faster rendering speeds.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Super Mario Galaxy&#039;&#039; &amp;amp; &#039;&#039;Super Mario Galaxy 2&#039;&#039; contain J3DLoader versions 21 and 26.&lt;br /&gt;
&lt;br /&gt;
== File Header ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || The magic that tells the game which format this file is. (ASCII)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bmd2&#039;&#039;&#039; for BMD (J3DLoader V21)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bmd3&#039;&#039;&#039; for BMD (J3DLoader v26)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bdl4&#039;&#039;&#039; for BDL (J3DLoader v26)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int32 || The total size of the file&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || The number of chunks present in this file.&amp;lt;br/&amp;gt;&#039;&#039;&#039;8&#039;&#039;&#039; for BMD&amp;lt;br/&amp;gt;&#039;&#039;&#039;9&#039;&#039;&#039; for BDL&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Subversion Header ===&lt;br /&gt;
This part of the header is not used, and can be anything.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || A 4 character value representing the Subversion. Usually SVR3 for SMG/2.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Byte[12] || Twelve bytes of padding. Usually these are &#039;&#039;&#039;0xFF&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== INF1 - Scene Information ==&lt;br /&gt;
The &#039;&#039;&#039;Inf&#039;&#039;&#039;ormation section hosts a hierarchy of Joints, Materials, and Shapes, which are used to render the model.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;INF1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || [[#J3DLoader%20Flags|J3DLoader Flags]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Matrix Group Data Count&amp;lt;br/&amp;gt;Referring to the Matrix Group Data in [[#SHP1_-_Shape_Information|SHP1]]&amp;lt;br/&amp;gt;&amp;lt;small&amp;gt;Ignored by the game. Seems to only be informative.&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Vertex Count&amp;lt;br/&amp;gt;Always equals the number of entries in the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;POSITION&amp;quot; [[#Vertex%20Buffer%20Formats|data buffer]]&amp;lt;br/&amp;gt;&amp;lt;small&amp;gt;Ignored by the game. Seems to only be informative.&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Relative offset to the [[#Scene%20Hierarchy|Scene Hierarchy]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== J3DLoader Flags ===&lt;br /&gt;
The J3DLoader contains several flags which affect how models are handled. There are more than what are shown here, however, those must be applied by the game itself in the code.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000000 || No flags applied (TODO: Check if this defaults to basic matrix calculation)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000001 || Use Autodesk Softimage matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000010 || Use Autodesk Maya matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000100 || Use Basic matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000001000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000010000 || UseImmidiateMtx (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000100000 || UsePostTexMtx (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000001000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000010000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000100000000 || NoMatrixTransform (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000001000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000010000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000100000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0001000000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0010000000000000 || DoBdlMaterialCalc&lt;br /&gt;
|-&lt;br /&gt;
| 0b0100000000000000 || NoBdlMaterialPatch - If set, skips the call to &#039;&#039;&#039;J3DModelLoader::readPatchedMaterial&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0b1000000000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
For all BMD files, the game always includes load flags &#039;&#039;Material_PE_Full&#039;&#039;, &#039;&#039;Material_UseIndirect&#039;&#039;, &#039;&#039;UseUniqueMaterials&#039;&#039;, and &#039;&#039;UNKNOWN_21&#039;&#039;.&amp;lt;br/&amp;gt;&lt;br /&gt;
For all BDL files, the game always includes load flags &#039;&#039;Material_UseIndirect&#039;&#039;, and &#039;&#039;UseUniqueMaterials&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;gt; &#039;&#039;Note: Changing the load flags by changing the code doesn&#039;t seem to do much.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Scene Hierarchy ===&lt;br /&gt;
Each model is constructed using a Scene Hierarchy. This simply determines the order of bones (in turn, defining the parent/child relations), material assignments, and Shape assignments.&lt;br /&gt;
&lt;br /&gt;
Each node consists of the following:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt16 || Node Type.&amp;lt;br/&amp;gt;0x00 = Marks the end of the node list&amp;lt;br/&amp;gt;0x01 = Creates a new child of the previous node&amp;lt;br/&amp;gt;0x02 = Finishes the child node and returns ownership to the previous node&amp;lt;br/&amp;gt;0x10 = Joint Assignment node. &amp;quot;Data&amp;quot; holds the Joint ID (index into JNT1)&amp;lt;br/&amp;gt;0x11 = Material assignment. &amp;quot;Data&amp;quot; holds the Material ID (index into MAT3)&amp;lt;br/&amp;gt;0x12 = Shape Assignment. &amp;quot;Data&amp;quot; holds the Shape ID (index into SHP1)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt16 || A Data value. Used by some nodes to index into other chunks. Usage depends on the node type.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The node list is padded to the nearest 32.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== VTX1 - Vertex Data ==&lt;br /&gt;
The &#039;&#039;&#039;V&#039;&#039;&#039;er&#039;&#039;&#039;t&#039;&#039;&#039;e&#039;&#039;&#039;x&#039;&#039;&#039; Data section contains the actual number values used for the properties of the geometry. It also includes the information on how the values are formatted.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;VTX1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int32 || Buffer Format list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || &amp;quot;POSITION&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || &amp;quot;NORMAL&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || &amp;quot;TANGENT&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || &amp;quot;COLOR_0&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Int32 || &amp;quot;COLOR_1&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Int32 || &amp;quot;TEXCOORD_0&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Int32 || &amp;quot;TEXCOORD_1&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Int32 || &amp;quot;TEXCOORD_2&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C || Int32 || &amp;quot;TEXCOORD_3&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x30 || Int32 || &amp;quot;TEXCOORD_4&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x34 || Int32 || &amp;quot;TEXCOORD_5&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x38 || Int32 || &amp;quot;TEXCOORD_6&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C || Int32 || &amp;quot;TEXCOORD_7&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Vertex Buffer Formats ===&lt;br /&gt;
Each of the Buffers in this section have a format descriptor. This allows different types of data storage, allowing for smaller files.&lt;br /&gt;
&lt;br /&gt;
Each format descriptor contains an Attribute Target, a Component Count, a Data Type, and a Mantissa shifter (to allow floats to be stored as smaller datatypes compared to FLOAT).&amp;lt;br/&amp;gt;Only one descriptor can exist for each attribute.&lt;br /&gt;
&lt;br /&gt;
The Attribute Target tells the game what this buffer is used for.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Attribute Targets&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000009 || POSITION || This buffer represents the positions of vertices in the model. Basically required for all visual models.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000A || NORMAL || This buffer represents vertex normals, used for the engine&#039;s vertex shading. Not needed if no material requires it.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000B || COLOR_0 || This buffer is available for Vertex Colors.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000C || COLOR_1 || This buffer is available for Vertex Colors.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000D || TEXCOORD_0 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000E || TEXCOORD_1 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000F || TEXCOORD_2 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000010 || TEXCOORD_3 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000011 || TEXCOORD_4 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000012 || TEXCOORD_5 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000013 || TEXCOORD_6 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000014 || TEXCOORD_7 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000019 || TANGENT || &#039;&#039;Currently unknown exactly what goes in here.&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x000000FF || List End || A buffer using this target will end the descriptor list.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The component count tells the game how many parts of the component that there are. Note that the values are considered based on the attribute target they&#039;re assigned to.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Component Count&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || POSITION_XY || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || POSITION_XYZ || Represents a position in 3D space with 3 values: X, Y, and Z.&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || NORMAL_XYZ || Represents a normal vector in 3D space with 3 values: X, Y, and Z.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || NORMAL_NBT || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || NORMAL_NBT3 || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || COLOR_RGB || Represents a color value with only Red, Green, and Blue values.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || COLOR_RGBA || Represents a color value with Red, Green, Blue, and Alpha values.&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || TEXCOORD_S || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || TEXCOORD_ST || Represents a UV texture coordinate with 2 values: X and Y.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Data Type tells the game how many bytes each value is, in the sense that an Int32 is 4 bytes, a Int16 is 2 bytes, a Float is 4 bytes, etc.&amp;lt;br/&amp;gt;Note that the Color values have a different set of options.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Data Types&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || UInt8 || 1 byte per value (0 to 255)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || Int8 || 1 byte per value (-128 to 127)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || UInt16 || 2 bytes per value (0 to 65535)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || Int16 || 2 bytes per value (-32,768 to 32,767)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || Float || 4 bytes per value&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || RGB565 || 2 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || RGB8 || 3 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || RGBX8 || 3 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || RGBA4 || 2 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || RGBA6 || 4 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000005 || RGBA8 || 4 bytes per color&lt;br /&gt;
|}&lt;br /&gt;
&amp;gt; &#039;&#039;Note: Both games require colors to be 4 bytes wide at all times, so changing from RGBA8 is worthless.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== EVP1 - Skinning Envelopes ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;EVP1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Envelopes stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || &amp;quot;Joint Count&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || &amp;quot;&#039;Joint Count&#039; list index&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || &amp;quot;Joint Weight&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || &amp;quot;Inverse Bind Matrices&amp;quot; list offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== DRW1 - Skinning Assignments ==&lt;br /&gt;
&lt;br /&gt;
== JNT1 - Joint Hierarchy ==&lt;br /&gt;
The &#039;&#039;&#039;J&#039;&#039;&#039;oi&#039;&#039;&#039;nt&#039;&#039;&#039; Hierarchy section defines the rigging skeleton of a model. There can only be one skeleton per model.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;JNT1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Joints stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Joint Data table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Remap table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Name table offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Joint Data ===&lt;br /&gt;
Each joint includes positional data and a bounding box which is used by the game for determining rendering range automatically.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int16 || Matrix Type&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || UInt8 || Parent Scale inheritance&amp;lt;br/&amp;gt;0 = Follow parent joint&#039;s scale&amp;lt;br/&amp;gt;1 = Ignore parent joint&#039;s scale&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt8 || Padding (0xFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Float || Scale X&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Float || Scale Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Float || Scale Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int16 || Rotation X&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || Int16 || Rotation Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int16 || Rotation Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x16 || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Float || Translation X&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Float || Translation Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Float || Translation Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Float || Bounding Sphere&amp;lt;br/&amp;gt;Should encapsulate all vertices that the joint affects&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Float || Bounding Box Minimum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C || Float || Bounding Box Minimum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x30 || Float || Bounding Box Minimum Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x34 || Float || Bounding Box Maximum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x38 || Float || Bounding Box Maximum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C || Float || Bounding Box Maximum Z&lt;br /&gt;
|}&lt;br /&gt;
Rotation is stored between -0x7FFF and 0x7FFF, which ranges -180 degrees and 180 degrees.&lt;br /&gt;
&lt;br /&gt;
== SHP1 - Shape Information==&lt;br /&gt;
The &#039;&#039;&#039;Sh&#039;&#039;&#039;a&#039;&#039;&#039;p&#039;&#039;&#039;e Information section determines how to use the data in the [[#VTX1_-_Vertex_Data|VTX1]] section to create shapes.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;SHP1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Shapes stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Shape Init Data offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Remap table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Name table offset&amp;lt;br/&amp;gt;(Generally not used, and thus set to 0)&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || Vertex Index Attribute table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Int32 || Weight Index table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Int32 || Primitive Data offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Int32 || Matrix Group Data offset (entry count must equal the entry count of the GXDisplayList group table)&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Int32 || Matrix Group Definition table offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Shape Data ===&lt;br /&gt;
Each shape denotes a Matrix Calculation type, which is used for Billboarding, as well as multi-joint skinning.&amp;lt;br/&amp;gt;A shape also hosts a collection of Matrix Groups. If the geometry needs to be weighted to more than 10 [[#DRW1_-_Skinning_Assignments|DRW1]] matrices, more than one Matrix Group is needed.&amp;lt;br/&amp;gt;A single Matrix Group can have multiple Primitives in it, but these Primitives must share the same set of [[#DRW1_-_Skinning_Assignments|DRW1]] matrices.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;TODO: Figure out what happens in the event that more than 10 are needed (such as one vertex being weighted to 11 bones). Is it just straight up not allowed?&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt8 || Matrix Type&lt;br /&gt;
&lt;br /&gt;
* 0 = Single Joint&lt;br /&gt;
&lt;br /&gt;
* 1 = Billboard Joint&lt;br /&gt;
&lt;br /&gt;
* 2 = Billboard Joint (Y axis only)&lt;br /&gt;
&lt;br /&gt;
* 3 = Multiple Joints&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || UInt8 || Padding (0xFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Int16 || Matrix Group count&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int16 || Vertex Index Attribute offset&amp;lt;br/&amp;gt;Relative to the Vertex Index Attribute Table offset defined in SHP1&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Int16 || Matrix Group Data index&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || First Matrix Group Definition index&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Float || Bounding Sphere&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Float || Bounding Box Minimum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Float || Bounding Box Minimum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Float || Bounding Box Minimum Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Float || Bounding Box Maximum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Float || Bounding Box Maximum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Float || Bounding Box Maximum Z&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Vertex Index Attribute Table ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int32 || An [[#Index%20Buffer%20Formats|index buffer]] attribute target&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || An [[#Index%20Buffer%20Formats|index buffer]] type&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Index Buffer Formats ====&lt;br /&gt;
Each of the Buffers in this section have a format descriptor. This allows different types of data storage, allowing for smaller files.&lt;br /&gt;
&lt;br /&gt;
These attributes line up with either a direct value that is stored in the shape, or an index into a [[#VTX1_-_Vertex_Data|VTX1]] [[#Vertex%20Buffer%20Formats|data buffer]].&amp;lt;br/&amp;gt;Only one indexer can exist for each attribute.&lt;br /&gt;
&lt;br /&gt;
The Attribute Target tells the game what this index buffer is used for.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Attribute Targets&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || POSITION_MATRIX || This is a direct list of indices into the Matrix Group&#039;s Weight collection. Required for Shapes that use Multiple Joint skinning.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || TEXTURE_0_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || TEXTURE_1_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || TEXTURE_2_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || TEXTURE_3_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000005 || TEXTURE_4_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000006 || TEXTURE_5_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000007 || TEXTURE_6_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000008 || TEXTURE_7_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000009 || POSITION || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;POSITION&amp;quot; buffer. Required.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000A || NORMAL || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;NORMAL&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000B || COLOR_0 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;COLOR_0&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000C || COLOR_1 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;COLOR_1&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000D || TEXCOORD_0 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_0&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000E || TEXCOORD_1 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_1&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000F || TEXCOORD_2 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_2&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000010 || TEXCOORD_3 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_3&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000011 || TEXCOORD_4 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_4&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000012 || TEXCOORD_5 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_5&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000013 || TEXCOORD_6 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_6&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000014 || TEXCOORD_7 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_7&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000019 || TANGENT || &#039;&#039;This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TANGENT&amp;quot; buffer, but we don&#039;t yet know what that buffer does.&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x000000FF || List End || A buffer using this target will end the descriptor list.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Data Type of an Index Buffer determines the size of each Index. Direct Buffers can only be 1 byte per value.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Data Types&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || None || Only used for the List End&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || Direct || 1 byte per value. Only used for data that is not stored within [[#VTX1_-_Vertex_Data|VTX1]]&amp;lt;br/&amp;gt;Needs to be divided by 3 for some reason...&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || UInt8 || 1 byte per value (0 to 255). Indexes a buffer in [[#VTX1_-_Vertex_Data|VTX1]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || UInt16 || 2 bytes per value (0 to 65535). Indexes a buffer in [[#VTX1_-_Vertex_Data|VTX1]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Primitive Data ===&lt;br /&gt;
This chunk contains raw primitives. These are what hold the index buffers.&amp;lt;br/&amp;gt;The Index Buffers are ordered the same way the Index Buffer Attributes are ordered. For example, POSITION (UInt16), NORMAL (UInt16), COLOR_0 (UInt8), TEXCOORD_0 (UInt16), would result in the following byte structure: &#039;&#039;&#039;PPPP NNNN C0 TXC0&#039;&#039;&#039;&amp;lt;br/&amp;gt;This repeats for each vertex in the primitive.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Uint8 || Primitive Type&lt;br /&gt;
&lt;br /&gt;
* 0x80 = Individual Quads&lt;br /&gt;
&lt;br /&gt;
* 0x90 = Individual Triangles&lt;br /&gt;
&lt;br /&gt;
* 0x98 = Triangle Strip&lt;br /&gt;
&lt;br /&gt;
* 0xA0 = Triangle Fan&lt;br /&gt;
&lt;br /&gt;
* 0xA8 = Individual Lines&lt;br /&gt;
&lt;br /&gt;
* 0xB0 = Line Strip&lt;br /&gt;
&lt;br /&gt;
* 0xB8 = Individual Points&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;TODO: Figure out if Quads, Lines, Line Strips, and Points work.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;small&amp;gt;TODO: Figure out if &amp;quot;Quad Strips&amp;quot; exist at 0x88.&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int16 || Vertex Count&lt;br /&gt;
|}&lt;br /&gt;
Each Matrix Group&#039;s primitives are padded to the nearest 32.&lt;br /&gt;
&amp;lt;small&amp;gt;TODO: Figure out if the padding is allowed to be omitted.&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Matrix Group Definition Table ===&lt;br /&gt;
This table defines a list of Matrix Groups for each Shape. A Shape can have multiple Matrix Groups, but only stores the index of the first one. This means that all the Matrix Groups for a given Shape must come directly one after another.&amp;lt;br/&amp;gt;It contains only two values: The size of all Primitive Data within this group, and an offset to the first Primitive (relative to the Primitive Data offset defined in SHP1).&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int32 || Primitive Data size&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || First Primitive offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Matrix Group Data Table ===&lt;br /&gt;
This table contains definitions of sub-segments inside the Weight Index Table. How these values are used differs based on the shape matrix calculation type, but official files generally set both usages up correctly regardless.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int16 || [[#DRW1_-_Skinning_Assignments|DRW1]] Matrix ID&amp;lt;br/&amp;gt;This is only used with Single Joint shape matrix calculation.&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Int16 || Matrix Count&amp;lt;br/&amp;gt;This is only used with Multiple Joint shape matrix calculation.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || Starting Weight Index&amp;lt;br/&amp;gt;This is only used with Multiple Joint shape matrix calculation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Weight Index Table ===&lt;br /&gt;
This table contains several indices into [[#DRW1_-_Skinning_Assignments|DRW1]].&amp;lt;br/&amp;gt;Each index is a Signed 16 value.&amp;lt;br/&amp;gt;The values may also contain 0xFFFF, which indicates that the last used index should be used instead.&amp;lt;br/&amp;gt;Matrix Groups can select a segment of these indices (up to 10) for use. A Matrix Group must not start with 0xFFFF.&lt;br /&gt;
&lt;br /&gt;
== MAT2 - Material List (Old) ==&lt;br /&gt;
Technically supported by the game, but not known to be used by any model.&lt;br /&gt;
&lt;br /&gt;
== MAT3 - Material List ==&lt;br /&gt;
&lt;br /&gt;
== MDL3 - Display List ==&lt;br /&gt;
&lt;br /&gt;
== TEX1 - Texture Data ==&lt;br /&gt;
The &#039;&#039;&#039;Tex&#039;&#039;&#039;ture Information section holds several embedded [[BTI_(File_Format)|BTI]] files that [[#MAT3_-_Material_List|MAT3]] can reference by index for texture assignment.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;TEX1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of [[BTI_(File_Format)|BTI]] files stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || [[BTI_(File_Format)|BTI]] Header Table Offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Name table offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The texture data locations are defined by the [[BTI_(File_Format)|BTI]] headers (which themselves are located directly one after another at the Header Table)&amp;lt;br/&amp;gt;&lt;br /&gt;
This structure allows multiple textures that have the same visual data to have their headers point to just one block of visual data. In other words, two identical textures can be &amp;quot;compressed&amp;quot; into one while still having their own properties (wrapping, filtering, etc.)&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=947</id>
		<title>BMD/BDL (File Format)</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=947"/>
		<updated>2025-10-22T21:35:43Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: Labelled INF1 section value to be related to SHP1&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:File formats]]&lt;br /&gt;
{{WIP}}&lt;br /&gt;
&lt;br /&gt;
BMD (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;M&#039;&#039;&#039;o&#039;&#039;&#039;d&#039;&#039;&#039;el) and BDL (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;D&#039;&#039;&#039;isplay &#039;&#039;&#039;L&#039;&#039;&#039;ist) are two 3D model formats used in &#039;&#039;Super Mario Galaxy&#039;&#039; and &#039;&#039;Super Mario Galaxy 2&#039;&#039;, among a few other &#039;&#039;Wii&#039;&#039; and &#039;&#039;GameCube&#039;&#039; games, such as &#039;&#039;Super Mario Sunshine&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These two formats hold the same data, except BDL contains an additional set of data which is used for faster rendering speeds.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Super Mario Galaxy&#039;&#039; &amp;amp; &#039;&#039;Super Mario Galaxy 2&#039;&#039; contain J3DLoader versions 21 and 26.&lt;br /&gt;
&lt;br /&gt;
== File Header ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || The magic that tells the game which format this file is. (ASCII)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bmd2&#039;&#039;&#039; for BMD (J3DLoader V21)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bmd3&#039;&#039;&#039; for BMD (J3DLoader v26)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bdl4&#039;&#039;&#039; for BDL (J3DLoader v26)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int32 || The total size of the file&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || The number of chunks present in this file.&amp;lt;br/&amp;gt;&#039;&#039;&#039;8&#039;&#039;&#039; for BMD&amp;lt;br/&amp;gt;&#039;&#039;&#039;9&#039;&#039;&#039; for BDL&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Subversion Header ===&lt;br /&gt;
This part of the header is not used, and can be anything.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || A 4 character value representing the Subversion. Usually SVR3 for SMG/2.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Byte[12] || Twelve bytes of padding. Usually these are &#039;&#039;&#039;0xFF&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== INF1 - Scene Information ==&lt;br /&gt;
The &#039;&#039;&#039;Inf&#039;&#039;&#039;ormation section hosts a hierarchy of Joints, Materials, and Shapes, which are used to render the model.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;INF1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || [[#J3DLoader%20Flags|J3DLoader Flags]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Matrix Group Data Count&amp;lt;br/&amp;gt;Referring to the Matrix Group Data in [[#SHP1_-_Shape_Information|SHP1]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Vertex Count&amp;lt;br/&amp;gt;Always equals the number of entries in the &amp;quot;POSITION&amp;quot; [[#Vertex%20Buffer%20Formats|data buffer]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Relative offset to the [[#Scene%20Hierarchy|Scene Hierarchy]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== J3DLoader Flags ===&lt;br /&gt;
The J3DLoader contains several flags which affect how models are handled. There are more than what are shown here, however, those must be applied by the game itself in the code.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000000 || No flags applied (TODO: Check if this defaults to basic matrix calculation)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000001 || Use Autodesk Softimage matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000010 || Use Autodesk Maya matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000100 || Use Basic matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000001000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000010000 || UseImmidiateMtx (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000100000 || UsePostTexMtx (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000001000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000010000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000100000000 || NoMatrixTransform (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000001000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000010000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000100000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0001000000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0010000000000000 || DoBdlMaterialCalc&lt;br /&gt;
|-&lt;br /&gt;
| 0b0100000000000000 || NoBdlMaterialPatch - If set, skips the call to &#039;&#039;&#039;J3DModelLoader::readPatchedMaterial&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0b1000000000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
For all BMD files, the game always includes load flags &#039;&#039;Material_PE_Full&#039;&#039;, &#039;&#039;Material_UseIndirect&#039;&#039;, &#039;&#039;UseUniqueMaterials&#039;&#039;, and &#039;&#039;UNKNOWN_21&#039;&#039;.&amp;lt;br/&amp;gt;&lt;br /&gt;
For all BDL files, the game always includes load flags &#039;&#039;Material_UseIndirect&#039;&#039;, and &#039;&#039;UseUniqueMaterials&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;gt; &#039;&#039;Note: Changing the load flags by changing the code doesn&#039;t seem to do much.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Scene Hierarchy ===&lt;br /&gt;
Each model is constructed using a Scene Hierarchy. This simply determines the order of bones (in turn, defining the parent/child relations), material assignments, and Shape assignments.&lt;br /&gt;
&lt;br /&gt;
Each node consists of the following:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt16 || Node Type.&amp;lt;br/&amp;gt;0x00 = Marks the end of the node list&amp;lt;br/&amp;gt;0x01 = Creates a new child of the previous node&amp;lt;br/&amp;gt;0x02 = Finishes the child node and returns ownership to the previous node&amp;lt;br/&amp;gt;0x10 = Joint Assignment node. &amp;quot;Data&amp;quot; holds the Joint ID (index into JNT1)&amp;lt;br/&amp;gt;0x11 = Material assignment. &amp;quot;Data&amp;quot; holds the Material ID (index into MAT3)&amp;lt;br/&amp;gt;0x12 = Shape Assignment. &amp;quot;Data&amp;quot; holds the Shape ID (index into SHP1)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt16 || A Data value. Used by some nodes to index into other chunks. Usage depends on the node type.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The node list is padded to the nearest 32.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== VTX1 - Vertex Data ==&lt;br /&gt;
The &#039;&#039;&#039;V&#039;&#039;&#039;er&#039;&#039;&#039;t&#039;&#039;&#039;e&#039;&#039;&#039;x&#039;&#039;&#039; Data section contains the actual number values used for the properties of the geometry. It also includes the information on how the values are formatted.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;VTX1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int32 || Buffer Format list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || &amp;quot;POSITION&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || &amp;quot;NORMAL&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || &amp;quot;TANGENT&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || &amp;quot;COLOR_0&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Int32 || &amp;quot;COLOR_1&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Int32 || &amp;quot;TEXCOORD_0&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Int32 || &amp;quot;TEXCOORD_1&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Int32 || &amp;quot;TEXCOORD_2&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C || Int32 || &amp;quot;TEXCOORD_3&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x30 || Int32 || &amp;quot;TEXCOORD_4&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x34 || Int32 || &amp;quot;TEXCOORD_5&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x38 || Int32 || &amp;quot;TEXCOORD_6&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C || Int32 || &amp;quot;TEXCOORD_7&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Vertex Buffer Formats ===&lt;br /&gt;
Each of the Buffers in this section have a format descriptor. This allows different types of data storage, allowing for smaller files.&lt;br /&gt;
&lt;br /&gt;
Each format descriptor contains an Attribute Target, a Component Count, a Data Type, and a Mantissa shifter (to allow floats to be stored as smaller datatypes compared to FLOAT).&amp;lt;br/&amp;gt;Only one descriptor can exist for each attribute.&lt;br /&gt;
&lt;br /&gt;
The Attribute Target tells the game what this buffer is used for.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Attribute Targets&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000009 || POSITION || This buffer represents the positions of vertices in the model. Basically required for all visual models.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000A || NORMAL || This buffer represents vertex normals, used for the engine&#039;s vertex shading. Not needed if no material requires it.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000B || COLOR_0 || This buffer is available for Vertex Colors.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000C || COLOR_1 || This buffer is available for Vertex Colors.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000D || TEXCOORD_0 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000E || TEXCOORD_1 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000F || TEXCOORD_2 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000010 || TEXCOORD_3 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000011 || TEXCOORD_4 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000012 || TEXCOORD_5 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000013 || TEXCOORD_6 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000014 || TEXCOORD_7 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000019 || TANGENT || &#039;&#039;Currently unknown exactly what goes in here.&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x000000FF || List End || A buffer using this target will end the descriptor list.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The component count tells the game how many parts of the component that there are. Note that the values are considered based on the attribute target they&#039;re assigned to.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Component Count&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || POSITION_XY || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || POSITION_XYZ || Represents a position in 3D space with 3 values: X, Y, and Z.&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || NORMAL_XYZ || Represents a normal vector in 3D space with 3 values: X, Y, and Z.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || NORMAL_NBT || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || NORMAL_NBT3 || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || COLOR_RGB || Represents a color value with only Red, Green, and Blue values.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || COLOR_RGBA || Represents a color value with Red, Green, Blue, and Alpha values.&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || TEXCOORD_S || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || TEXCOORD_ST || Represents a UV texture coordinate with 2 values: X and Y.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Data Type tells the game how many bytes each value is, in the sense that an Int32 is 4 bytes, a Int16 is 2 bytes, a Float is 4 bytes, etc.&amp;lt;br/&amp;gt;Note that the Color values have a different set of options.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Data Types&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || UInt8 || 1 byte per value (0 to 255)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || Int8 || 1 byte per value (-128 to 127)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || UInt16 || 2 bytes per value (0 to 65535)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || Int16 || 2 bytes per value (-32,768 to 32,767)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || Float || 4 bytes per value&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || RGB565 || 2 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || RGB8 || 3 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || RGBX8 || 3 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || RGBA4 || 2 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || RGBA6 || 4 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000005 || RGBA8 || 4 bytes per color&lt;br /&gt;
|}&lt;br /&gt;
&amp;gt; &#039;&#039;Note: Both games require colors to be 4 bytes wide at all times, so changing from RGBA8 is worthless.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== EVP1 - Skinning Envelopes ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;EVP1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Envelopes stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || &amp;quot;Joint Count&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || &amp;quot;&#039;Joint Count&#039; list index&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || &amp;quot;Joint Weight&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || &amp;quot;Inverse Bind Matrices&amp;quot; list offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== DRW1 - Skinning Assignments ==&lt;br /&gt;
&lt;br /&gt;
== JNT1 - Joint Hierarchy ==&lt;br /&gt;
The &#039;&#039;&#039;J&#039;&#039;&#039;oi&#039;&#039;&#039;nt&#039;&#039;&#039; Hierarchy section defines the rigging skeleton of a model. There can only be one skeleton per model.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;JNT1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Joints stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Joint Data table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Remap table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Name table offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Joint Data ===&lt;br /&gt;
Each joint includes positional data and a bounding box which is used by the game for determining rendering range automatically.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int16 || Matrix Type&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || UInt8 || Parent Scale inheritance&amp;lt;br/&amp;gt;0 = Follow parent joint&#039;s scale&amp;lt;br/&amp;gt;1 = Ignore parent joint&#039;s scale&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt8 || Padding (0xFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Float || Scale X&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Float || Scale Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Float || Scale Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int16 || Rotation X&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || Int16 || Rotation Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int16 || Rotation Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x16 || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Float || Translation X&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Float || Translation Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Float || Translation Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Float || Bounding Sphere&amp;lt;br/&amp;gt;Should encapsulate all vertices that the joint affects&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Float || Bounding Box Minimum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C || Float || Bounding Box Minimum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x30 || Float || Bounding Box Minimum Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x34 || Float || Bounding Box Maximum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x38 || Float || Bounding Box Maximum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C || Float || Bounding Box Maximum Z&lt;br /&gt;
|}&lt;br /&gt;
Rotation is stored between -0x7FFF and 0x7FFF, which ranges -180 degrees and 180 degrees.&lt;br /&gt;
&lt;br /&gt;
== SHP1 - Shape Information==&lt;br /&gt;
The &#039;&#039;&#039;Sh&#039;&#039;&#039;a&#039;&#039;&#039;p&#039;&#039;&#039;e Information section determines how to use the data in the [[#VTX1_-_Vertex_Data|VTX1]] section to create shapes.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;SHP1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Shapes stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Shape Init Data offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Remap table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Name table offset&amp;lt;br/&amp;gt;(Generally not used, and thus set to 0)&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || Vertex Index Attribute table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Int32 || Weight Index table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Int32 || Primitive Data offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Int32 || Matrix Group Data offset (entry count must equal the entry count of the GXDisplayList group table)&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Int32 || Matrix Group Definition table offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Shape Data ===&lt;br /&gt;
Each shape denotes a Matrix Calculation type, which is used for Billboarding, as well as multi-joint skinning.&amp;lt;br/&amp;gt;A shape also hosts a collection of Matrix Groups. If the geometry needs to be weighted to more than 10 [[#DRW1_-_Skinning_Assignments|DRW1]] matrices, more than one Matrix Group is needed.&amp;lt;br/&amp;gt;A single Matrix Group can have multiple Primitives in it, but these Primitives must share the same set of [[#DRW1_-_Skinning_Assignments|DRW1]] matrices.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;TODO: Figure out what happens in the event that more than 10 are needed (such as one vertex being weighted to 11 bones). Is it just straight up not allowed?&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt8 || Matrix Type&lt;br /&gt;
&lt;br /&gt;
* 0 = Single Joint&lt;br /&gt;
&lt;br /&gt;
* 1 = Billboard Joint&lt;br /&gt;
&lt;br /&gt;
* 2 = Billboard Joint (Y axis only)&lt;br /&gt;
&lt;br /&gt;
* 3 = Multiple Joints&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || UInt8 || Padding (0xFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Int16 || Matrix Group count&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int16 || Vertex Index Attribute offset&amp;lt;br/&amp;gt;Relative to the Vertex Index Attribute Table offset defined in SHP1&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Int16 || Matrix Group Data index&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || First Matrix Group Definition index&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Float || Bounding Sphere&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Float || Bounding Box Minimum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Float || Bounding Box Minimum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Float || Bounding Box Minimum Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Float || Bounding Box Maximum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Float || Bounding Box Maximum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Float || Bounding Box Maximum Z&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Vertex Index Attribute Table ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int32 || An [[#Index%20Buffer%20Formats|index buffer]] attribute target&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || An [[#Index%20Buffer%20Formats|index buffer]] type&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Index Buffer Formats ====&lt;br /&gt;
Each of the Buffers in this section have a format descriptor. This allows different types of data storage, allowing for smaller files.&lt;br /&gt;
&lt;br /&gt;
These attributes line up with either a direct value that is stored in the shape, or an index into a [[#VTX1_-_Vertex_Data|VTX1]] [[#Vertex%20Buffer%20Formats|data buffer]].&amp;lt;br/&amp;gt;Only one indexer can exist for each attribute.&lt;br /&gt;
&lt;br /&gt;
The Attribute Target tells the game what this index buffer is used for.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Attribute Targets&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || POSITION_MATRIX || This is a direct list of indices into the Matrix Group&#039;s Weight collection. Required for Shapes that use Multiple Joint skinning.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || TEXTURE_0_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || TEXTURE_1_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || TEXTURE_2_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || TEXTURE_3_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000005 || TEXTURE_4_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000006 || TEXTURE_5_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000007 || TEXTURE_6_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000008 || TEXTURE_7_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000009 || POSITION || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;POSITION&amp;quot; buffer. Required.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000A || NORMAL || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;NORMAL&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000B || COLOR_0 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;COLOR_0&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000C || COLOR_1 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;COLOR_1&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000D || TEXCOORD_0 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_0&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000E || TEXCOORD_1 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_1&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000F || TEXCOORD_2 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_2&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000010 || TEXCOORD_3 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_3&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000011 || TEXCOORD_4 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_4&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000012 || TEXCOORD_5 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_5&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000013 || TEXCOORD_6 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_6&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000014 || TEXCOORD_7 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_7&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000019 || TANGENT || &#039;&#039;This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TANGENT&amp;quot; buffer, but we don&#039;t yet know what that buffer does.&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x000000FF || List End || A buffer using this target will end the descriptor list.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Data Type of an Index Buffer determines the size of each Index. Direct Buffers can only be 1 byte per value.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Data Types&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || None || Only used for the List End&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || Direct || 1 byte per value. Only used for data that is not stored within [[#VTX1_-_Vertex_Data|VTX1]]&amp;lt;br/&amp;gt;Needs to be divided by 3 for some reason...&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || UInt8 || 1 byte per value (0 to 255). Indexes a buffer in [[#VTX1_-_Vertex_Data|VTX1]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || UInt16 || 2 bytes per value (0 to 65535). Indexes a buffer in [[#VTX1_-_Vertex_Data|VTX1]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Primitive Data ===&lt;br /&gt;
This chunk contains raw primitives. These are what hold the index buffers.&amp;lt;br/&amp;gt;The Index Buffers are ordered the same way the Index Buffer Attributes are ordered. For example, POSITION (UInt16), NORMAL (UInt16), COLOR_0 (UInt8), TEXCOORD_0 (UInt16), would result in the following byte structure: &#039;&#039;&#039;PPPP NNNN C0 TXC0&#039;&#039;&#039;&amp;lt;br/&amp;gt;This repeats for each vertex in the primitive.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Uint8 || Primitive Type&lt;br /&gt;
&lt;br /&gt;
* 0x80 = Individual Quads&lt;br /&gt;
&lt;br /&gt;
* 0x90 = Individual Triangles&lt;br /&gt;
&lt;br /&gt;
* 0x98 = Triangle Strip&lt;br /&gt;
&lt;br /&gt;
* 0xA0 = Triangle Fan&lt;br /&gt;
&lt;br /&gt;
* 0xA8 = Individual Lines&lt;br /&gt;
&lt;br /&gt;
* 0xB0 = Line Strip&lt;br /&gt;
&lt;br /&gt;
* 0xB8 = Individual Points&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;TODO: Figure out if Quads, Lines, Line Strips, and Points work.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;small&amp;gt;TODO: Figure out if &amp;quot;Quad Strips&amp;quot; exist at 0x88.&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int16 || Vertex Count&lt;br /&gt;
|}&lt;br /&gt;
Each Matrix Group&#039;s primitives are padded to the nearest 32.&lt;br /&gt;
&amp;lt;small&amp;gt;TODO: Figure out if the padding is allowed to be omitted.&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Matrix Group Definition Table ===&lt;br /&gt;
This table defines a list of Matrix Groups for each Shape. A Shape can have multiple Matrix Groups, but only stores the index of the first one. This means that all the Matrix Groups for a given Shape must come directly one after another.&amp;lt;br/&amp;gt;It contains only two values: The size of all Primitive Data within this group, and an offset to the first Primitive (relative to the Primitive Data offset defined in SHP1).&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int32 || Primitive Data size&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || First Primitive offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Matrix Group Data Table ===&lt;br /&gt;
This table contains definitions of sub-segments inside the Weight Index Table. How these values are used differs based on the shape matrix calculation type, but official files generally set both usages up correctly regardless.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int16 || [[#DRW1_-_Skinning_Assignments|DRW1]] Matrix ID&amp;lt;br/&amp;gt;This is only used with Single Joint shape matrix calculation.&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Int16 || Matrix Count&amp;lt;br/&amp;gt;This is only used with Multiple Joint shape matrix calculation.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || Starting Weight Index&amp;lt;br/&amp;gt;This is only used with Multiple Joint shape matrix calculation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Weight Index Table ===&lt;br /&gt;
This table contains several indices into [[#DRW1_-_Skinning_Assignments|DRW1]].&amp;lt;br/&amp;gt;Each index is a Signed 16 value.&amp;lt;br/&amp;gt;The values may also contain 0xFFFF, which indicates that the last used index should be used instead.&amp;lt;br/&amp;gt;Matrix Groups can select a segment of these indices (up to 10) for use. A Matrix Group must not start with 0xFFFF.&lt;br /&gt;
&lt;br /&gt;
== MAT2 - Material List (Old) ==&lt;br /&gt;
Technically supported by the game, but not known to be used by any model.&lt;br /&gt;
&lt;br /&gt;
== MAT3 - Material List ==&lt;br /&gt;
&lt;br /&gt;
== MDL3 - Display List ==&lt;br /&gt;
&lt;br /&gt;
== TEX1 - Texture Data ==&lt;br /&gt;
The &#039;&#039;&#039;Tex&#039;&#039;&#039;ture Information section holds several embedded [[BTI_(File_Format)|BTI]] files that [[#MAT3_-_Material_List|MAT3]] can reference by index for texture assignment.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;TEX1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of [[BTI_(File_Format)|BTI]] files stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || [[BTI_(File_Format)|BTI]] Header Table Offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Name table offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The texture data locations are defined by the [[BTI_(File_Format)|BTI]] headers (which themselves are located directly one after another at the Header Table)&amp;lt;br/&amp;gt;&lt;br /&gt;
This structure allows multiple textures that have the same visual data to have their headers point to just one block of visual data. In other words, two identical textures can be &amp;quot;compressed&amp;quot; into one while still having their own properties (wrapping, filtering, etc.)&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=946</id>
		<title>BMD/BDL (File Format)</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=946"/>
		<updated>2025-10-16T22:53:52Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: Primitive Padding Note&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:File formats]]&lt;br /&gt;
{{WIP}}&lt;br /&gt;
&lt;br /&gt;
BMD (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;M&#039;&#039;&#039;o&#039;&#039;&#039;d&#039;&#039;&#039;el) and BDL (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;D&#039;&#039;&#039;isplay &#039;&#039;&#039;L&#039;&#039;&#039;ist) are two 3D model formats used in &#039;&#039;Super Mario Galaxy&#039;&#039; and &#039;&#039;Super Mario Galaxy 2&#039;&#039;, among a few other &#039;&#039;Wii&#039;&#039; and &#039;&#039;GameCube&#039;&#039; games, such as &#039;&#039;Super Mario Sunshine&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These two formats hold the same data, except BDL contains an additional set of data which is used for faster rendering speeds.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Super Mario Galaxy&#039;&#039; &amp;amp; &#039;&#039;Super Mario Galaxy 2&#039;&#039; contain J3DLoader versions 21 and 26.&lt;br /&gt;
&lt;br /&gt;
== File Header ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || The magic that tells the game which format this file is. (ASCII)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bmd2&#039;&#039;&#039; for BMD (J3DLoader V21)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bmd3&#039;&#039;&#039; for BMD (J3DLoader v26)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bdl4&#039;&#039;&#039; for BDL (J3DLoader v26)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int32 || The total size of the file&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || The number of chunks present in this file.&amp;lt;br/&amp;gt;&#039;&#039;&#039;8&#039;&#039;&#039; for BMD&amp;lt;br/&amp;gt;&#039;&#039;&#039;9&#039;&#039;&#039; for BDL&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Subversion Header ===&lt;br /&gt;
This part of the header is not used, and can be anything.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || A 4 character value representing the Subversion. Usually SVR3 for SMG/2.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Byte[12] || Twelve bytes of padding. Usually these are &#039;&#039;&#039;0xFF&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== INF1 - Scene Information ==&lt;br /&gt;
The &#039;&#039;&#039;Inf&#039;&#039;&#039;ormation section hosts a hierarchy of Joints, Materials, and Shapes, which are used to render the model.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;INF1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || [[#J3DLoader%20Flags|J3DLoader Flags]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Matrix Group Count&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Vertex Count&amp;lt;br/&amp;gt;Always equals the number of entries in the &amp;quot;POSITION&amp;quot; [[#Vertex%20Buffer%20Formats|data buffer]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Relative offset to the [[#Scene%20Hierarchy|Scene Hierarchy]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== J3DLoader Flags ===&lt;br /&gt;
The J3DLoader contains several flags which affect how models are handled. There are more than what are shown here, however, those must be applied by the game itself in the code.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000000 || No flags applied (TODO: Check if this defaults to basic matrix calculation)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000001 || Use Autodesk Softimage matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000010 || Use Autodesk Maya matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000100 || Use Basic matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000001000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000010000 || UseImmidiateMtx (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000100000 || UsePostTexMtx (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000001000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000010000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000100000000 || NoMatrixTransform (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000001000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000010000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000100000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0001000000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0010000000000000 || DoBdlMaterialCalc&lt;br /&gt;
|-&lt;br /&gt;
| 0b0100000000000000 || NoBdlMaterialPatch - If set, skips the call to &#039;&#039;&#039;J3DModelLoader::readPatchedMaterial&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0b1000000000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
For all BMD files, the game always includes load flags &#039;&#039;Material_PE_Full&#039;&#039;, &#039;&#039;Material_UseIndirect&#039;&#039;, &#039;&#039;UseUniqueMaterials&#039;&#039;, and &#039;&#039;UNKNOWN_21&#039;&#039;.&amp;lt;br/&amp;gt;&lt;br /&gt;
For all BDL files, the game always includes load flags &#039;&#039;Material_UseIndirect&#039;&#039;, and &#039;&#039;UseUniqueMaterials&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;gt; &#039;&#039;Note: Changing the load flags by changing the code doesn&#039;t seem to do much.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Scene Hierarchy ===&lt;br /&gt;
Each model is constructed using a Scene Hierarchy. This simply determines the order of bones (in turn, defining the parent/child relations), material assignments, and Shape assignments.&lt;br /&gt;
&lt;br /&gt;
Each node consists of the following:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt16 || Node Type.&amp;lt;br/&amp;gt;0x00 = Marks the end of the node list&amp;lt;br/&amp;gt;0x01 = Creates a new child of the previous node&amp;lt;br/&amp;gt;0x02 = Finishes the child node and returns ownership to the previous node&amp;lt;br/&amp;gt;0x10 = Joint Assignment node. &amp;quot;Data&amp;quot; holds the Joint ID (index into JNT1)&amp;lt;br/&amp;gt;0x11 = Material assignment. &amp;quot;Data&amp;quot; holds the Material ID (index into MAT3)&amp;lt;br/&amp;gt;0x12 = Shape Assignment. &amp;quot;Data&amp;quot; holds the Shape ID (index into SHP1)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt16 || A Data value. Used by some nodes to index into other chunks. Usage depends on the node type.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The node list is padded to the nearest 32.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== VTX1 - Vertex Data ==&lt;br /&gt;
The &#039;&#039;&#039;V&#039;&#039;&#039;er&#039;&#039;&#039;t&#039;&#039;&#039;e&#039;&#039;&#039;x&#039;&#039;&#039; Data section contains the actual number values used for the properties of the geometry. It also includes the information on how the values are formatted.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;VTX1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int32 || Buffer Format list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || &amp;quot;POSITION&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || &amp;quot;NORMAL&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || &amp;quot;TANGENT&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || &amp;quot;COLOR_0&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Int32 || &amp;quot;COLOR_1&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Int32 || &amp;quot;TEXCOORD_0&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Int32 || &amp;quot;TEXCOORD_1&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Int32 || &amp;quot;TEXCOORD_2&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C || Int32 || &amp;quot;TEXCOORD_3&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x30 || Int32 || &amp;quot;TEXCOORD_4&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x34 || Int32 || &amp;quot;TEXCOORD_5&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x38 || Int32 || &amp;quot;TEXCOORD_6&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C || Int32 || &amp;quot;TEXCOORD_7&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Vertex Buffer Formats ===&lt;br /&gt;
Each of the Buffers in this section have a format descriptor. This allows different types of data storage, allowing for smaller files.&lt;br /&gt;
&lt;br /&gt;
Each format descriptor contains an Attribute Target, a Component Count, a Data Type, and a Mantissa shifter (to allow floats to be stored as smaller datatypes compared to FLOAT).&amp;lt;br/&amp;gt;Only one descriptor can exist for each attribute.&lt;br /&gt;
&lt;br /&gt;
The Attribute Target tells the game what this buffer is used for.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Attribute Targets&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000009 || POSITION || This buffer represents the positions of vertices in the model. Basically required for all visual models.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000A || NORMAL || This buffer represents vertex normals, used for the engine&#039;s vertex shading. Not needed if no material requires it.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000B || COLOR_0 || This buffer is available for Vertex Colors.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000C || COLOR_1 || This buffer is available for Vertex Colors.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000D || TEXCOORD_0 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000E || TEXCOORD_1 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000F || TEXCOORD_2 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000010 || TEXCOORD_3 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000011 || TEXCOORD_4 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000012 || TEXCOORD_5 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000013 || TEXCOORD_6 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000014 || TEXCOORD_7 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000019 || TANGENT || &#039;&#039;Currently unknown exactly what goes in here.&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x000000FF || List End || A buffer using this target will end the descriptor list.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The component count tells the game how many parts of the component that there are. Note that the values are considered based on the attribute target they&#039;re assigned to.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Component Count&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || POSITION_XY || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || POSITION_XYZ || Represents a position in 3D space with 3 values: X, Y, and Z.&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || NORMAL_XYZ || Represents a normal vector in 3D space with 3 values: X, Y, and Z.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || NORMAL_NBT || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || NORMAL_NBT3 || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || COLOR_RGB || Represents a color value with only Red, Green, and Blue values.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || COLOR_RGBA || Represents a color value with Red, Green, Blue, and Alpha values.&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || TEXCOORD_S || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || TEXCOORD_ST || Represents a UV texture coordinate with 2 values: X and Y.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Data Type tells the game how many bytes each value is, in the sense that an Int32 is 4 bytes, a Int16 is 2 bytes, a Float is 4 bytes, etc.&amp;lt;br/&amp;gt;Note that the Color values have a different set of options.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Data Types&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || UInt8 || 1 byte per value (0 to 255)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || Int8 || 1 byte per value (-128 to 127)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || UInt16 || 2 bytes per value (0 to 65535)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || Int16 || 2 bytes per value (-32,768 to 32,767)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || Float || 4 bytes per value&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || RGB565 || 2 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || RGB8 || 3 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || RGBX8 || 3 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || RGBA4 || 2 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || RGBA6 || 4 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000005 || RGBA8 || 4 bytes per color&lt;br /&gt;
|}&lt;br /&gt;
&amp;gt; &#039;&#039;Note: Both games require colors to be 4 bytes wide at all times, so changing from RGBA8 is worthless.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== EVP1 - Skinning Envelopes ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;EVP1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Envelopes stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || &amp;quot;Joint Count&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || &amp;quot;&#039;Joint Count&#039; list index&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || &amp;quot;Joint Weight&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || &amp;quot;Inverse Bind Matrices&amp;quot; list offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== DRW1 - Skinning Assignments ==&lt;br /&gt;
&lt;br /&gt;
== JNT1 - Joint Hierarchy ==&lt;br /&gt;
The &#039;&#039;&#039;J&#039;&#039;&#039;oi&#039;&#039;&#039;nt&#039;&#039;&#039; Hierarchy section defines the rigging skeleton of a model. There can only be one skeleton per model.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;JNT1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Joints stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Joint Data table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Remap table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Name table offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Joint Data ===&lt;br /&gt;
Each joint includes positional data and a bounding box which is used by the game for determining rendering range automatically.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int16 || Matrix Type&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || UInt8 || Parent Scale inheritance&amp;lt;br/&amp;gt;0 = Follow parent joint&#039;s scale&amp;lt;br/&amp;gt;1 = Ignore parent joint&#039;s scale&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt8 || Padding (0xFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Float || Scale X&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Float || Scale Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Float || Scale Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int16 || Rotation X&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || Int16 || Rotation Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int16 || Rotation Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x16 || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Float || Translation X&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Float || Translation Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Float || Translation Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Float || Bounding Sphere&amp;lt;br/&amp;gt;Should encapsulate all vertices that the joint affects&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Float || Bounding Box Minimum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C || Float || Bounding Box Minimum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x30 || Float || Bounding Box Minimum Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x34 || Float || Bounding Box Maximum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x38 || Float || Bounding Box Maximum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C || Float || Bounding Box Maximum Z&lt;br /&gt;
|}&lt;br /&gt;
Rotation is stored between -0x7FFF and 0x7FFF, which ranges -180 degrees and 180 degrees.&lt;br /&gt;
&lt;br /&gt;
== SHP1 - Shape Information==&lt;br /&gt;
The &#039;&#039;&#039;Sh&#039;&#039;&#039;a&#039;&#039;&#039;p&#039;&#039;&#039;e Information section determines how to use the data in the [[#VTX1_-_Vertex_Data|VTX1]] section to create shapes.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;SHP1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Shapes stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Shape Init Data offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Remap table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Name table offset&amp;lt;br/&amp;gt;(Generally not used, and thus set to 0)&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || Vertex Index Attribute table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Int32 || Weight Index table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Int32 || Primitive Data offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Int32 || Matrix Group Data offset (entry count must equal the entry count of the GXDisplayList group table)&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Int32 || Matrix Group Definition table offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Shape Data ===&lt;br /&gt;
Each shape denotes a Matrix Calculation type, which is used for Billboarding, as well as multi-joint skinning.&amp;lt;br/&amp;gt;A shape also hosts a collection of Matrix Groups. If the geometry needs to be weighted to more than 10 [[#DRW1_-_Skinning_Assignments|DRW1]] matrices, more than one Matrix Group is needed.&amp;lt;br/&amp;gt;A single Matrix Group can have multiple Primitives in it, but these Primitives must share the same set of [[#DRW1_-_Skinning_Assignments|DRW1]] matrices.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;TODO: Figure out what happens in the event that more than 10 are needed (such as one vertex being weighted to 11 bones). Is it just straight up not allowed?&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt8 || Matrix Type&lt;br /&gt;
&lt;br /&gt;
* 0 = Single Joint&lt;br /&gt;
&lt;br /&gt;
* 1 = Billboard Joint&lt;br /&gt;
&lt;br /&gt;
* 2 = Billboard Joint (Y axis only)&lt;br /&gt;
&lt;br /&gt;
* 3 = Multiple Joints&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || UInt8 || Padding (0xFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Int16 || Matrix Group count&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int16 || Vertex Index Attribute offset&amp;lt;br/&amp;gt;Relative to the Vertex Index Attribute Table offset defined in SHP1&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Int16 || Matrix Group Data index&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || First Matrix Group Definition index&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Float || Bounding Sphere&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Float || Bounding Box Minimum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Float || Bounding Box Minimum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Float || Bounding Box Minimum Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Float || Bounding Box Maximum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Float || Bounding Box Maximum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Float || Bounding Box Maximum Z&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Vertex Index Attribute Table ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int32 || An [[#Index%20Buffer%20Formats|index buffer]] attribute target&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || An [[#Index%20Buffer%20Formats|index buffer]] type&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Index Buffer Formats ====&lt;br /&gt;
Each of the Buffers in this section have a format descriptor. This allows different types of data storage, allowing for smaller files.&lt;br /&gt;
&lt;br /&gt;
These attributes line up with either a direct value that is stored in the shape, or an index into a [[#VTX1_-_Vertex_Data|VTX1]] [[#Vertex%20Buffer%20Formats|data buffer]].&amp;lt;br/&amp;gt;Only one indexer can exist for each attribute.&lt;br /&gt;
&lt;br /&gt;
The Attribute Target tells the game what this index buffer is used for.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Attribute Targets&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || POSITION_MATRIX || This is a direct list of indices into the Matrix Group&#039;s Weight collection. Required for Shapes that use Multiple Joint skinning.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || TEXTURE_0_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || TEXTURE_1_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || TEXTURE_2_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || TEXTURE_3_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000005 || TEXTURE_4_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000006 || TEXTURE_5_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000007 || TEXTURE_6_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000008 || TEXTURE_7_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000009 || POSITION || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;POSITION&amp;quot; buffer. Required.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000A || NORMAL || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;NORMAL&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000B || COLOR_0 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;COLOR_0&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000C || COLOR_1 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;COLOR_1&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000D || TEXCOORD_0 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_0&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000E || TEXCOORD_1 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_1&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000F || TEXCOORD_2 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_2&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000010 || TEXCOORD_3 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_3&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000011 || TEXCOORD_4 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_4&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000012 || TEXCOORD_5 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_5&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000013 || TEXCOORD_6 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_6&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000014 || TEXCOORD_7 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_7&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000019 || TANGENT || &#039;&#039;This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TANGENT&amp;quot; buffer, but we don&#039;t yet know what that buffer does.&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x000000FF || List End || A buffer using this target will end the descriptor list.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Data Type of an Index Buffer determines the size of each Index. Direct Buffers can only be 1 byte per value.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Data Types&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || None || Only used for the List End&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || Direct || 1 byte per value. Only used for data that is not stored within [[#VTX1_-_Vertex_Data|VTX1]]&amp;lt;br/&amp;gt;Needs to be divided by 3 for some reason...&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || UInt8 || 1 byte per value (0 to 255). Indexes a buffer in [[#VTX1_-_Vertex_Data|VTX1]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || UInt16 || 2 bytes per value (0 to 65535). Indexes a buffer in [[#VTX1_-_Vertex_Data|VTX1]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Primitive Data ===&lt;br /&gt;
This chunk contains raw primitives. These are what hold the index buffers.&amp;lt;br/&amp;gt;The Index Buffers are ordered the same way the Index Buffer Attributes are ordered. For example, POSITION (UInt16), NORMAL (UInt16), COLOR_0 (UInt8), TEXCOORD_0 (UInt16), would result in the following byte structure: &#039;&#039;&#039;PPPP NNNN C0 TXC0&#039;&#039;&#039;&amp;lt;br/&amp;gt;This repeats for each vertex in the primitive.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Uint8 || Primitive Type&lt;br /&gt;
&lt;br /&gt;
* 0x80 = Individual Quads&lt;br /&gt;
&lt;br /&gt;
* 0x90 = Individual Triangles&lt;br /&gt;
&lt;br /&gt;
* 0x98 = Triangle Strip&lt;br /&gt;
&lt;br /&gt;
* 0xA0 = Triangle Fan&lt;br /&gt;
&lt;br /&gt;
* 0xA8 = Individual Lines&lt;br /&gt;
&lt;br /&gt;
* 0xB0 = Line Strip&lt;br /&gt;
&lt;br /&gt;
* 0xB8 = Individual Points&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;TODO: Figure out if Quads, Lines, Line Strips, and Points work.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;small&amp;gt;TODO: Figure out if &amp;quot;Quad Strips&amp;quot; exist at 0x88.&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int16 || Vertex Count&lt;br /&gt;
|}&lt;br /&gt;
Each Matrix Group&#039;s primitives are padded to the nearest 32.&lt;br /&gt;
&amp;lt;small&amp;gt;TODO: Figure out if the padding is allowed to be omitted.&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Matrix Group Definition Table ===&lt;br /&gt;
This table defines a list of Matrix Groups for each Shape. A Shape can have multiple Matrix Groups, but only stores the index of the first one. This means that all the Matrix Groups for a given Shape must come directly one after another.&amp;lt;br/&amp;gt;It contains only two values: The size of all Primitive Data within this group, and an offset to the first Primitive (relative to the Primitive Data offset defined in SHP1).&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int32 || Primitive Data size&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || First Primitive offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Matrix Group Data Table ===&lt;br /&gt;
This table contains definitions of sub-segments inside the Weight Index Table. How these values are used differs based on the shape matrix calculation type, but official files generally set both usages up correctly regardless.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int16 || [[#DRW1_-_Skinning_Assignments|DRW1]] Matrix ID&amp;lt;br/&amp;gt;This is only used with Single Joint shape matrix calculation.&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Int16 || Matrix Count&amp;lt;br/&amp;gt;This is only used with Multiple Joint shape matrix calculation.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || Starting Weight Index&amp;lt;br/&amp;gt;This is only used with Multiple Joint shape matrix calculation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Weight Index Table ===&lt;br /&gt;
This table contains several indices into [[#DRW1_-_Skinning_Assignments|DRW1]].&amp;lt;br/&amp;gt;Each index is a Signed 16 value.&amp;lt;br/&amp;gt;The values may also contain 0xFFFF, which indicates that the last used index should be used instead.&amp;lt;br/&amp;gt;Matrix Groups can select a segment of these indices (up to 10) for use. A Matrix Group must not start with 0xFFFF.&lt;br /&gt;
&lt;br /&gt;
== MAT2 - Material List (Old) ==&lt;br /&gt;
Technically supported by the game, but not known to be used by any model.&lt;br /&gt;
&lt;br /&gt;
== MAT3 - Material List ==&lt;br /&gt;
&lt;br /&gt;
== MDL3 - Display List ==&lt;br /&gt;
&lt;br /&gt;
== TEX1 - Texture Data ==&lt;br /&gt;
The &#039;&#039;&#039;Tex&#039;&#039;&#039;ture Information section holds several embedded [[BTI_(File_Format)|BTI]] files that [[#MAT3_-_Material_List|MAT3]] can reference by index for texture assignment.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;TEX1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of [[BTI_(File_Format)|BTI]] files stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || [[BTI_(File_Format)|BTI]] Header Table Offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Name table offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The texture data locations are defined by the [[BTI_(File_Format)|BTI]] headers (which themselves are located directly one after another at the Header Table)&amp;lt;br/&amp;gt;&lt;br /&gt;
This structure allows multiple textures that have the same visual data to have their headers point to just one block of visual data. In other words, two identical textures can be &amp;quot;compressed&amp;quot; into one while still having their own properties (wrapping, filtering, etc.)&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=Cutscenes&amp;diff=945</id>
		<title>Cutscenes</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=Cutscenes&amp;diff=945"/>
		<updated>2025-10-15T20:02:06Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: /* Player */ MarioAnime not MarioAnim lol&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Files]]&lt;br /&gt;
[[Category:Lists]]&lt;br /&gt;
{{WIP}}&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;&#039;Todo:&#039;&#039;&#039;&lt;br /&gt;
*Finish the hardcoded cutscene names.&lt;br /&gt;
*More info and research on the use of canm and supported objects.&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Cutscenes are flexible, complex scenes, which can execute more freedom in contrast to the SimpleDemoExecutor.&lt;br /&gt;
These scenes consist of individual sequences that are played in order. In each sequence, several actions can be executed from certain frames, such as changing the player&#039;s position, camera movements, sound effects, and more. To each sequence (and subsequence) different actions are linked, which are then executed at the time of this sequence.&lt;br /&gt;
&lt;br /&gt;
You can best visualize this in a kind of timeline. The timeline consists of the individual sequences, which consist of several actions. At the same time single subscequences can be executed together with the actual sequences.&lt;br /&gt;
&lt;br /&gt;
==Structure==&lt;br /&gt;
[[File:Cutscene_Visual-Representation.png|thumb|A visual representation of the first Yoshi Meets cutscene.]]&lt;br /&gt;
A cutscene is activated by a demo object via SW_APPEAR within the map and loads several sheet BCSV files located in the demo.arc archive of the respective galaxy/zone. The demo object loads the bcsv files using its defined sheet name and additional &amp;quot;Demo&amp;quot; in front of the file name of the BSCV attached and a respective sheet type at the end of the file name (e.g. &#039;&#039;&#039;Demo&#039;&#039;&#039;AfterGameOver&#039;&#039;&#039;Time&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
In addition, the demo object has its own cutscene name, which is only used in certain cases (e.g. to load certain sequences for [[Starship Mario]]) and also for camera codes. Certain names can be recognized by the game and then loads additional hardcoded settings such as behavior after scene completion. A list of these names [[Cutscenes#Hardcoded_Cutscene_Names|can be found below]].&lt;br /&gt;
&lt;br /&gt;
Objects other than the player object itself can be linked to the cutscene. These then use a cutscene group ID, which on the one hand must match the demo object ID and on the other hand must be entered in the action sheet together with the object&#039;s name. If the object is entered in the [[ObjNameTable]], the name from the Japanese column must be entered instead.&lt;br /&gt;
&lt;br /&gt;
If there are several identical objects that are part of a cutscene, you can also define a cast group id for one specific object to distinguish it from the other identical objects for the scene.&lt;br /&gt;
&lt;br /&gt;
===Time===&lt;br /&gt;
Defines the individual sequences with their names and length. They are played in the order they are in the list.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Field Name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| PartName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Name of the sequence&lt;br /&gt;
|-&lt;br /&gt;
| TotalStep&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| Duration of the sequence in frames&lt;br /&gt;
|-&lt;br /&gt;
| SuspendFlag&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| If set to 1, pauses the cutscene and resumes gameplay. The cutscene will continue from here next time it is activated.&lt;br /&gt;
|-&lt;br /&gt;
| WaitUserInputFlag&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===SubPart===&lt;br /&gt;
Runs additional subsequences in parallel during a sequence.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Field Name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| SubPartName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Name of the sub sequence&lt;br /&gt;
|-&lt;br /&gt;
| SubPartTotalStep&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| The length of the sub sequence&lt;br /&gt;
|-&lt;br /&gt;
| MainPartName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Name of the main sequence this sub sequence belongs to&lt;br /&gt;
|-&lt;br /&gt;
| MainPartStep&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| The frame of the main sequence this sub sequence starts at&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Action===&lt;br /&gt;
Picks up objects and can position them to a given GeneralPos and play an animation.&lt;br /&gt;
&lt;br /&gt;
All animation types are supported. For more control you can use [[ActorInfo#ActorInfo|ActorAnimCtrl.bcsv]] for your objects to define multiple animation names of different animation types to the animation name defined in the cutscene. &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Field Name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| PartName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Sequence Name&lt;br /&gt;
|-&lt;br /&gt;
| CastName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Name of the target object. Either Japanese name defined in [[ObjNameTable]], or &#039;&#039;ModelName&#039;&#039; defined in [[ProductMapObjDataTable]].&lt;br /&gt;
|-&lt;br /&gt;
| CastID&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| Optional Cast ID of the target object. -1 = Deactivated.&amp;lt;br&amp;gt;&lt;br /&gt;
To target a specific object among identical objects that are part of the cutscene.&lt;br /&gt;
|-&lt;br /&gt;
| ActionType&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| Pick an Action Type from the table below.&lt;br /&gt;
|-&lt;br /&gt;
| PosName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Name of the GeneralPos object for destination location&lt;br /&gt;
|-&lt;br /&gt;
| AnimName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Name of the animation, which can be loaded either from the ARC archive object or from a separate ARC archive with the additional name &amp;quot;Anim&amp;quot;.&lt;br /&gt;
|}&lt;br /&gt;
====Action Types====&lt;br /&gt;
Note that these action types are not available for any object that registers as a &amp;quot;Simple Demo Cast&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===== SMG1 =====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! ID !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Apppear || Makes the object Appear.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Kill || Makes the object Disappear (using it&#039;s Kill function).&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Special Function || Executes a function that the object specifically registered to the cutscene. This is object specific, and not every object has one.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Special Nerve || Sets the objects Nerve to a nerve specifically registered to the cutscene. This is object specific, and not every object has one.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || On SW_A || The SW_A of this object will be activated.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || On SW_B || The SW_B of this object will be activated.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || Show Model || The model of the object will be unhidden.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || Hide Model || The model of the object will be hidden.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Start NPC Message || Start a conversation with an NPC. Effectively useless because NPC&#039;s do not register their text to cutscenes unless the cutscene has a specific name.&lt;br /&gt;
|-&lt;br /&gt;
| 9 || Start NPC Message (Alt) || Start a conversation with an NPC without stopping Mario&#039;s current animation. Effectively useless because NPC&#039;s do not register their text to cutscenes unless the cutscene has a specific name.&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Duplicate of 9 || Duplicate of 9.&lt;br /&gt;
|-&lt;br /&gt;
| 11 || Play Animation || Plays the animation that &amp;quot;AnimName&amp;quot; is set to. This happens for all Action Types.&lt;br /&gt;
|-&lt;br /&gt;
| 12 || Off SW_A || The SW_A of this object will be deactivated.&lt;br /&gt;
|-&lt;br /&gt;
| 13 || Off SW_B || The SW_B of this object will be deactivated.&lt;br /&gt;
|}&lt;br /&gt;
===== SMG2 =====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! ID !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Play Animation || Plays the animation that &amp;quot;AnimName&amp;quot; is set to. This happens for all Action Types.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Apppear || Makes the object Appear.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Kill || Makes the object Disappear (using it&#039;s Kill function).&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Special Function || Executes a function that the object specifically registered to the cutscene. This is object specific, and not every object has one.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Special Nerve || Sets the objects Nerve to a nerve specifically registered to the cutscene. This is object specific, and not every object has one.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || On SW_A || The SW_A of this object will be activated.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || On SW_B || The SW_B of this object will be activated.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || Show Model || The model of the object will be unhidden.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Hide Model || The model of the object will be hidden.&lt;br /&gt;
|-&lt;br /&gt;
| 9 || Start NPC Message || Start a conversation with an NPC. Effectively useless because NPC&#039;s do not register their text to cutscenes unless the cutscene has a specific name.&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Start NPC Message (Alt) || Start a conversation with an NPC without stopping Mario&#039;s current animation. Effectively useless because NPC&#039;s do not register their text to cutscenes unless the cutscene has a specific name.&lt;br /&gt;
|-&lt;br /&gt;
| 11 || Duplicate of 10 || Duplicate of 10.&lt;br /&gt;
|-&lt;br /&gt;
| 12 || Off SW_A || The SW_A of this object will be deactivated.&lt;br /&gt;
|-&lt;br /&gt;
| 13 || Off SW_B || The SW_B of this object will be deactivated.&lt;br /&gt;
|-&lt;br /&gt;
| 14 || Request Movement Off || Tries to pause execution of this object.&lt;br /&gt;
|-&lt;br /&gt;
| 15 || Request Movement On || Tries to resume execution of this object.&lt;br /&gt;
|-&lt;br /&gt;
| 16 || StoryBookWarpDemo || Unknown. Related to StoryBookWarpDemo. Uses 1 as arg.&lt;br /&gt;
|-&lt;br /&gt;
| 17 || StoryBookWarpDemo || Unknown. Related to StoryBookWarpDemo. Uses 0 as arg.&lt;br /&gt;
|-&lt;br /&gt;
| 18 || StoryBookWarpDemo || Unknown. Related to StoryBookWarpDemo.&lt;br /&gt;
|-&lt;br /&gt;
| 19 || StoryBookWarpDemo || Unknown. Related to StoryBookWarpDemo.&lt;br /&gt;
|-&lt;br /&gt;
| 20 || ? || Unknown. Used at the end of the cutscene where Mario meets Yoshi for the first time.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Player===&lt;br /&gt;
Can position Mario/Luigi to a specific GeneralPos and play an animation.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Field Name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| PartName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Name of the sequence&lt;br /&gt;
|-&lt;br /&gt;
| PosName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Name of the GeneralPos to teleport the player to&lt;br /&gt;
|-&lt;br /&gt;
| BckName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Name of the animation from /ObjectData/MarioAnime.arc to play. (All other animationtypes than BCK are also supported)&lt;br /&gt;
|-&lt;br /&gt;
| Visible&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Camera===&lt;br /&gt;
Can play cameras, which can be played one after another. Can use either a camera code from the Map archive&#039;s [[Cameras|CameraParam.bcam]] file, or a key frame camera animation which are controlled via [[CANM]] files, which must be located in the object archive of the targeted object.&amp;lt;/br&amp;gt;&lt;br /&gt;
By default the camera is fixed on Mario/Luigi.&amp;lt;/br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For BCAM usage, the Camera ID name to be used is composed of the &#039;&#039;PartName&#039;&#039; and the &#039;&#039;Cutscenename&#039;&#039; (not the sheet name): &#039;&#039;&#039;e:&amp;lt;small&amp;gt;Cutscenename&amp;lt;/small&amp;gt;[&amp;lt;small&amp;gt;PartName&amp;lt;/small&amp;gt;]&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
For CANM usage, the name defined in &#039;&#039;AnimCameraName&#039;&#039; must match the CANM file&#039;s name and needs to be placed in the root of the targeted object&#039;s archive.&amp;lt;/br&amp;gt;&lt;br /&gt;
Seems to be supported only by certain objects. This has not yet been fully explored.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Field Name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| PartName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Name of the sequence&lt;br /&gt;
|-&lt;br /&gt;
| CameraTargetName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Japanese Name of the object the camera is focused to. (Primarily uses ObjNameTable names)&lt;br /&gt;
|-&lt;br /&gt;
| CameraTargetCastID&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| Cast ID of the object&lt;br /&gt;
|-&lt;br /&gt;
| AnimCameraName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| CANM file name (&amp;quot;.canm&amp;quot; extension optional) which must be placed in the root of the targeted object&#039;s archive.&lt;br /&gt;
|-&lt;br /&gt;
| AnimCameraStartFrame&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| The part frame to begin the camera on. -1 will have the camera interpolate to the start of the CANM&lt;br /&gt;
|-&lt;br /&gt;
| AnimCameraEndFrame&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| IsContinuous&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Sound===&lt;br /&gt;
Can change music and play sound effects.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Field Name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| PartName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Name of the sequence&lt;br /&gt;
|-&lt;br /&gt;
| Bgm&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| [[List_of_Music|Name of the music]] to play.&lt;br /&gt;
|-&lt;br /&gt;
| SystemSe&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| [[List_of_Sounds_(SMG2)|Name of the soundeffect]] to play. &lt;br /&gt;
|-&lt;br /&gt;
| ActionSe&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| ReturnBgm&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BgmWipeoutFrame&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| Duration in frames for fading out the music. -1 = No fade-out&lt;br /&gt;
|-&lt;br /&gt;
| AllSoundStopFrame&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Wipe===&lt;br /&gt;
Can perform a fade out animation.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Field Name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| PartName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Name of the sequence&lt;br /&gt;
|-&lt;br /&gt;
| WipeName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| The wipe to use. See the [[#WipeName|WipeName]] table below.&lt;br /&gt;
|-&lt;br /&gt;
| WipeType&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| The function for the Wipe to perform. See the [[#WipeType|WipeType]] table below.&lt;br /&gt;
|-&lt;br /&gt;
| WipeFrame&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| The amount of frames that the wipe will move for. Higher values = Slower movement&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====WipeName====&lt;br /&gt;
Below is a list of available WipeName values:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 円ワイプ || Circle Wipe&lt;br /&gt;
|-&lt;br /&gt;
| フェードワイプ || Black Fade&lt;br /&gt;
|-&lt;br /&gt;
| 白フェードワイプ || White Fade&lt;br /&gt;
|-&lt;br /&gt;
| ゲームオーバー || Game Over&lt;br /&gt;
|-&lt;br /&gt;
| クッパ || Bowser Face (Death wipe)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: The Mario wipe is missing because the Mario wipe is a System Wipe and not a Scene Wipe. DemoWipes can only be Scene Wipes.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====WipeType====&lt;br /&gt;
Below is the list of Wipe functions. The table below uses the Black Fade as an example.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Open Wipe (Fade to Gameplay)&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Close Wipe (Fade to Black)&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Force Open Wipe (Cut to Gameplay)&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Force Close Wipe (Cut to Black)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Tip: If you need to change wipes while the wipe is closed, use Force Close before using Open for a smoother transition.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Hardcoded Cutscene Names===&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;&#039;Todo:&#039;&#039;&#039; Finish this.&amp;lt;/small&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Cutscene Name&lt;br /&gt;
! Meaning&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| ベビチコ出会い&lt;br /&gt;
| Master Luma Meeting&lt;br /&gt;
| -Uses hardcoded cameras&amp;lt;br /&amp;gt;-Activates spin after completion when the galaxy uses the StageType &amp;quot;Storybook&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Tools==&lt;br /&gt;
Up to now, there are no tools that allow the cutscenes to be edited directly in a clear interface. Since the cutscenes sheet consists of [[BCSV]] files, they can be edited with any other BCSV editor, like Whitehole. They can also be converted to CSV files and vice versa with Pyjmap.&lt;br /&gt;
&lt;br /&gt;
The tools can be found on the [[Tools_and_Resources|tools and ressources page]].&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=944</id>
		<title>BMD/BDL (File Format)</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=944"/>
		<updated>2025-10-14T01:22:08Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: SHP1 major upgrades&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:File formats]]&lt;br /&gt;
{{WIP}}&lt;br /&gt;
&lt;br /&gt;
BMD (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;M&#039;&#039;&#039;o&#039;&#039;&#039;d&#039;&#039;&#039;el) and BDL (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;D&#039;&#039;&#039;isplay &#039;&#039;&#039;L&#039;&#039;&#039;ist) are two 3D model formats used in &#039;&#039;Super Mario Galaxy&#039;&#039; and &#039;&#039;Super Mario Galaxy 2&#039;&#039;, among a few other &#039;&#039;Wii&#039;&#039; and &#039;&#039;GameCube&#039;&#039; games, such as &#039;&#039;Super Mario Sunshine&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These two formats hold the same data, except BDL contains an additional set of data which is used for faster rendering speeds.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Super Mario Galaxy&#039;&#039; &amp;amp; &#039;&#039;Super Mario Galaxy 2&#039;&#039; contain J3DLoader versions 21 and 26.&lt;br /&gt;
&lt;br /&gt;
== File Header ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || The magic that tells the game which format this file is. (ASCII)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bmd2&#039;&#039;&#039; for BMD (J3DLoader V21)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bmd3&#039;&#039;&#039; for BMD (J3DLoader v26)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bdl4&#039;&#039;&#039; for BDL (J3DLoader v26)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int32 || The total size of the file&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || The number of chunks present in this file.&amp;lt;br/&amp;gt;&#039;&#039;&#039;8&#039;&#039;&#039; for BMD&amp;lt;br/&amp;gt;&#039;&#039;&#039;9&#039;&#039;&#039; for BDL&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Subversion Header ===&lt;br /&gt;
This part of the header is not used, and can be anything.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || A 4 character value representing the Subversion. Usually SVR3 for SMG/2.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Byte[12] || Twelve bytes of padding. Usually these are &#039;&#039;&#039;0xFF&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== INF1 - Scene Information ==&lt;br /&gt;
The &#039;&#039;&#039;Inf&#039;&#039;&#039;ormation section hosts a hierarchy of Joints, Materials, and Shapes, which are used to render the model.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;INF1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || [[#J3DLoader%20Flags|J3DLoader Flags]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Matrix Group Count&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Vertex Count&amp;lt;br/&amp;gt;Always equals the number of entries in the &amp;quot;POSITION&amp;quot; [[#Vertex%20Buffer%20Formats|data buffer]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Relative offset to the [[#Scene%20Hierarchy|Scene Hierarchy]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== J3DLoader Flags ===&lt;br /&gt;
The J3DLoader contains several flags which affect how models are handled. There are more than what are shown here, however, those must be applied by the game itself in the code.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000000 || No flags applied (TODO: Check if this defaults to basic matrix calculation)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000001 || Use Autodesk Softimage matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000010 || Use Autodesk Maya matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000100 || Use Basic matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000001000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000010000 || UseImmidiateMtx (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000100000 || UsePostTexMtx (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000001000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000010000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000100000000 || NoMatrixTransform (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000001000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000010000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000100000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0001000000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0010000000000000 || DoBdlMaterialCalc&lt;br /&gt;
|-&lt;br /&gt;
| 0b0100000000000000 || NoBdlMaterialPatch - If set, skips the call to &#039;&#039;&#039;J3DModelLoader::readPatchedMaterial&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0b1000000000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
For all BMD files, the game always includes load flags &#039;&#039;Material_PE_Full&#039;&#039;, &#039;&#039;Material_UseIndirect&#039;&#039;, &#039;&#039;UseUniqueMaterials&#039;&#039;, and &#039;&#039;UNKNOWN_21&#039;&#039;.&amp;lt;br/&amp;gt;&lt;br /&gt;
For all BDL files, the game always includes load flags &#039;&#039;Material_UseIndirect&#039;&#039;, and &#039;&#039;UseUniqueMaterials&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;gt; &#039;&#039;Note: Changing the load flags by changing the code doesn&#039;t seem to do much.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Scene Hierarchy ===&lt;br /&gt;
Each model is constructed using a Scene Hierarchy. This simply determines the order of bones (in turn, defining the parent/child relations), material assignments, and Shape assignments.&lt;br /&gt;
&lt;br /&gt;
Each node consists of the following:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt16 || Node Type.&amp;lt;br/&amp;gt;0x00 = Marks the end of the node list&amp;lt;br/&amp;gt;0x01 = Creates a new child of the previous node&amp;lt;br/&amp;gt;0x02 = Finishes the child node and returns ownership to the previous node&amp;lt;br/&amp;gt;0x10 = Joint Assignment node. &amp;quot;Data&amp;quot; holds the Joint ID (index into JNT1)&amp;lt;br/&amp;gt;0x11 = Material assignment. &amp;quot;Data&amp;quot; holds the Material ID (index into MAT3)&amp;lt;br/&amp;gt;0x12 = Shape Assignment. &amp;quot;Data&amp;quot; holds the Shape ID (index into SHP1)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt16 || A Data value. Used by some nodes to index into other chunks. Usage depends on the node type.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The node list is padded to the nearest 32.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== VTX1 - Vertex Data ==&lt;br /&gt;
The &#039;&#039;&#039;V&#039;&#039;&#039;er&#039;&#039;&#039;t&#039;&#039;&#039;e&#039;&#039;&#039;x&#039;&#039;&#039; Data section contains the actual number values used for the properties of the geometry. It also includes the information on how the values are formatted.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;VTX1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int32 || Buffer Format list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || &amp;quot;POSITION&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || &amp;quot;NORMAL&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || &amp;quot;TANGENT&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || &amp;quot;COLOR_0&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Int32 || &amp;quot;COLOR_1&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Int32 || &amp;quot;TEXCOORD_0&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Int32 || &amp;quot;TEXCOORD_1&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Int32 || &amp;quot;TEXCOORD_2&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C || Int32 || &amp;quot;TEXCOORD_3&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x30 || Int32 || &amp;quot;TEXCOORD_4&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x34 || Int32 || &amp;quot;TEXCOORD_5&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x38 || Int32 || &amp;quot;TEXCOORD_6&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C || Int32 || &amp;quot;TEXCOORD_7&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Vertex Buffer Formats ===&lt;br /&gt;
Each of the Buffers in this section have a format descriptor. This allows different types of data storage, allowing for smaller files.&lt;br /&gt;
&lt;br /&gt;
Each format descriptor contains an Attribute Target, a Component Count, a Data Type, and a Mantissa shifter (to allow floats to be stored as smaller datatypes compared to FLOAT).&amp;lt;br/&amp;gt;Only one descriptor can exist for each attribute.&lt;br /&gt;
&lt;br /&gt;
The Attribute Target tells the game what this buffer is used for.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Attribute Targets&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000009 || POSITION || This buffer represents the positions of vertices in the model. Basically required for all visual models.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000A || NORMAL || This buffer represents vertex normals, used for the engine&#039;s vertex shading. Not needed if no material requires it.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000B || COLOR_0 || This buffer is available for Vertex Colors.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000C || COLOR_1 || This buffer is available for Vertex Colors.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000D || TEXCOORD_0 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000E || TEXCOORD_1 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000F || TEXCOORD_2 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000010 || TEXCOORD_3 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000011 || TEXCOORD_4 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000012 || TEXCOORD_5 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000013 || TEXCOORD_6 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000014 || TEXCOORD_7 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000019 || TANGENT || &#039;&#039;Currently unknown exactly what goes in here.&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x000000FF || List End || A buffer using this target will end the descriptor list.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The component count tells the game how many parts of the component that there are. Note that the values are considered based on the attribute target they&#039;re assigned to.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Component Count&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || POSITION_XY || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || POSITION_XYZ || Represents a position in 3D space with 3 values: X, Y, and Z.&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || NORMAL_XYZ || Represents a normal vector in 3D space with 3 values: X, Y, and Z.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || NORMAL_NBT || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || NORMAL_NBT3 || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || COLOR_RGB || Represents a color value with only Red, Green, and Blue values.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || COLOR_RGBA || Represents a color value with Red, Green, Blue, and Alpha values.&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || TEXCOORD_S || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || TEXCOORD_ST || Represents a UV texture coordinate with 2 values: X and Y.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Data Type tells the game how many bytes each value is, in the sense that an Int32 is 4 bytes, a Int16 is 2 bytes, a Float is 4 bytes, etc.&amp;lt;br/&amp;gt;Note that the Color values have a different set of options.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Data Types&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || UInt8 || 1 byte per value (0 to 255)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || Int8 || 1 byte per value (-128 to 127)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || UInt16 || 2 bytes per value (0 to 65535)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || Int16 || 2 bytes per value (-32,768 to 32,767)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || Float || 4 bytes per value&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || RGB565 || 2 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || RGB8 || 3 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || RGBX8 || 3 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || RGBA4 || 2 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || RGBA6 || 4 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000005 || RGBA8 || 4 bytes per color&lt;br /&gt;
|}&lt;br /&gt;
&amp;gt; &#039;&#039;Note: Both games require colors to be 4 bytes wide at all times, so changing from RGBA8 is worthless.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== EVP1 - Skinning Envelopes ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;EVP1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Envelopes stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || &amp;quot;Joint Count&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || &amp;quot;&#039;Joint Count&#039; list index&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || &amp;quot;Joint Weight&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || &amp;quot;Inverse Bind Matrices&amp;quot; list offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== DRW1 - Skinning Assignments ==&lt;br /&gt;
&lt;br /&gt;
== JNT1 - Joint Hierarchy ==&lt;br /&gt;
The &#039;&#039;&#039;J&#039;&#039;&#039;oi&#039;&#039;&#039;nt&#039;&#039;&#039; Hierarchy section defines the rigging skeleton of a model. There can only be one skeleton per model.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;JNT1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Joints stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Joint Data table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Remap table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Name table offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Joint Data ===&lt;br /&gt;
Each joint includes positional data and a bounding box which is used by the game for determining rendering range automatically.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int16 || Matrix Type&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || UInt8 || Parent Scale inheritance&amp;lt;br/&amp;gt;0 = Follow parent joint&#039;s scale&amp;lt;br/&amp;gt;1 = Ignore parent joint&#039;s scale&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt8 || Padding (0xFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Float || Scale X&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Float || Scale Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Float || Scale Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int16 || Rotation X&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || Int16 || Rotation Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int16 || Rotation Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x16 || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Float || Translation X&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Float || Translation Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Float || Translation Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Float || Bounding Sphere&amp;lt;br/&amp;gt;Should encapsulate all vertices that the joint affects&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Float || Bounding Box Minimum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C || Float || Bounding Box Minimum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x30 || Float || Bounding Box Minimum Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x34 || Float || Bounding Box Maximum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x38 || Float || Bounding Box Maximum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C || Float || Bounding Box Maximum Z&lt;br /&gt;
|}&lt;br /&gt;
Rotation is stored between -0x7FFF and 0x7FFF, which ranges -180 degrees and 180 degrees.&lt;br /&gt;
&lt;br /&gt;
== SHP1 - Shape Information==&lt;br /&gt;
The &#039;&#039;&#039;Sh&#039;&#039;&#039;a&#039;&#039;&#039;p&#039;&#039;&#039;e Information section determines how to use the data in the [[#VTX1_-_Vertex_Data|VTX1]] section to create shapes.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;SHP1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Shapes stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Shape Init Data offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Remap table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Name table offset&amp;lt;br/&amp;gt;(Generally not used, and thus set to 0)&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || Vertex Index Attribute table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Int32 || Weight Index table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Int32 || Primitive Data offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Int32 || Matrix Group Data offset (entry count must equal the entry count of the GXDisplayList group table)&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Int32 || Matrix Group Definition table offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Shape Data ===&lt;br /&gt;
Each shape denotes a Matrix Calculation type, which is used for Billboarding, as well as multi-joint skinning.&amp;lt;br/&amp;gt;A shape also hosts a collection of Matrix Groups. If the geometry needs to be weighted to more than 10 [[#DRW1_-_Skinning_Assignments|DRW1]] matrices, more than one Matrix Group is needed.&amp;lt;br/&amp;gt;A single Matrix Group can have multiple Primitives in it, but these Primitives must share the same set of [[#DRW1_-_Skinning_Assignments|DRW1]] matrices.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;TODO: Figure out what happens in the event that more than 10 are needed (such as one vertex being weighted to 11 bones). Is it just straight up not allowed?&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt8 || Matrix Type&lt;br /&gt;
&lt;br /&gt;
* 0 = Single Joint&lt;br /&gt;
&lt;br /&gt;
* 1 = Billboard Joint&lt;br /&gt;
&lt;br /&gt;
* 2 = Billboard Joint (Y axis only)&lt;br /&gt;
&lt;br /&gt;
* 3 = Multiple Joints&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || UInt8 || Padding (0xFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Int16 || Matrix Group count&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int16 || Vertex Index Attribute offset&amp;lt;br/&amp;gt;Relative to the Vertex Index Attribute Table offset defined in SHP1&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Int16 || Matrix Group Data index&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || First Matrix Group Definition index&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Float || Bounding Sphere&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Float || Bounding Box Minimum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Float || Bounding Box Minimum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Float || Bounding Box Minimum Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Float || Bounding Box Maximum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Float || Bounding Box Maximum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Float || Bounding Box Maximum Z&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Vertex Index Attribute Table ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int32 || An [[#Index%20Buffer%20Formats|index buffer]] attribute target&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || An [[#Index%20Buffer%20Formats|index buffer]] type&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Index Buffer Formats ====&lt;br /&gt;
Each of the Buffers in this section have a format descriptor. This allows different types of data storage, allowing for smaller files.&lt;br /&gt;
&lt;br /&gt;
These attributes line up with either a direct value that is stored in the shape, or an index into a [[#VTX1_-_Vertex_Data|VTX1]] [[#Vertex%20Buffer%20Formats|data buffer]].&amp;lt;br/&amp;gt;Only one indexer can exist for each attribute.&lt;br /&gt;
&lt;br /&gt;
The Attribute Target tells the game what this index buffer is used for.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Attribute Targets&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || POSITION_MATRIX || This is a direct list of indices into the Matrix Group&#039;s Weight collection. Required for Shapes that use Multiple Joint skinning.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || TEXTURE_0_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || TEXTURE_1_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || TEXTURE_2_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || TEXTURE_3_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000005 || TEXTURE_4_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000006 || TEXTURE_5_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000007 || TEXTURE_6_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000008 || TEXTURE_7_MATRIX || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000009 || POSITION || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;POSITION&amp;quot; buffer. Required.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000A || NORMAL || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;NORMAL&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000B || COLOR_0 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;COLOR_0&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000C || COLOR_1 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;COLOR_1&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000D || TEXCOORD_0 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_0&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000E || TEXCOORD_1 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_1&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000F || TEXCOORD_2 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_2&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000010 || TEXCOORD_3 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_3&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000011 || TEXCOORD_4 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_4&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000012 || TEXCOORD_5 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_5&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000013 || TEXCOORD_6 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_6&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000014 || TEXCOORD_7 || This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TEXCOORD_7&amp;quot; buffer&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000019 || TANGENT || &#039;&#039;This indexes into the [[#VTX1_-_Vertex_Data|VTX1]] &amp;quot;TANGENT&amp;quot; buffer, but we don&#039;t yet know what that buffer does.&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x000000FF || List End || A buffer using this target will end the descriptor list.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Data Type of an Index Buffer determines the size of each Index. Direct Buffers can only be 1 byte per value.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Data Types&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || None || Only used for the List End&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || Direct || 1 byte per value. Only used for data that is not stored within [[#VTX1_-_Vertex_Data|VTX1]]&amp;lt;br/&amp;gt;Needs to be divided by 3 for some reason...&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || UInt8 || 1 byte per value (0 to 255). Indexes a buffer in [[#VTX1_-_Vertex_Data|VTX1]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || UInt16 || 2 bytes per value (0 to 65535). Indexes a buffer in [[#VTX1_-_Vertex_Data|VTX1]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Primitive Data ===&lt;br /&gt;
This chunk contains raw primitives. These are what hold the index buffers.&amp;lt;br/&amp;gt;The Index Buffers are ordered the same way the Index Buffer Attributes are ordered. For example, POSITION (UInt16), NORMAL (UInt16), COLOR_0 (UInt8), TEXCOORD_0 (UInt16), would result in the following byte structure: &#039;&#039;&#039;PPPP NNNN C0 TXC0&#039;&#039;&#039;&amp;lt;br/&amp;gt;This repeats for each vertex in the primitive.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Uint8 || Primitive Type&lt;br /&gt;
&lt;br /&gt;
* 0x80 = Individual Quads&lt;br /&gt;
&lt;br /&gt;
* 0x90 = Individual Triangles&lt;br /&gt;
&lt;br /&gt;
* 0x98 = Triangle Strip&lt;br /&gt;
&lt;br /&gt;
* 0xA0 = Triangle Fan&lt;br /&gt;
&lt;br /&gt;
* 0xA8 = Individual Lines&lt;br /&gt;
&lt;br /&gt;
* 0xB0 = Line Strip&lt;br /&gt;
&lt;br /&gt;
* 0xB8 = Individual Points&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;TODO: Figure out if Quads, Lines, Line Strips, and Points work.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;small&amp;gt;TODO: Figure out if &amp;quot;Quad Strips&amp;quot; exist at 0x88.&amp;lt;/small&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int16 || Vertex Count&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Matrix Group Definition Table ===&lt;br /&gt;
This table defines a list of Matrix Groups for each Shape. A Shape can have multiple Matrix Groups, but only stores the index of the first one. This means that all the Matrix Groups for a given Shape must come directly one after another.&amp;lt;br/&amp;gt;It contains only two values: The size of all Primitive Data within this group, and an offset to the first Primitive (relative to the Primitive Data offset defined in SHP1).&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int32 || Primitive Data size&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || First Primitive offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Matrix Group Data Table ===&lt;br /&gt;
This table contains definitions of sub-segments inside the Weight Index Table. How these values are used differs based on the shape matrix calculation type, but official files generally set both usages up correctly regardless.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int16 || [[#DRW1_-_Skinning_Assignments|DRW1]] Matrix ID&amp;lt;br/&amp;gt;This is only used with Single Joint shape matrix calculation.&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Int16 || Matrix Count&amp;lt;br/&amp;gt;This is only used with Multiple Joint shape matrix calculation.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || Starting Weight Index&amp;lt;br/&amp;gt;This is only used with Multiple Joint shape matrix calculation.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Weight Index Table ===&lt;br /&gt;
This table contains several indices into [[#DRW1_-_Skinning_Assignments|DRW1]].&amp;lt;br/&amp;gt;Each index is a Signed 16 value.&amp;lt;br/&amp;gt;The values may also contain 0xFFFF, which indicates that the last used index should be used instead.&amp;lt;br/&amp;gt;Matrix Groups can select a segment of these indices (up to 10) for use. A Matrix Group must not start with 0xFFFF.&lt;br /&gt;
&lt;br /&gt;
== MAT2 - Material List (Old) ==&lt;br /&gt;
Technically supported by the game, but not known to be used by any model.&lt;br /&gt;
&lt;br /&gt;
== MAT3 - Material List ==&lt;br /&gt;
&lt;br /&gt;
== MDL3 - Display List ==&lt;br /&gt;
&lt;br /&gt;
== TEX1 - Texture Data ==&lt;br /&gt;
The &#039;&#039;&#039;Tex&#039;&#039;&#039;ture Information section holds several embedded [[BTI_(File_Format)|BTI]] files that [[#MAT3_-_Material_List|MAT3]] can reference by index for texture assignment.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;TEX1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of [[BTI_(File_Format)|BTI]] files stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || [[BTI_(File_Format)|BTI]] Header Table Offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Name table offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The texture data locations are defined by the [[BTI_(File_Format)|BTI]] headers (which themselves are located directly one after another at the Header Table)&amp;lt;br/&amp;gt;&lt;br /&gt;
This structure allows multiple textures that have the same visual data to have their headers point to just one block of visual data. In other words, two identical textures can be &amp;quot;compressed&amp;quot; into one while still having their own properties (wrapping, filtering, etc.)&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=943</id>
		<title>BMD/BDL (File Format)</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=943"/>
		<updated>2025-10-13T16:34:11Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: Add TEX1 data&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:File formats]]&lt;br /&gt;
{{WIP}}&lt;br /&gt;
&lt;br /&gt;
BMD (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;M&#039;&#039;&#039;o&#039;&#039;&#039;d&#039;&#039;&#039;el) and BDL (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;D&#039;&#039;&#039;isplay &#039;&#039;&#039;L&#039;&#039;&#039;ist) are two 3D model formats used in &#039;&#039;Super Mario Galaxy&#039;&#039; and &#039;&#039;Super Mario Galaxy 2&#039;&#039;, among a few other &#039;&#039;Wii&#039;&#039; and &#039;&#039;GameCube&#039;&#039; games, such as &#039;&#039;Super Mario Sunshine&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These two formats hold the same data, except BDL contains an additional set of data which is used for faster rendering speeds.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Super Mario Galaxy&#039;&#039; &amp;amp; &#039;&#039;Super Mario Galaxy 2&#039;&#039; contain J3DLoader versions 21 and 26.&lt;br /&gt;
&lt;br /&gt;
== File Header ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || The magic that tells the game which format this file is. (ASCII)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bmd2&#039;&#039;&#039; for BMD (J3DLoader V21)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bmd3&#039;&#039;&#039; for BMD (J3DLoader v26)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bdl4&#039;&#039;&#039; for BDL (J3DLoader v26)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int32 || The total size of the file&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || The number of chunks present in this file.&amp;lt;br/&amp;gt;&#039;&#039;&#039;8&#039;&#039;&#039; for BMD&amp;lt;br/&amp;gt;&#039;&#039;&#039;9&#039;&#039;&#039; for BDL&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Subversion Header ===&lt;br /&gt;
This part of the header is not used, and can be anything.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || A 4 character value representing the Subversion. Usually SVR3 for SMG/2.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Byte[12] || Twelve bytes of padding. Usually these are &#039;&#039;&#039;0xFF&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== INF1 - Scene Information ==&lt;br /&gt;
The &#039;&#039;&#039;Inf&#039;&#039;&#039;ormation section hosts a hierarchy of Joints, Materials, and Shapes, which are used to render the model.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;INF1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || [[#J3DLoader%20Flags|J3DLoader Flags]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Matrix Group Count&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Vertex Count&amp;lt;br/&amp;gt;Always equals the number of entries in the &amp;quot;POSITION&amp;quot; [[#Buffer%20Formats|data buffer]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Relative offset to the [[#Scene%20Hierarchy|Scene Hierarchy]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== J3DLoader Flags ===&lt;br /&gt;
The J3DLoader contains several flags which affect how models are handled. There are more than what are shown here, however, those must be applied by the game itself in the code.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000000 || No flags applied (TODO: Check if this defaults to basic matrix calculation)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000001 || Use Autodesk Softimage matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000010 || Use Autodesk Maya matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000100 || Use Basic matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000001000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000010000 || UseImmidiateMtx (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000100000 || UsePostTexMtx (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000001000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000010000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000100000000 || NoMatrixTransform (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000001000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000010000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000100000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0001000000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0010000000000000 || DoBdlMaterialCalc&lt;br /&gt;
|-&lt;br /&gt;
| 0b0100000000000000 || NoBdlMaterialPatch - If set, skips the call to &#039;&#039;&#039;J3DModelLoader::readPatchedMaterial&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0b1000000000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
For all BMD files, the game always includes load flags &#039;&#039;Material_PE_Full&#039;&#039;, &#039;&#039;Material_UseIndirect&#039;&#039;, &#039;&#039;UseUniqueMaterials&#039;&#039;, and &#039;&#039;UNKNOWN_21&#039;&#039;.&amp;lt;br/&amp;gt;&lt;br /&gt;
For all BDL files, the game always includes load flags &#039;&#039;Material_UseIndirect&#039;&#039;, and &#039;&#039;UseUniqueMaterials&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;gt; &#039;&#039;Note: Changing the load flags by changing the code doesn&#039;t seem to do much.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Scene Hierarchy ===&lt;br /&gt;
Each model is constructed using a Scene Hierarchy. This simply determines the order of bones (in turn, defining the parent/child relations), material assignments, and Shape assignments.&lt;br /&gt;
&lt;br /&gt;
Each node consists of the following:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt16 || Node Type.&amp;lt;br/&amp;gt;0x00 = Marks the end of the node list&amp;lt;br/&amp;gt;0x01 = Creates a new child of the previous node&amp;lt;br/&amp;gt;0x02 = Finishes the child node and returns ownership to the previous node&amp;lt;br/&amp;gt;0x10 = Joint Assignment node. &amp;quot;Data&amp;quot; holds the Joint ID (index into JNT1)&amp;lt;br/&amp;gt;0x11 = Material assignment. &amp;quot;Data&amp;quot; holds the Material ID (index into MAT3)&amp;lt;br/&amp;gt;0x12 = Shape Assignment. &amp;quot;Data&amp;quot; holds the Shape ID (index into SHP1)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt16 || A Data value. Used by some nodes to index into other chunks. Usage depends on the node type.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The node list is padded to the nearest 32.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== VTX1 - Vertex Data ==&lt;br /&gt;
The &#039;&#039;&#039;V&#039;&#039;&#039;er&#039;&#039;&#039;t&#039;&#039;&#039;e&#039;&#039;&#039;x&#039;&#039;&#039; Data section contains the actual number values used for the properties of the geometry. It also includes the information on how the values are formatted.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;VTX1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int32 || Buffer Format list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || &amp;quot;POSITION&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || &amp;quot;NORMAL&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || &amp;quot;TANGENT&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || &amp;quot;COLOR_0&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Int32 || &amp;quot;COLOR_1&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Int32 || &amp;quot;TEXCOORD_0&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Int32 || &amp;quot;TEXCOORD_1&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Int32 || &amp;quot;TEXCOORD_2&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C || Int32 || &amp;quot;TEXCOORD_3&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x30 || Int32 || &amp;quot;TEXCOORD_4&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x34 || Int32 || &amp;quot;TEXCOORD_5&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x38 || Int32 || &amp;quot;TEXCOORD_6&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C || Int32 || &amp;quot;TEXCOORD_7&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Buffer Formats ===&lt;br /&gt;
Each of the Buffers in this section have a format descriptor. This allows different types of data storage, allowing for smaller files.&lt;br /&gt;
&lt;br /&gt;
Each format descriptor contains an Attribute Target, a Component Count, a Data Type, and a Mantissa shifter (to allow floats to be stored as smaller datatypes compared to FLOAT).&amp;lt;br/&amp;gt;Only one descriptor can exist for each attribute.&lt;br /&gt;
&lt;br /&gt;
The Attribute Target tells the game what this buffer is used for.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Attribute Targets&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000009 || POSITION || This buffer represents the positions of vertices in the model. Basically required for all visual models.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000A || NORMAL || This buffer represents vertex normals, used for the engine&#039;s vertex shading. Not needed if no material requires it.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000B || COLOR_0 || This buffer is available for Vertex Colors.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000C || COLOR_1 || This buffer is available for Vertex Colors.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000D || TEXCOORD_0 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000E || TEXCOORD_1 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000F || TEXCOORD_2 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000010 || TEXCOORD_3 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000011 || TEXCOORD_4 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000012 || TEXCOORD_5 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000013 || TEXCOORD_6 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000014 || TEXCOORD_7 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000019 || TANGENT || &#039;&#039;Currently unknown exactly what goes in here.&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x000000FF || List End || A buffer using this target will end the descriptor list.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The component count tells the game how many parts of the component that there are. Note that the values are considered based on the attribute target they&#039;re assigned to.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Component Count&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || POSITION_XY || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || POSITION_XYZ || Represents a position in 3D space with 3 values: X, Y, and Z.&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || NORMAL_XYZ || Represents a normal vector in 3D space with 3 values: X, Y, and Z.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || NORMAL_NBT || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || NORMAL_NBT3 || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || COLOR_RGB || Represents a color value with only Red, Green, and Blue values.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || COLOR_RGBA || Represents a color value with Red, Green, Blue, and Alpha values.&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || TEXCOORD_S || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || TEXCOORD_ST || Represents a UV texture coordinate with 2 values: X and Y.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Data Type tells the game how many bytes each value is, in the sense that an Int32 is 4 bytes, a Int16 is 2 bytes, a Float is 4 bytes, etc.&amp;lt;br/&amp;gt;Note that the Color values have a different set of options.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Data Types&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || UInt8 || 1 byte per value (0 to 255)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || Int8 || 1 byte per value (-128 to 127)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || UInt16 || 2 bytes per value (0 to 65535)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || Int16 || 2 bytes per value (-32,768 to 32,767)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || Float || 4 bytes per value&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || RGB565 || 2 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || RGB8 || 3 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || RGBX8 || 3 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || RGBA4 || 2 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || RGBA6 || 4 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000005 || RGBA8 || 4 bytes per color&lt;br /&gt;
|}&lt;br /&gt;
&amp;gt; &#039;&#039;Note: Both games require colors to be 4 bytes wide at all times, so changing from RGBA8 is worthless.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== EVP1 - Skinning Envelopes ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;EVP1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Envelopes stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || &amp;quot;Joint Count&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || &amp;quot;&#039;Joint Count&#039; list index&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || &amp;quot;Joint Weight&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || &amp;quot;Inverse Bind Matrices&amp;quot; list offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== DRW1 - Skinning Assignments ==&lt;br /&gt;
&lt;br /&gt;
== JNT1 - Joint Hierarchy ==&lt;br /&gt;
The &#039;&#039;&#039;J&#039;&#039;&#039;oi&#039;&#039;&#039;nt&#039;&#039;&#039; Hierarchy section defines the rigging skeleton of a model. There can only be one skeleton per model.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;JNT1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Joints stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Joint Data table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Remap table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Name table offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Joint Data ===&lt;br /&gt;
Each joint includes positional data and a bounding box which is used by the game for determining rendering range automatically.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int16 || Matrix Type&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || UInt8 || Parent Scale inheritance&amp;lt;br/&amp;gt;0 = Follow parent joint&#039;s scale&amp;lt;br/&amp;gt;1 = Ignore parent joint&#039;s scale&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt8 || Padding (0xFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Float || Scale X&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Float || Scale Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Float || Scale Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int16 || Rotation X&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || Int16 || Rotation Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int16 || Rotation Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x16 || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Float || Translation X&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Float || Translation Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Float || Translation Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Float || Bounding Sphere&amp;lt;br/&amp;gt;Should encapsulate all vertices that the joint affects&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Float || Bounding Box Minimum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C || Float || Bounding Box Minimum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x30 || Float || Bounding Box Minimum Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x34 || Float || Bounding Box Maximum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x38 || Float || Bounding Box Maximum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C || Float || Bounding Box Maximum Z&lt;br /&gt;
|}&lt;br /&gt;
Rotation is stored between -0x7FFF and 0x7FFF, which ranges -180 degrees and 180 degrees.&lt;br /&gt;
&lt;br /&gt;
== SHP1 - Shape Information==&lt;br /&gt;
The &#039;&#039;&#039;Sh&#039;&#039;&#039;a&#039;&#039;&#039;p&#039;&#039;&#039;e Information section determines how to use the data in the [[#VTX1_-_Vertex_Data|VTX1]] section to create shapes.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;SHP1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Shapes stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Shape Data table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Remap table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Name table offset&amp;lt;br/&amp;gt;(Generally not used, and thus set to 0)&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || &amp;quot;Vertex Attribute table&amp;quot; offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Int32 || &amp;quot;Weight Matrix data table&amp;quot; offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Int32 || &amp;quot;GXDisplayList data buffer&amp;quot; offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Int32 || &amp;quot;Weight Matrix group table&amp;quot; offset (entry count must equal the entry count of the GXDisplayList group table)&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Int32 || &amp;quot;GXDisplayList group table&amp;quot; offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Shape Data ===&lt;br /&gt;
Each shape denotes a Matrix Calculation type, which is used for Billboarding, as well as multi-joint skinning.&amp;lt;br/&amp;gt;A shape also contains a group of GXDisplayList primitives, and can have multiple groups if the geometry needs to be weighted to more than 10 [[#DRW1_-_Skinning_Assignments|DRW1]] matrices.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;TODO: Figure out what happens in the event that more than 10 are needed. Is it just straight up not allowed?&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt8 || Matrix Type&lt;br /&gt;
&lt;br /&gt;
* 0 = Single Joint&lt;br /&gt;
&lt;br /&gt;
* 1 = Billboard Joint&lt;br /&gt;
&lt;br /&gt;
* 2 = Billboard Joint (Y axis only)&lt;br /&gt;
&lt;br /&gt;
* 3 = Multiple Joints&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || UInt8 || Padding (0xFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Int16 || &amp;quot;GXDisplayList group&amp;quot; count&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int16 || Vertex Attribute offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Int16 || First &amp;quot;Weight Matrix group table&amp;quot; index&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || First &amp;quot;GXDisplayList group&amp;quot; index&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Float || Bounding Sphere&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Float || Bounding Box Minimum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Float || Bounding Box Minimum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Float || Bounding Box Minimum Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Float || Bounding Box Maximum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Float || Bounding Box Maximum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Float || Bounding Box Maximum Z&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== MAT2 - Material List (Old) ==&lt;br /&gt;
Technically supported by the game, but not known to be used by any model.&lt;br /&gt;
&lt;br /&gt;
== MAT3 - Material List ==&lt;br /&gt;
&lt;br /&gt;
== MDL3 - Display List ==&lt;br /&gt;
&lt;br /&gt;
== TEX1 - Texture Data ==&lt;br /&gt;
The &#039;&#039;&#039;Tex&#039;&#039;&#039;ture Information section holds several embedded [[BTI_(File_Format)|BTI]] files that [[#MAT3_-_Material_List|MAT3]] can reference by index for texture assignment.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;TEX1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of [[BTI_(File_Format)|BTI]] files stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || [[BTI_(File_Format)|BTI]] Header Table Offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Name table offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The texture data locations are defined by the [[BTI_(File_Format)|BTI]] headers (which themselves are located directly one after another at the Header Table)&amp;lt;br/&amp;gt;&lt;br /&gt;
This structure allows multiple textures that have the same visual data to have their headers point to just one block of visual data. In other words, two identical textures can be &amp;quot;compressed&amp;quot; into one while still having their own properties (wrapping, filtering, etc.)&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=941</id>
		<title>BMD/BDL (File Format)</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=941"/>
		<updated>2025-09-27T00:30:32Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: /* Shape Data */ Added the Matrix Types&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:File formats]]&lt;br /&gt;
{{WIP}}&lt;br /&gt;
&lt;br /&gt;
BMD (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;M&#039;&#039;&#039;o&#039;&#039;&#039;d&#039;&#039;&#039;el) and BDL (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;D&#039;&#039;&#039;isplay &#039;&#039;&#039;L&#039;&#039;&#039;ist) are two 3D model formats used in &#039;&#039;Super Mario Galaxy&#039;&#039; and &#039;&#039;Super Mario Galaxy 2&#039;&#039;, among a few other &#039;&#039;Wii&#039;&#039; and &#039;&#039;GameCube&#039;&#039; games, such as &#039;&#039;Super Mario Sunshine&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These two formats hold the same data, except BDL contains an additional set of data which is used for faster rendering speeds.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Super Mario Galaxy&#039;&#039; &amp;amp; &#039;&#039;Super Mario Galaxy 2&#039;&#039; contain J3DLoader versions 21 and 26.&lt;br /&gt;
&lt;br /&gt;
== File Header ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || The magic that tells the game which format this file is. (ASCII)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bmd2&#039;&#039;&#039; for BMD (J3DLoader V21)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bmd3&#039;&#039;&#039; for BMD (J3DLoader v26)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bdl4&#039;&#039;&#039; for BDL (J3DLoader v26)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int32 || The total size of the file&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || The number of chunks present in this file.&amp;lt;br/&amp;gt;&#039;&#039;&#039;8&#039;&#039;&#039; for BMD&amp;lt;br/&amp;gt;&#039;&#039;&#039;9&#039;&#039;&#039; for BDL&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Subversion Header ===&lt;br /&gt;
This part of the header is not used, and can be anything.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || A 4 character value representing the Subversion. Usually SVR3 for SMG/2.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Byte[12] || Twelve bytes of padding. Usually these are &#039;&#039;&#039;0xFF&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== INF1 - Scene Information ==&lt;br /&gt;
The &#039;&#039;&#039;Inf&#039;&#039;&#039;ormation section hosts a hierarchy of Joints, Materials, and Shapes, which are used to render the model.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;INF1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || [[#J3DLoader%20Flags|J3DLoader Flags]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Matrix Group Count&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Vertex Count&amp;lt;br/&amp;gt;Always equals the number of entries in the &amp;quot;POSITION&amp;quot; [[#Buffer%20Formats|data buffer]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Relative offset to the [[#Scene%20Hierarchy|Scene Hierarchy]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== J3DLoader Flags ===&lt;br /&gt;
The J3DLoader contains several flags which affect how models are handled. There are more than what are shown here, however, those must be applied by the game itself in the code.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000000 || No flags applied (TODO: Check if this defaults to basic matrix calculation)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000001 || Use Autodesk Softimage matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000010 || Use Autodesk Maya matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000100 || Use Basic matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000001000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000010000 || UseImmidiateMtx (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000100000 || UsePostTexMtx (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000001000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000010000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000100000000 || NoMatrixTransform (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000001000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000010000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000100000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0001000000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0010000000000000 || DoBdlMaterialCalc&lt;br /&gt;
|-&lt;br /&gt;
| 0b0100000000000000 || NoBdlMaterialPatch - If set, skips the call to &#039;&#039;&#039;J3DModelLoader::readPatchedMaterial&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0b1000000000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
For all BMD files, the game always includes load flags &#039;&#039;Material_PE_Full&#039;&#039;, &#039;&#039;Material_UseIndirect&#039;&#039;, &#039;&#039;UseUniqueMaterials&#039;&#039;, and &#039;&#039;UNKNOWN_21&#039;&#039;.&amp;lt;br/&amp;gt;&lt;br /&gt;
For all BDL files, the game always includes load flags &#039;&#039;Material_UseIndirect&#039;&#039;, and &#039;&#039;UseUniqueMaterials&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;gt; &#039;&#039;Note: Changing the load flags by changing the code doesn&#039;t seem to do much.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Scene Hierarchy ===&lt;br /&gt;
Each model is constructed using a Scene Hierarchy. This simply determines the order of bones (in turn, defining the parent/child relations), material assignments, and Shape assignments.&lt;br /&gt;
&lt;br /&gt;
Each node consists of the following:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt16 || Node Type.&amp;lt;br/&amp;gt;0x00 = Marks the end of the node list&amp;lt;br/&amp;gt;0x01 = Creates a new child of the previous node&amp;lt;br/&amp;gt;0x02 = Finishes the child node and returns ownership to the previous node&amp;lt;br/&amp;gt;0x10 = Joint Assignment node. &amp;quot;Data&amp;quot; holds the Joint ID (index into JNT1)&amp;lt;br/&amp;gt;0x11 = Material assignment. &amp;quot;Data&amp;quot; holds the Material ID (index into MAT3)&amp;lt;br/&amp;gt;0x12 = Shape Assignment. &amp;quot;Data&amp;quot; holds the Shape ID (index into SHP1)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt16 || A Data value. Used by some nodes to index into other chunks. Usage depends on the node type.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The node list is padded to the nearest 32.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== VTX1 - Vertex Data ==&lt;br /&gt;
The &#039;&#039;&#039;V&#039;&#039;&#039;er&#039;&#039;&#039;t&#039;&#039;&#039;e&#039;&#039;&#039;x&#039;&#039;&#039; Data section contains the actual number values used for the properties of the geometry. It also includes the information on how the values are formatted.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;VTX1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int32 || Buffer Format list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || &amp;quot;POSITION&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || &amp;quot;NORMAL&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || &amp;quot;TANGENT&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || &amp;quot;COLOR_0&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Int32 || &amp;quot;COLOR_1&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Int32 || &amp;quot;TEXCOORD_0&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Int32 || &amp;quot;TEXCOORD_1&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Int32 || &amp;quot;TEXCOORD_2&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C || Int32 || &amp;quot;TEXCOORD_3&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x30 || Int32 || &amp;quot;TEXCOORD_4&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x34 || Int32 || &amp;quot;TEXCOORD_5&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x38 || Int32 || &amp;quot;TEXCOORD_6&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C || Int32 || &amp;quot;TEXCOORD_7&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Buffer Formats ===&lt;br /&gt;
Each of the Buffers in this section have a format descriptor. This allows different types of data storage, allowing for smaller files.&lt;br /&gt;
&lt;br /&gt;
Each format descriptor contains an Attribute Target, a Component Count, a Data Type, and a Mantissa shifter (to allow floats to be stored as smaller datatypes compared to FLOAT).&amp;lt;br/&amp;gt;Only one descriptor can exist for each attribute.&lt;br /&gt;
&lt;br /&gt;
The Attribute Target tells the game what this buffer is used for.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Attribute Targets&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000009 || POSITION || This buffer represents the positions of vertices in the model. Basically required for all visual models.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000A || NORMAL || This buffer represents vertex normals, used for the engine&#039;s vertex shading. Not needed if no material requires it.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000B || COLOR_0 || This buffer is available for Vertex Colors.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000C || COLOR_1 || This buffer is available for Vertex Colors.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000D || TEXCOORD_0 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000E || TEXCOORD_1 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000F || TEXCOORD_2 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000010 || TEXCOORD_3 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000011 || TEXCOORD_4 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000012 || TEXCOORD_5 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000013 || TEXCOORD_6 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000014 || TEXCOORD_7 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000019 || TANGENT || &#039;&#039;Currently unknown exactly what goes in here.&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x000000FF || List End || A buffer using this target will end the descriptor list.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The component count tells the game how many parts of the component that there are. Note that the values are considered based on the attribute target they&#039;re assigned to.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Component Count&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || POSITION_XY || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || POSITION_XYZ || Represents a position in 3D space with 3 values: X, Y, and Z.&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || NORMAL_XYZ || Represents a normal vector in 3D space with 3 values: X, Y, and Z.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || NORMAL_NBT || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || NORMAL_NBT3 || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || COLOR_RGB || Represents a color value with only Red, Green, and Blue values.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || COLOR_RGBA || Represents a color value with Red, Green, Blue, and Alpha values.&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || TEXCOORD_S || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || TEXCOORD_ST || Represents a UV texture coordinate with 2 values: X and Y.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Data Type tells the game how many bytes each value is, in the sense that an Int32 is 4 bytes, a Int16 is 2 bytes, a Float is 4 bytes, etc.&amp;lt;br/&amp;gt;Note that the Color values have a different set of options.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Data Types&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || UInt8 || 1 byte per value (0 to 255)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || Int8 || 1 byte per value (-128 to 127)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || UInt16 || 2 bytes per value (0 to 65535)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || Int16 || 2 bytes per value (-32,768 to 32,767)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || Float || 4 bytes per value&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || RGB565 || 2 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || RGB8 || 3 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || RGBX8 || 3 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || RGBA4 || 2 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || RGBA6 || 4 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000005 || RGBA8 || 4 bytes per color&lt;br /&gt;
|}&lt;br /&gt;
&amp;gt; &#039;&#039;Note: Both games require colors to be 4 bytes wide at all times, so changing from RGBA8 is worthless.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== EVP1 - Skinning Envelopes ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;EVP1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Envelopes stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || &amp;quot;Joint Count&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || &amp;quot;&#039;Joint Count&#039; list index&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || &amp;quot;Joint Weight&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || &amp;quot;Inverse Bind Matrices&amp;quot; list offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== DRW1 - Skinning Assignments ==&lt;br /&gt;
&lt;br /&gt;
== JNT1 - Joint Hierarchy ==&lt;br /&gt;
The &#039;&#039;&#039;J&#039;&#039;&#039;oi&#039;&#039;&#039;nt&#039;&#039;&#039; Hierarchy section defines the rigging skeleton of a model. There can only be one skeleton per model.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;JNT1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Joints stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Joint Data table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Remap table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Name table offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Joint Data ===&lt;br /&gt;
Each joint includes positional data and a bounding box which is used by the game for determining rendering range automatically.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int16 || Matrix Type&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || UInt8 || Parent Scale inheritance&amp;lt;br/&amp;gt;0 = Follow parent joint&#039;s scale&amp;lt;br/&amp;gt;1 = Ignore parent joint&#039;s scale&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt8 || Padding (0xFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Float || Scale X&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Float || Scale Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Float || Scale Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int16 || Rotation X&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || Int16 || Rotation Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int16 || Rotation Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x16 || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Float || Translation X&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Float || Translation Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Float || Translation Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Float || Bounding Sphere&amp;lt;br/&amp;gt;Should encapsulate all vertices that the joint affects&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Float || Bounding Box Minimum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C || Float || Bounding Box Minimum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x30 || Float || Bounding Box Minimum Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x34 || Float || Bounding Box Maximum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x38 || Float || Bounding Box Maximum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C || Float || Bounding Box Maximum Z&lt;br /&gt;
|}&lt;br /&gt;
Rotation is stored between -0x7FFF and 0x7FFF, which ranges -180 degrees and 180 degrees.&lt;br /&gt;
&lt;br /&gt;
== SHP1 - Shape Information==&lt;br /&gt;
The &#039;&#039;&#039;Sh&#039;&#039;&#039;a&#039;&#039;&#039;p&#039;&#039;&#039;e Information section determines how to use the data in the [[#VTX1_-_Vertex_Data|VTX1]] section to create shapes.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;SHP1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Shapes stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Shape Data table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Remap table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Name table offset&amp;lt;br/&amp;gt;(Generally not used, and thus set to 0)&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || &amp;quot;Vertex Attribute table&amp;quot; offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Int32 || &amp;quot;Weight Matrix data table&amp;quot; offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Int32 || &amp;quot;GXDisplayList data buffer&amp;quot; offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Int32 || &amp;quot;Weight Matrix group table&amp;quot; offset (entry count must equal the entry count of the GXDisplayList group table)&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Int32 || &amp;quot;GXDisplayList group table&amp;quot; offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Shape Data ===&lt;br /&gt;
Each shape denotes a Matrix Calculation type, which is used for Billboarding, as well as multi-joint skinning.&amp;lt;br/&amp;gt;A shape also contains a group of GXDisplayList primitives, and can have multiple groups if the geometry needs to be weighted to more than 10 [[#DRW1_-_Skinning_Assignments|DRW1]] matrices.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;TODO: Figure out what happens in the event that more than 10 are needed. Is it just straight up not allowed?&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt8 || Matrix Type&lt;br /&gt;
&lt;br /&gt;
* 0 = Single Joint&lt;br /&gt;
&lt;br /&gt;
* 1 = Billboard Joint&lt;br /&gt;
&lt;br /&gt;
* 2 = Billboard Joint (Y axis only)&lt;br /&gt;
&lt;br /&gt;
* 3 = Multiple Joints&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || UInt8 || Padding (0xFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Int16 || &amp;quot;GXDisplayList group&amp;quot; count&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int16 || Vertex Attribute offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Int16 || First &amp;quot;Weight Matrix group table&amp;quot; index&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || First &amp;quot;GXDisplayList group&amp;quot; index&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Float || Bounding Sphere&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Float || Bounding Box Minimum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Float || Bounding Box Minimum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Float || Bounding Box Minimum Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Float || Bounding Box Maximum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Float || Bounding Box Maximum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Float || Bounding Box Maximum Z&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== MAT2 - Material List (Old) ==&lt;br /&gt;
Technically supported by the game, but not known to be used by any model.&lt;br /&gt;
&lt;br /&gt;
== MAT3 - Material List ==&lt;br /&gt;
&lt;br /&gt;
== MDL3 - Display List ==&lt;br /&gt;
&lt;br /&gt;
== TEX1 - Texture Data ==&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=838</id>
		<title>BMD/BDL (File Format)</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=838"/>
		<updated>2025-03-25T07:39:25Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: INF1 - Scene Nodes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:File formats]]&lt;br /&gt;
{{WIP}}&lt;br /&gt;
&lt;br /&gt;
BMD (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;M&#039;&#039;&#039;o&#039;&#039;&#039;d&#039;&#039;&#039;el) and BDL (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;D&#039;&#039;&#039;isplay &#039;&#039;&#039;L&#039;&#039;&#039;ist) are two 3D model formats used in &#039;&#039;Super Mario Galaxy&#039;&#039; and &#039;&#039;Super Mario Galaxy 2&#039;&#039;, among a few other &#039;&#039;Wii&#039;&#039; and &#039;&#039;GameCube&#039;&#039; games, such as &#039;&#039;Super Mario Sunshine&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These two formats hold the same data, except BDL contains an additional set of data which is used for faster rendering speeds.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Super Mario Galaxy&#039;&#039; &amp;amp; &#039;&#039;Super Mario Galaxy 2&#039;&#039; contain J3DLoader versions 21 and 26.&lt;br /&gt;
&lt;br /&gt;
== File Header ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || The magic that tells the game which format this file is. (ASCII)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bmd2&#039;&#039;&#039; for BMD (J3DLoader V21)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bmd3&#039;&#039;&#039; for BMD (J3DLoader v26)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bdl4&#039;&#039;&#039; for BDL (J3DLoader v26)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int32 || The total size of the file&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || The number of chunks present in this file.&amp;lt;br/&amp;gt;&#039;&#039;&#039;8&#039;&#039;&#039; for BMD&amp;lt;br/&amp;gt;&#039;&#039;&#039;9&#039;&#039;&#039; for BDL&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Subversion Header ===&lt;br /&gt;
This part of the header is not used, and can be anything.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || A 4 character value representing the Subversion. Usually SVR3 for SMG/2.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Byte[12] || Twelve bytes of padding. Usually these are &#039;&#039;&#039;0xFF&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== INF1 - Scene Information ==&lt;br /&gt;
The &#039;&#039;&#039;Inf&#039;&#039;&#039;ormation section hosts a hierarchy of Joints, Materials, and Shapes, which are used to render the model.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;INF1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || [[#J3DLoader%20Flags|J3DLoader Flags]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Matrix Group Count&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Vertex Count&amp;lt;br/&amp;gt;Always equals the number of entries in the &amp;quot;POSITION&amp;quot; [[#Buffer%20Formats|data buffer]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Relative offset to the [[#Scene%20Hierarchy|Scene Hierarchy]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== J3DLoader Flags ===&lt;br /&gt;
The J3DLoader contains several flags which affect how models are handled. There are more than what are shown here, however, those must be applied by the game itself in the code.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000000 || No flags applied (TODO: Check if this defaults to basic matrix calculation)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000001 || Use Autodesk Softimage matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000010 || Use Autodesk Maya matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000100 || Use Basic matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000001000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000010000 || UseImmidiateMtx (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000100000 || UsePostTexMtx (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000001000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000010000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000100000000 || NoMatrixTransform (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000001000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000010000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000100000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0001000000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0010000000000000 || DoBdlMaterialCalc&lt;br /&gt;
|-&lt;br /&gt;
| 0b0100000000000000 || NoBdlMaterialPatch - If set, skips the call to &#039;&#039;&#039;J3DModelLoader::readPatchedMaterial&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0b1000000000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
For all BMD files, the game always includes load flags &#039;&#039;Material_PE_Full&#039;&#039;, &#039;&#039;Material_UseIndirect&#039;&#039;, &#039;&#039;UseUniqueMaterials&#039;&#039;, and &#039;&#039;UNKNOWN_21&#039;&#039;.&amp;lt;br/&amp;gt;&lt;br /&gt;
For all BDL files, the game always includes load flags &#039;&#039;Material_UseIndirect&#039;&#039;, and &#039;&#039;UseUniqueMaterials&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;gt; &#039;&#039;Note: Changing the load flags by changing the code doesn&#039;t seem to do much.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Scene Hierarchy ===&lt;br /&gt;
Each model is constructed using a Scene Hierarchy. This simply determines the order of bones (in turn, defining the parent/child relations), material assignments, and Shape assignments.&lt;br /&gt;
&lt;br /&gt;
Each node consists of the following:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt16 || Node Type.&amp;lt;br/&amp;gt;0x00 = Marks the end of the node list&amp;lt;br/&amp;gt;0x01 = Creates a new child of the previous node&amp;lt;br/&amp;gt;0x02 = Finishes the child node and returns ownership to the previous node&amp;lt;br/&amp;gt;0x10 = Joint Assignment node. &amp;quot;Data&amp;quot; holds the Joint ID (index into JNT1)&amp;lt;br/&amp;gt;0x11 = Material assignment. &amp;quot;Data&amp;quot; holds the Material ID (index into MAT3)&amp;lt;br/&amp;gt;0x12 = Shape Assignment. &amp;quot;Data&amp;quot; holds the Shape ID (index into SHP1)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt16 || A Data value. Used by some nodes to index into other chunks. Usage depends on the node type.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The node list is padded to the nearest 32.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== VTX1 - Vertex Data ==&lt;br /&gt;
The &#039;&#039;&#039;V&#039;&#039;&#039;er&#039;&#039;&#039;t&#039;&#039;&#039;e&#039;&#039;&#039;x&#039;&#039;&#039; Data section contains the actual number values used for the properties of the geometry. It also includes the information on how the values are formatted.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;VTX1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int32 || Buffer Format list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || &amp;quot;POSITION&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || &amp;quot;NORMAL&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || &amp;quot;TANGENT&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || &amp;quot;COLOR_0&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Int32 || &amp;quot;COLOR_1&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Int32 || &amp;quot;TEXCOORD_0&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Int32 || &amp;quot;TEXCOORD_1&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Int32 || &amp;quot;TEXCOORD_2&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C || Int32 || &amp;quot;TEXCOORD_3&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x30 || Int32 || &amp;quot;TEXCOORD_4&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x34 || Int32 || &amp;quot;TEXCOORD_5&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x38 || Int32 || &amp;quot;TEXCOORD_6&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C || Int32 || &amp;quot;TEXCOORD_7&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Buffer Formats ===&lt;br /&gt;
Each of the Buffers in this section have a format descriptor. This allows different types of data storage, allowing for smaller files.&lt;br /&gt;
&lt;br /&gt;
Each format descriptor contains an Attribute Target, a Component Count, a Data Type, and a Mantissa shifter (to allow floats to be stored as smaller datatypes compared to FLOAT).&amp;lt;br/&amp;gt;Only one descriptor can exist for each attribute.&lt;br /&gt;
&lt;br /&gt;
The Attribute Target tells the game what this buffer is used for.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Attribute Targets&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000009 || POSITION || This buffer represents the positions of vertices in the model. Basically required for all visual models.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000A || NORMAL || This buffer represents vertex normals, used for the engine&#039;s vertex shading. Not needed if no material requires it.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000B || COLOR_0 || This buffer is available for Vertex Colors.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000C || COLOR_1 || This buffer is available for Vertex Colors.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000D || TEXCOORD_0 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000E || TEXCOORD_1 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000F || TEXCOORD_2 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000010 || TEXCOORD_3 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000011 || TEXCOORD_4 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000012 || TEXCOORD_5 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000013 || TEXCOORD_6 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000014 || TEXCOORD_7 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000019 || TANGENT || &#039;&#039;Currently unknown exactly what goes in here.&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x000000FF || List End || A buffer using this target will end the descriptor list.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The component count tells the game how many parts of the component that there are. Note that the values are considered based on the attribute target they&#039;re assigned to.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Component Count&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || POSITION_XY || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || POSITION_XYZ || Represents a position in 3D space with 3 values: X, Y, and Z.&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || NORMAL_XYZ || Represents a normal vector in 3D space with 3 values: X, Y, and Z.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || NORMAL_NBT || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || NORMAL_NBT3 || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || COLOR_RGB || Represents a color value with only Red, Green, and Blue values.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || COLOR_RGBA || Represents a color value with Red, Green, Blue, and Alpha values.&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || TEXCOORD_S || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || TEXCOORD_ST || Represents a UV texture coordinate with 2 values: X and Y.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Data Type tells the game how many bytes each value is, in the sense that an Int32 is 4 bytes, a Int16 is 2 bytes, a Float is 4 bytes, etc.&amp;lt;br/&amp;gt;Note that the Color values have a different set of options.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Data Types&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || UInt8 || 1 byte per value (0 to 255)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || Int8 || 1 byte per value (-128 to 127)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || UInt16 || 2 bytes per value (0 to 65535)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || Int16 || 2 bytes per value (-32,768 to 32,767)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || Float || 4 bytes per value&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || RGB565 || 2 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || RGB8 || 3 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || RGBX8 || 3 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || RGBA4 || 2 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || RGBA6 || 4 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000005 || RGBA8 || 4 bytes per color&lt;br /&gt;
|}&lt;br /&gt;
&amp;gt; &#039;&#039;Note: Both games require colors to be 4 bytes wide at all times, so changing from RGBA8 is worthless.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== EVP1 - Skinning Envelopes ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;EVP1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Envelopes stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || &amp;quot;Joint Count&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || &amp;quot;&#039;Joint Count&#039; list index&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || &amp;quot;Joint Weight&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || &amp;quot;Inverse Bind Matrices&amp;quot; list offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== DRW1 - Skinning Assignments ==&lt;br /&gt;
&lt;br /&gt;
== JNT1 - Joint Hierarchy ==&lt;br /&gt;
The &#039;&#039;&#039;J&#039;&#039;&#039;oi&#039;&#039;&#039;nt&#039;&#039;&#039; Hierarchy section defines the rigging skeleton of a model. There can only be one skeleton per model.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;JNT1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Joints stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Joint Data table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Remap table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Name table offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Joint Data ===&lt;br /&gt;
Each joint includes positional data and a bounding box which is used by the game for determining rendering range automatically.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int16 || Matrix Type&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || UInt8 || Parent Scale inheritance&amp;lt;br/&amp;gt;0 = Follow parent joint&#039;s scale&amp;lt;br/&amp;gt;1 = Ignore parent joint&#039;s scale&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt8 || Padding (0xFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Float || Scale X&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Float || Scale Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Float || Scale Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int16 || Rotation X&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || Int16 || Rotation Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int16 || Rotation Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x16 || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Float || Translation X&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Float || Translation Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Float || Translation Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Float || Bounding Sphere&amp;lt;br/&amp;gt;Should encapsulate all vertices that the joint affects&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Float || Bounding Box Minimum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C || Float || Bounding Box Minimum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x30 || Float || Bounding Box Minimum Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x34 || Float || Bounding Box Maximum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x38 || Float || Bounding Box Maximum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C || Float || Bounding Box Maximum Z&lt;br /&gt;
|}&lt;br /&gt;
Rotation is stored between -0x7FFF and 0x7FFF, which ranges -180 degrees and 180 degrees.&lt;br /&gt;
&lt;br /&gt;
== SHP1 - Shape Information==&lt;br /&gt;
The &#039;&#039;&#039;Sh&#039;&#039;&#039;a&#039;&#039;&#039;p&#039;&#039;&#039;e Information section determines how to use the data in the [[#VTX1_-_Vertex_Data|VTX1]] section to create shapes.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;SHP1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Shapes stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Shape Data table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Remap table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Name table offset&amp;lt;br/&amp;gt;(Generally not used, and thus set to 0)&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || &amp;quot;Vertex Attribute table&amp;quot; offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Int32 || &amp;quot;Weight Matrix data table&amp;quot; offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Int32 || &amp;quot;GXDisplayList data buffer&amp;quot; offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Int32 || &amp;quot;Weight Matrix group table&amp;quot; offset (entry count must equal the entry count of the GXDisplayList group table)&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Int32 || &amp;quot;GXDisplayList group table&amp;quot; offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Shape Data ===&lt;br /&gt;
Each shape denotes a Matrix Calculation type, which is used for Billboarding, as well as multi-joint skinning.&amp;lt;br/&amp;gt;A shape also contains a group of GXDisplayList primitives, and can have multiple groups if the geometry needs to be weighted to more than 10 [[#DRW1_-_Skinning_Assignments|DRW1]] matrices.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;TODO: Figure out what happens in the event that more than 10 are needed. Is it just straight up not allowed?&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt8 || Matrix Type&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || UInt8 || Padding (0xFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Int16 || &amp;quot;GXDisplayList group&amp;quot; count&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int16 || Vertex Attribute offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Int16 || First &amp;quot;Weight Matrix group table&amp;quot; index&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || First &amp;quot;GXDisplayList group&amp;quot; index&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Float || Bounding Sphere&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Float || Bounding Box Minimum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Float || Bounding Box Minimum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Float || Bounding Box Minimum Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Float || Bounding Box Maximum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Float || Bounding Box Maximum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Float || Bounding Box Maximum Z&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== MAT2 - Material List (Old) ==&lt;br /&gt;
Technically supported by the game, but not known to be used by any model.&lt;br /&gt;
&lt;br /&gt;
== MAT3 - Material List ==&lt;br /&gt;
&lt;br /&gt;
== MDL3 - Display List ==&lt;br /&gt;
&lt;br /&gt;
== TEX1 - Texture Data ==&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=Cutscenes&amp;diff=837</id>
		<title>Cutscenes</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=Cutscenes&amp;diff=837"/>
		<updated>2025-03-21T16:31:03Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: /* Camera */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Files]]&lt;br /&gt;
[[Category:Lists]]&lt;br /&gt;
{{WIP}}&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;&#039;Todo:&#039;&#039;&#039;&lt;br /&gt;
*Finish the hardcoded cutscene names.&lt;br /&gt;
*More info and research on the use of canm and supported objects.&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Cutscenes are flexible, complex scenes, which can execute more freedom in contrast to the SimpleDemoExecutor.&lt;br /&gt;
These scenes consist of individual sequences that are played in order. In each sequence, several actions can be executed from certain frames, such as changing the player&#039;s position, camera movements, sound effects, and more. To each sequence (and subsequence) different actions are linked, which are then executed at the time of this sequence.&lt;br /&gt;
&lt;br /&gt;
You can best visualize this in a kind of timeline. The timeline consists of the individual sequences, which consist of several actions. At the same time single subscequences can be executed together with the actual sequences.&lt;br /&gt;
&lt;br /&gt;
==Structure==&lt;br /&gt;
[[File:Cutscene_Visual-Representation.png|thumb|A visual representation of the first Yoshi Meets cutscene.]]&lt;br /&gt;
A cutscene is activated by a demo object via SW_APPEAR within the map and loads several sheet BCSV files located in the demo.arc archive of the respective galaxy/zone. The demo object loads the bcsv files using its defined sheet name and additional &amp;quot;Demo&amp;quot; in front of the file name of the BSCV attached and a respective sheet type at the end of the file name (e.g. &#039;&#039;&#039;Demo&#039;&#039;&#039;AfterGameOver&#039;&#039;&#039;Time&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
In addition, the demo object has its own cutscene name, which is only used in certain cases (e.g. to load certain sequences for [[Starship Mario]]) and also for camera codes. Certain names can be recognized by the game and then loads additional hardcoded settings such as behavior after scene completion. A list of these names [[Cutscenes#Hardcoded_Cutscene_Names|can be found below]].&lt;br /&gt;
&lt;br /&gt;
Objects other than the player object itself can be linked to the cutscene. These then use a cutscene group ID, which on the one hand must match the demo object ID and on the other hand must be entered in the action sheet together with the object&#039;s name. If the object is entered in the [[ObjNameTable]], the name from the Japanese column must be entered instead.&lt;br /&gt;
&lt;br /&gt;
If there are several identical objects that are part of a cutscene, you can also define a cast group id for one specific object to distinguish it from the other identical objects for the scene.&lt;br /&gt;
&lt;br /&gt;
===Time===&lt;br /&gt;
Defines the individual sequences with their names and length. They are played in the order they are in the list.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Field Name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| PartName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Name of the sequence&lt;br /&gt;
|-&lt;br /&gt;
| TotalStep&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| Duration of the sequence in frames&lt;br /&gt;
|-&lt;br /&gt;
| SuspendFlag&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| If set to 1, pauses the cutscene and resumes gameplay. The cutscene will continue from here next time it is activated.&lt;br /&gt;
|-&lt;br /&gt;
| WaitUserInputFlag&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===SubPart===&lt;br /&gt;
Runs additional subsequences in parallel during a sequence.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Field Name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| SubPartName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Name of the sub sequence&lt;br /&gt;
|-&lt;br /&gt;
| SubPartTotalStep&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| The length of the sub sequence&lt;br /&gt;
|-&lt;br /&gt;
| MainPartName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Name of the main sequence this sub sequence belongs to&lt;br /&gt;
|-&lt;br /&gt;
| MainPartStep&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| The frame of the main sequence this sub sequence starts at&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Action===&lt;br /&gt;
Picks up objects and can position them to a given GeneralPos and play an animation.&lt;br /&gt;
&lt;br /&gt;
All animation types are supported. For more control you can use [[ActorInfo#ActorInfo|ActorAnimCtrl.bcsv]] for your objects to define multiple animation names of different animation types to the animation name defined in the cutscene. &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Field Name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| PartName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Sequence Name&lt;br /&gt;
|-&lt;br /&gt;
| CastName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Japanese Name of the object (defined in [[ObjNameTable]])&lt;br /&gt;
|-&lt;br /&gt;
| CastID&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| Cast ID of the object&lt;br /&gt;
|-&lt;br /&gt;
| ActionType&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| Pick an Action Type from the table below.&lt;br /&gt;
|-&lt;br /&gt;
| PosName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Name of the GeneralPos object for destination location&lt;br /&gt;
|-&lt;br /&gt;
| AnimName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Name of the animation, which can be loaded either from the ARC archive object or from a separate ARC archive with the additional name &amp;quot;Anim&amp;quot;.&lt;br /&gt;
|}&lt;br /&gt;
====Action Types====&lt;br /&gt;
Note that these action types are not available for any object that registers as a &amp;quot;Simple Demo Cast&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===== SMG1 =====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! ID !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Apppear || Makes the object Appear.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Kill || Makes the object Disappear (using it&#039;s Kill function).&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Special Function || Executes a function that the object specifically registered to the cutscene. This is object specific, and not every object has one.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Special Nerve || Sets the objects Nerve to a nerve specifically registered to the cutscene. This is object specific, and not every object has one.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || On SW_A || The SW_A of this object will be activated.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || On SW_B || The SW_B of this object will be activated.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || Show Model || The model of the object will be unhidden.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || Hide Model || The model of the object will be hidden.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Start NPC Message || Start a conversation with an NPC. Effectively useless because NPC&#039;s do not register their text to cutscenes unless the cutscene has a specific name.&lt;br /&gt;
|-&lt;br /&gt;
| 9 || Start NPC Message (Alt) || Start a conversation with an NPC without stopping Mario&#039;s current animation. Effectively useless because NPC&#039;s do not register their text to cutscenes unless the cutscene has a specific name.&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Duplicate of 9 || Duplicate of 9.&lt;br /&gt;
|-&lt;br /&gt;
| 11 || Play Animation || Plays the animation that &amp;quot;AnimName&amp;quot; is set to. This happens for all Action Types.&lt;br /&gt;
|-&lt;br /&gt;
| 12 || Off SW_A || The SW_A of this object will be deactivated.&lt;br /&gt;
|-&lt;br /&gt;
| 13 || Off SW_B || The SW_B of this object will be deactivated.&lt;br /&gt;
|}&lt;br /&gt;
===== SMG2 =====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! ID !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Play Animation || Plays the animation that &amp;quot;AnimName&amp;quot; is set to. This happens for all Action Types.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Apppear || Makes the object Appear.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Kill || Makes the object Disappear (using it&#039;s Kill function).&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Special Function || Executes a function that the object specifically registered to the cutscene. This is object specific, and not every object has one.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Special Nerve || Sets the objects Nerve to a nerve specifically registered to the cutscene. This is object specific, and not every object has one.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || On SW_A || The SW_A of this object will be activated.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || On SW_B || The SW_B of this object will be activated.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || Show Model || The model of the object will be unhidden.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Hide Model || The model of the object will be hidden.&lt;br /&gt;
|-&lt;br /&gt;
| 9 || Start NPC Message || Start a conversation with an NPC. Effectively useless because NPC&#039;s do not register their text to cutscenes unless the cutscene has a specific name.&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Start NPC Message (Alt) || Start a conversation with an NPC without stopping Mario&#039;s current animation. Effectively useless because NPC&#039;s do not register their text to cutscenes unless the cutscene has a specific name.&lt;br /&gt;
|-&lt;br /&gt;
| 11 || Duplicate of 10 || Duplicate of 10.&lt;br /&gt;
|-&lt;br /&gt;
| 12 || Off SW_A || The SW_A of this object will be deactivated.&lt;br /&gt;
|-&lt;br /&gt;
| 13 || Off SW_B || The SW_B of this object will be deactivated.&lt;br /&gt;
|-&lt;br /&gt;
| 14 || Request Movement Off || Tries to pause execution of this object.&lt;br /&gt;
|-&lt;br /&gt;
| 15 || Request Movement On || Tries to resume execution of this object.&lt;br /&gt;
|-&lt;br /&gt;
| 16 || StoryBookWarpDemo || Unknown. Related to StoryBookWarpDemo. Uses 1 as arg.&lt;br /&gt;
|-&lt;br /&gt;
| 17 || StoryBookWarpDemo || Unknown. Related to StoryBookWarpDemo. Uses 0 as arg.&lt;br /&gt;
|-&lt;br /&gt;
| 18 || StoryBookWarpDemo || Unknown. Related to StoryBookWarpDemo.&lt;br /&gt;
|-&lt;br /&gt;
| 19 || StoryBookWarpDemo || Unknown. Related to StoryBookWarpDemo.&lt;br /&gt;
|-&lt;br /&gt;
| 20 || ? || Unknown. Used at the end of the cutscene where Mario meets Yoshi for the first time.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Player===&lt;br /&gt;
Can position Mario/Luigi to a specific GeneralPos and play an animation.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Field Name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| PartName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Name of the sequence&lt;br /&gt;
|-&lt;br /&gt;
| PosName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Name of the GeneralPos to teleport the player to&lt;br /&gt;
|-&lt;br /&gt;
| BckName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Name of the animation from MarioAnim.arc to play. (All other animationtypes than BCK are also supported)&lt;br /&gt;
|-&lt;br /&gt;
| Visible&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Camera===&lt;br /&gt;
Can play cameras, which can be played one after another. Can use either a camera code from the Map archive&#039;s [[Cameras|CameraParam.bcam]] file, or a key frame camera animation which are controlled via [[CANM]] files, which must be located in the object archive of the targeted object.&amp;lt;/br&amp;gt;&lt;br /&gt;
By default the camera is fixed on Mario/Luigi.&amp;lt;/br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For BCAM usage, the Camera ID name to be used is composed of the &#039;&#039;PartName&#039;&#039; and the &#039;&#039;Cutscenename&#039;&#039; (not the sheet name): &#039;&#039;&#039;e:&amp;lt;small&amp;gt;Cutscenename&amp;lt;/small&amp;gt;[&amp;lt;small&amp;gt;PartName&amp;lt;/small&amp;gt;]&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
For CANM usage, the name defined in &#039;&#039;AnimCameraName&#039;&#039; must match the CANM file&#039;s name and needs to be placed in the root of the targeted object&#039;s archive.&amp;lt;/br&amp;gt;&lt;br /&gt;
Seems to be supported only by certain objects. This has not yet been fully explored.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Field Name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| PartName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Name of the sequence&lt;br /&gt;
|-&lt;br /&gt;
| CameraTargetName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Japanese Name of the object the camera is focused to. (Primarily uses ObjNameTable names)&lt;br /&gt;
|-&lt;br /&gt;
| CameraTargetCastID&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| Cast ID of the object&lt;br /&gt;
|-&lt;br /&gt;
| AnimCameraName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| CANM file name (&amp;quot;.canm&amp;quot; extension optional) which must be placed in the root of the targeted object&#039;s archive.&lt;br /&gt;
|-&lt;br /&gt;
| AnimCameraStartFrame&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| The part frame to begin the camera on. -1 will have the camera interpolate to the start of the CANM&lt;br /&gt;
|-&lt;br /&gt;
| AnimCameraEndFrame&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| IsContinuous&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Sound===&lt;br /&gt;
Can change music and play sound effects.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Field Name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| PartName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Name of the sequence&lt;br /&gt;
|-&lt;br /&gt;
| Bgm&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| [[List_of_Music|Name of the music]] to play.&lt;br /&gt;
|-&lt;br /&gt;
| SystemSe&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| [[List_of_Sounds_(SMG2)|Name of the soundeffect]] to play. &lt;br /&gt;
|-&lt;br /&gt;
| ActionSe&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| ReturnBgm&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BgmWipeoutFrame&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| Duration in frames for fading out the music. -1 = No fade-out&lt;br /&gt;
|-&lt;br /&gt;
| AllSoundStopFrame&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Wipe===&lt;br /&gt;
Can perform a fade out animation.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Field Name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| PartName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Name of the sequence&lt;br /&gt;
|-&lt;br /&gt;
| WipeName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| The wipe to use. See the [[#WipeName|WipeName]] table below.&lt;br /&gt;
|-&lt;br /&gt;
| WipeType&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| The function for the Wipe to perform. See the [[#WipeType|WipeType]] table below.&lt;br /&gt;
|-&lt;br /&gt;
| WipeFrame&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| The amount of frames that the wipe will move for. Higher values = Slower movement&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====WipeName====&lt;br /&gt;
Below is a list of available WipeName values:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 円ワイプ || Circle Wipe&lt;br /&gt;
|-&lt;br /&gt;
| フェードワイプ || Black Fade&lt;br /&gt;
|-&lt;br /&gt;
| 白フェードワイプ || White Fade&lt;br /&gt;
|-&lt;br /&gt;
| ゲームオーバー || Game Over&lt;br /&gt;
|-&lt;br /&gt;
| クッパ || Bowser Face (Death wipe)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: The Mario wipe is missing because the Mario wipe is a System Wipe and not a Scene Wipe. DemoWipes can only be Scene Wipes.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====WipeType====&lt;br /&gt;
Below is the list of Wipe functions. The table below uses the Black Fade as an example.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Open Wipe (Fade to Gameplay)&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Close Wipe (Fade to Black)&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Force Open Wipe (Cut to Gameplay)&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Force Close Wipe (Cut to Black)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Tip: If you need to change wipes while the wipe is closed, use Force Close before using Open for a smoother transition.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Hardcoded Cutscene Names===&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;&#039;Todo:&#039;&#039;&#039; Finish this.&amp;lt;/small&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Cutscene Name&lt;br /&gt;
! Meaning&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| ベビチコ出会い&lt;br /&gt;
| Master Luma Meeting&lt;br /&gt;
| -Uses hardcoded cameras&amp;lt;br /&amp;gt;-Activates spin after completion when the galaxy uses the StageType &amp;quot;Storybook&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Tools==&lt;br /&gt;
Up to now, there are no tools that allow the cutscenes to be edited directly in a clear interface. Since the cutscenes sheet consists of [[BCSV]] files, they can be edited with any other BCSV editor, like Whitehole. They can also be converted to CSV files and vice versa with Pyjmap.&lt;br /&gt;
&lt;br /&gt;
The tools can be found on the [[Tools_and_Resources|tools and ressources page]].&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=ActorInfo&amp;diff=836</id>
		<title>ActorInfo</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=ActorInfo&amp;diff=836"/>
		<updated>2025-03-21T00:22:35Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: /* InitActor.bcsv */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Files]]&lt;br /&gt;
&lt;br /&gt;
= ActorInfo =&lt;br /&gt;
&#039;&#039;&#039;ActorInfo&#039;&#039;&#039; is a folder that only exists in &#039;&#039;SMG2&#039;&#039;. it contains files that control certain aspects of objects. Below is a list of every file that can be put in this folder.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Filename !! Uses !! Description&lt;br /&gt;
|-&lt;br /&gt;
| ActionBgmCtrl.bcsv || 13 || Used by bosses to start their music&lt;br /&gt;
|-&lt;br /&gt;
| ActionFlagCtrl.bcsv || 111 ||&lt;br /&gt;
|-&lt;br /&gt;
| ActionFootPrintCtrl.bcsv || 1 || Used by &#039;&#039;DinoPackunBaby&#039;&#039; to assist in controlling the footsteps&lt;br /&gt;
|-&lt;br /&gt;
| ActionScreenBlurCtrl.bcsv || 21 ||&lt;br /&gt;
|-&lt;br /&gt;
| ActorAnimCtrl.bcsv || 109 ||&lt;br /&gt;
|-&lt;br /&gt;
| ActorHitReactionCtrl.bcsv || 139 ||&lt;br /&gt;
|-&lt;br /&gt;
| ActorParam.bcsv || 5 ||&lt;br /&gt;
|-&lt;br /&gt;
| ActorStateWalk.bcsv || 1 || Used by &#039;&#039;DinoPackunBaby&#039;&#039; to assist in controlling his walk&lt;br /&gt;
|-&lt;br /&gt;
| AnimBlendTriple.bcsv || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
| InitActor.bcsv || 529 || Contains information on how the actor gets initialized.&lt;br /&gt;
|-&lt;br /&gt;
| InitActor2D.bcsv || 1 || Contains information on how the 2D actor gets initialized. Only used by &#039;&#039;Tongari&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| InitActor2DWater.bcsv || 1 || Contains information on how the 2D Water actor gets initialized. Only used by &#039;&#039;GhostAttackGhost&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| InitActorCollection.bcsv || 7 || Contains information on how the Collection actor gets initialized. Used by all 7 Powerups that appear on &#039;&#039;Starship Mario&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| InitActorDemo.bcsv || 10 || Contains information on how the Demo actor gets initialized. Used by &#039;&#039;GrandStar&#039;&#039;, &#039;&#039;PowerStar&#039;&#039;, and some other objects used in the game&#039;s main cutscenes.&lt;br /&gt;
|-&lt;br /&gt;
| InitActorDemoBellyDragon.bcsv || 2 || Contains information on how the Demo actor gets initialized during a Gobblegut cutscene. Only used by &#039;&#039;KoopaJr&#039;&#039; and &#039;&#039;KoopaJrRobotPod&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| InitActorDemoTitle.bcsv || 3 || Contains information on how the Demo actor gets initialized while on the Title Screen. Only used by &#039;&#039;DemoTitlePlanet&#039;&#039;, &#039;&#039;Tico&#039;&#039;, and &#039;&#039;Yoshi&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| InitActorDemoWithShadow.bcsv || 1 || Contains information on how the Demo actor gets initialized with a shadow. Only used by &#039;&#039;PowerStar&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| InitActorDummy.bcsv || 5 || Contains information on how the actor gets initialized in dummy form. Used by &#039;&#039;KinokoLifeUp&#039;&#039;, &#039;&#039;KinokoOneUp&#039;&#039;, &#039;&#039;Kuribo&#039;&#039;, &#039;&#039;PowerStar&#039;&#039;, and &#039;&#039;Tico&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| InitActorExit.bcsv || 1 || Contains information on how the exit actor gets initialized. Only used by &#039;&#039;PetitPorter&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| InitCollision.bcsv || 101 || Contains information on how the collision for this object is created&lt;br /&gt;
|-&lt;br /&gt;
| InitScale.bcsv || 6 || Contains a Vector3 that represents a size scale.&lt;br /&gt;
|-&lt;br /&gt;
| InitSensor.bcsv || 303 || Contains information on how to setup hitboxes for this object.&lt;br /&gt;
|-&lt;br /&gt;
| InitStageEffectCamera.bcsv || 11 || Contains information on how this object interacts with the camera.&lt;br /&gt;
|-&lt;br /&gt;
| InitStageEffectPad.bcsv || 12 || Contains information on pad. Unknown for sure, but it looks to be related to Wiimote Rumbling&lt;br /&gt;
|-&lt;br /&gt;
| InitSwitch.bcsv || 114 || Contains information on which switches are used and how&lt;br /&gt;
|-&lt;br /&gt;
| ItemGenerator.bcsv || 77 || Contains information on what objects to spawn when certain events are triggered (such as &amp;quot;Death by Spin Attack&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
| PadAndCameraCtrl.bcsv || 105 ||&lt;br /&gt;
|-&lt;br /&gt;
| Reaction.bcsv || 3 ||&lt;br /&gt;
|-&lt;br /&gt;
| Sequence.bcsv || 2 || Used for the Chimp Ice skating minigames&lt;br /&gt;
|-&lt;br /&gt;
| Shadow.bcsv || 256 || Contains information on how to create shadows for this object. Useful for &#039;&#039;&#039;ProductMapObjDataTable&#039;&#039;&#039; classes such as &#039;&#039;SimpleMapObj&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| (ObjectName).banmt || 234 ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== InitActor.bcsv ==&lt;br /&gt;
InitActor.bcsv and it&#039;s variants (like InitActor2D.bcsv) are all structured the same way, and define certain values for the object during it&#039;s initialization.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Name !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| InitFunction || string || The name of the function that this entry corresponds to.&amp;lt;br&amp;gt;Functions:&amp;lt;br&amp;gt;&#039;&#039;&#039;Rail&#039;&#039;&#039;: Only uses &#039;&#039;Data&#039;&#039;. &amp;quot;&amp;quot; for &amp;quot;Doesn&#039;t use Rails&amp;quot;. &amp;quot;Use&amp;quot; for &amp;quot;Can use Rails&amp;quot;. &amp;quot;Needs&amp;quot; for &amp;quot;Requires a Rail&amp;quot;&amp;lt;br&amp;gt;&#039;&#039;&#039;DefaultPos&#039;&#039;&#039;: Only uses &#039;&#039;Data&#039;&#039;. &amp;quot;o&amp;quot; for Enabled, &amp;quot;x&amp;quot; for Disabled.&amp;lt;br&amp;gt;&#039;&#039;&#039;UseScaleForParam&#039;&#039;&#039;: Only uses &#039;&#039;Data&#039;&#039;. &amp;quot;o&amp;quot; for Enabled, &amp;quot;x&amp;quot; for Disabled.&amp;lt;br&amp;gt;&#039;&#039;&#039;Model&#039;&#039;&#039;: Only uses &#039;&#039;Data&#039;&#039;. The name of the model to use.&amp;lt;br&amp;gt;&#039;&#039;&#039;Executor&#039;&#039;&#039;: Only uses &#039;&#039;Data&#039;&#039;. Check the executor list below this table for more details.&amp;lt;br&amp;gt;&#039;&#039;&#039;Light&#039;&#039;&#039;: Only uses &#039;&#039;Data&#039;&#039;. The name of the Light Type to use.&amp;lt;br&amp;gt;&#039;&#039;&#039;Binder&#039;&#039;&#039;: &amp;quot;o&amp;quot; for Enabled, &amp;quot;x&amp;quot; for Disabled.&amp;lt;br&amp;gt;&#039;&#039;&#039;Effect&#039;&#039;&#039;: The name of the Effect group to use.&amp;lt;br&amp;gt;&#039;&#039;&#039;Sound&#039;&#039;&#039;:The name of the Sound group to use. You can offset the sound from the object position using the Param00VecX, Y, and Z.&amp;lt;br&amp;gt;&#039;&#039;&#039;Clipping&#039;&#039;&#039;: Only uses &#039;&#039;Param00F32&#039;&#039;. The distance that this object will clip out at.&amp;lt;br&amp;gt;&#039;&#039;&#039;GroupClipping&#039;&#039;&#039;:&amp;lt;br&amp;gt;&#039;&#039;&#039;DemoSimpleCastAll&#039;&#039;&#039;:&amp;lt;br&amp;gt;&#039;&#039;&#039;StarPointer&#039;&#039;&#039;:&amp;lt;br&amp;gt;&#039;&#039;&#039;DebugNode&#039;&#039;&#039;: Useless.&lt;br /&gt;
|-&lt;br /&gt;
| Data || string || The main data input. Most InitFunctions use this.&lt;br /&gt;
|-&lt;br /&gt;
| Param00Int || int || An integer parameter&lt;br /&gt;
|-&lt;br /&gt;
| Param00F32 || float || A float parameter&lt;br /&gt;
|-&lt;br /&gt;
| Param01F32 || float || A second float parameter&lt;br /&gt;
|-&lt;br /&gt;
| Param00Str || string || A string parameter, different from the Data parameter.&lt;br /&gt;
|-&lt;br /&gt;
| Param00VecX || float || The X Value of a Vector3 parameter.&lt;br /&gt;
|-&lt;br /&gt;
| Param00VecY || float || The Y Value of a Vector3 parameter.&lt;br /&gt;
|-&lt;br /&gt;
| Param00VecZ || float || The Z Value of a Vector3 parameter.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Executor !! Description&lt;br /&gt;
|-&lt;br /&gt;
| MapObj || &lt;br /&gt;
|-&lt;br /&gt;
| MapObjStrongLight || &lt;br /&gt;
|-&lt;br /&gt;
| MapObjNoShadow || This object does not get shadows applied to it&lt;br /&gt;
|-&lt;br /&gt;
| MapObjNoSilhouetted || &lt;br /&gt;
|-&lt;br /&gt;
| MapObjDecoration || *Seems to not correctly support environment maps*&lt;br /&gt;
|-&lt;br /&gt;
| MapObjNoCalcAnim || &lt;br /&gt;
|-&lt;br /&gt;
| MapObjMovement || &lt;br /&gt;
|-&lt;br /&gt;
| MapObjNoMovement || &lt;br /&gt;
|-&lt;br /&gt;
| MapObjIndirect || &lt;br /&gt;
|-&lt;br /&gt;
| MapObjIndirectStrongLight || &lt;br /&gt;
|-&lt;br /&gt;
| MapObjNoMovementNoCalcAnimIndirectStrongLight || &lt;br /&gt;
|-&lt;br /&gt;
| ClippedMapParts || &lt;br /&gt;
|-&lt;br /&gt;
| CollisionMapObj || &lt;br /&gt;
|-&lt;br /&gt;
| CollisionMapObjWeakLight || &lt;br /&gt;
|-&lt;br /&gt;
| CollisionMapObjNoShadow || &lt;br /&gt;
|-&lt;br /&gt;
| CollisionMapObjNoShadowNoCalcAnim || &lt;br /&gt;
|-&lt;br /&gt;
| CollisionMapObjIndirectNoCalcAnim || &lt;br /&gt;
|-&lt;br /&gt;
| Enemy || &lt;br /&gt;
|-&lt;br /&gt;
| EnemyDecoration || &lt;br /&gt;
|-&lt;br /&gt;
| EnemyIndirect || &lt;br /&gt;
|-&lt;br /&gt;
| EnemySilhouette || &lt;br /&gt;
|-&lt;br /&gt;
| EnemyNoShadow || &lt;br /&gt;
|-&lt;br /&gt;
| EnemyNoMovement || &lt;br /&gt;
|-&lt;br /&gt;
| Boss || &lt;br /&gt;
|-&lt;br /&gt;
| NpcNoShadow || &lt;br /&gt;
|-&lt;br /&gt;
| NpcNoCalcAnim || &lt;br /&gt;
|-&lt;br /&gt;
| Ride || &lt;br /&gt;
|-&lt;br /&gt;
| RideSilhouette || &lt;br /&gt;
|-&lt;br /&gt;
| Planet || &lt;br /&gt;
|-&lt;br /&gt;
| PlanetIndirect || &lt;br /&gt;
|-&lt;br /&gt;
| DynamicMapObj || &lt;br /&gt;
|-&lt;br /&gt;
| PlayerDecoration || &lt;br /&gt;
|-&lt;br /&gt;
| Item || &lt;br /&gt;
|-&lt;br /&gt;
| Bloom || Renders the object on the Bloom pass, which requires a BloomArea to activate.&lt;br /&gt;
|-&lt;br /&gt;
| BossBussun || &lt;br /&gt;
|-&lt;br /&gt;
| CrystalItem || &lt;br /&gt;
|-&lt;br /&gt;
| FireBarBall || &lt;br /&gt;
|-&lt;br /&gt;
| GliBird || &lt;br /&gt;
|-&lt;br /&gt;
| HipDropStarMove || &lt;br /&gt;
|-&lt;br /&gt;
| StoryBook || &lt;br /&gt;
|-&lt;br /&gt;
| StoryBookFilter || &lt;br /&gt;
|-&lt;br /&gt;
| WorldMapMiniObj || &lt;br /&gt;
|-&lt;br /&gt;
| GhostMazeMask || &lt;br /&gt;
|-&lt;br /&gt;
| Crystal || &lt;br /&gt;
|-&lt;br /&gt;
| Tamakoro || &lt;br /&gt;
|-&lt;br /&gt;
| SuperDreamer || &lt;br /&gt;
|-&lt;br /&gt;
| Ghost2DWater || &lt;br /&gt;
|-&lt;br /&gt;
| WoodLogBridge || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Shadow.bcsv ==&lt;br /&gt;
Shadow.bcsv is used to create shadows for objects.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Name !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| Name || string || Shadow name&lt;br /&gt;
|-&lt;br /&gt;
| GroupName || string || &lt;br /&gt;
|-&lt;br /&gt;
| Joint || string || Name of the joint to attach to&lt;br /&gt;
|-&lt;br /&gt;
| DropStart || float || How far until the shadow starts to drop&lt;br /&gt;
|-&lt;br /&gt;
| DropLength || float || How far the shadow drops for&lt;br /&gt;
|-&lt;br /&gt;
| FollowScale || int || Set to 1 to make the shadow scale with the model (if scaled in an editor from the original size)&lt;br /&gt;
|-&lt;br /&gt;
| SyncShow || int || Set to 1 to make the shadow clip in and out with it&#039;s parent model&lt;br /&gt;
|-&lt;br /&gt;
| Gravity || int || &lt;br /&gt;
|-&lt;br /&gt;
| Collision || int || &lt;br /&gt;
|-&lt;br /&gt;
| DropOffsetX || float || X Offset to drop the shadow at.&lt;br /&gt;
|-&lt;br /&gt;
| DropOffsetY || float || Y Offset to drop the shadow at.&lt;br /&gt;
|-&lt;br /&gt;
| DropOffsetZ || float || Z Offset to drop the shadow at.&lt;br /&gt;
|-&lt;br /&gt;
| VolumeStart || float ||&lt;br /&gt;
|-&lt;br /&gt;
| VolumeEnd || float ||&lt;br /&gt;
|-&lt;br /&gt;
| VolumeCut || int || Set to 1&lt;br /&gt;
|-&lt;br /&gt;
| Type || string || &#039;&#039;&#039;VolumeBox&#039;&#039;&#039;: A Box where any shadow responsive object that enters it gets the shadow applied&amp;lt;br&amp;gt;&#039;&#039;&#039;VolumeSphere&#039;&#039;&#039;:&amp;lt;br&amp;gt;&#039;&#039;&#039;VolumeCylinder&#039;&#039;&#039;:&amp;lt;br&amp;gt;&#039;&#039;&#039;VolumeOval&#039;&#039;&#039;:&amp;lt;br&amp;gt;&#039;&#039;&#039;VolumeLine&#039;&#039;&#039;:&amp;lt;br&amp;gt;&#039;&#039;&#039;VolumeOvalPole&#039;&#039;&#039;:&amp;lt;br&amp;gt;&#039;&#039;&#039;VolumeFlatModel&#039;&#039;&#039;: Define the shadow using a shadow model&amp;lt;br&amp;gt;&#039;&#039;&#039;SurfaceCircle&#039;&#039;&#039;:&amp;lt;br&amp;gt;&#039;&#039;&#039;SurfaceOval&#039;&#039;&#039;:&lt;br /&gt;
|-&lt;br /&gt;
| SizeX || float || X Scale of the shadow&lt;br /&gt;
|-&lt;br /&gt;
| SizeY || float || Y Scale of the shadow&lt;br /&gt;
|-&lt;br /&gt;
| SizeZ || float || Z Scale of the shadow&lt;br /&gt;
|-&lt;br /&gt;
| Radius || float ||&lt;br /&gt;
|-&lt;br /&gt;
| LineStart || string || &lt;br /&gt;
|-&lt;br /&gt;
| LineEnd || string || &lt;br /&gt;
|-&lt;br /&gt;
| LineStartRadius || float ||&lt;br /&gt;
|-&lt;br /&gt;
| LineEndRadius || float ||&lt;br /&gt;
|-&lt;br /&gt;
| Model || string || Used to specify what model to use for the Shadow&lt;br /&gt;
|-&lt;br /&gt;
| LocalRotateX || float ||&lt;br /&gt;
|-&lt;br /&gt;
| LocalRotateY || float ||&lt;br /&gt;
|-&lt;br /&gt;
| LocalRotateZ || float ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== InitSensor.bcsv ==&lt;br /&gt;
InitSensor.bcsv defines all of the HitSensors that are applied to the actor.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| SensorName || string ||&lt;br /&gt;
|-&lt;br /&gt;
| SensorType || string || &lt;br /&gt;
|-&lt;br /&gt;
| Radius || float || The radius of the sensor.&lt;br /&gt;
|-&lt;br /&gt;
| HitSensorNumMax || int || The maximum amount of other sensors that can interact with this sensor.&lt;br /&gt;
|-&lt;br /&gt;
| JointName || string || The joint to attach this sensor to on the model. &lt;br /&gt;
|-&lt;br /&gt;
| Callback || string ||&lt;br /&gt;
|-&lt;br /&gt;
| OffsetX || float || Offset X of the sensor.&lt;br /&gt;
|-&lt;br /&gt;
| OffsetY || float || Offset Y of the sensor.&lt;br /&gt;
|-&lt;br /&gt;
| OffsetZ || float || Offset Z of the sensor.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== InitSwitch.bcsv ==&lt;br /&gt;
InitSwitch.bcsv defines all of the switches that can be used with the actor.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| SwitchName || string || The name of the switch.&lt;br /&gt;
|-&lt;br /&gt;
| Usage || string || The way that the switch is used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Usage Types ===&lt;br /&gt;
Below is a table of the available options for the Usage field.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| UseRead || The switch type can be read from.&lt;br /&gt;
|-&lt;br /&gt;
| NeedRead || The switch type is &#039;&#039;&#039;required&#039;&#039;&#039; to read from.&lt;br /&gt;
|-&lt;br /&gt;
| UseWrite || The switch type can be written to.&lt;br /&gt;
|-&lt;br /&gt;
| NeedWrite || The switch type is &#039;&#039;&#039;required&#039;&#039;&#039; to write to.&lt;br /&gt;
|-&lt;br /&gt;
| UseWriteAuto || The switch type can be automatically triggered.&lt;br /&gt;
|-&lt;br /&gt;
| NeedWriteAuto || The switch type is &#039;&#039;&#039;required&#039;&#039;&#039; to automatically trigger.&lt;br /&gt;
|-&lt;br /&gt;
| x || Switch type is disabled.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Availability ===&lt;br /&gt;
Certain Switches only support specific Usage Types. This table details which switches can use which Usage Types.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Switch Name !! Available Usage Types&lt;br /&gt;
|-&lt;br /&gt;
| SW_APPEAR || &#039;&#039;&#039;UseRead&#039;&#039;&#039; (calls &#039;&#039;MR::useStageSwitchReadAppear&#039;&#039;)&amp;lt;br/&amp;gt;&#039;&#039;&#039;NeedRead&#039;&#039;&#039; (calls &#039;&#039;MR::needStageSwitchReadAppear&#039;&#039;)&lt;br /&gt;
|-&lt;br /&gt;
| SW_DEAD || &#039;&#039;&#039;UseWrite&#039;&#039;&#039; (calls &#039;&#039;MR::useStageSwitchWriteDead&#039;&#039;)&amp;lt;br/&amp;gt;&#039;&#039;&#039;NeedWrite&#039;&#039;&#039; (calls &#039;&#039;MR::needStageSwitchWriteDead&#039;&#039;)&amp;lt;br/&amp;gt;&#039;&#039;&#039;UseWriteAuto&#039;&#039;&#039; (calls &#039;&#039;MR::useStageSwitchWriteAutoDead&#039;&#039;)&amp;lt;br/&amp;gt;&#039;&#039;&#039;NeedWriteAuto&#039;&#039;&#039; (calls &#039;&#039;MR::needStageSwitchWriteAutoDead&#039;&#039;)&lt;br /&gt;
|-&lt;br /&gt;
| SW_A || &#039;&#039;&#039;UseRead&#039;&#039;&#039; (calls &#039;&#039;MR::initUseStageSwitchReadA&#039;&#039;)&amp;lt;br/&amp;gt;&#039;&#039;&#039;UseWrite&#039;&#039;&#039; (calls &#039;&#039;MR::initUseStageSwitchWriteA&#039;&#039;)&amp;lt;br/&amp;gt;&#039;&#039;&#039;NeedRead&#039;&#039;&#039; (calls &#039;&#039;MR::needStageSwitchReadA&#039;&#039;)&amp;lt;br/&amp;gt;&#039;&#039;&#039;NeedWrite&#039;&#039;&#039; (calls &#039;&#039;MR::needStageSwitchWriteA&#039;&#039;)&lt;br /&gt;
|-&lt;br /&gt;
| SW_B || &#039;&#039;&#039;UseRead&#039;&#039;&#039; (calls &#039;&#039;MR::useStageSwitchReadB&#039;&#039;)&amp;lt;br/&amp;gt;&#039;&#039;&#039;UseWrite&#039;&#039;&#039; (calls &#039;&#039;MR::initUseStageSwitchWriteB&#039;&#039;)&amp;lt;br/&amp;gt;&#039;&#039;&#039;NeedRead&#039;&#039;&#039; (calls &#039;&#039;MR::needStageSwitchReadB&#039;&#039;)&amp;lt;br/&amp;gt;&#039;&#039;&#039;NeedWrite&#039;&#039;&#039; (calls &#039;&#039;MR::needStageSwitchWriteB&#039;&#039;)&lt;br /&gt;
|-&lt;br /&gt;
| SW_AWAKE&amp;lt;br/&amp;gt;(Optional) || &#039;&#039;&#039;UseRead&#039;&#039;&#039; (calls &#039;&#039;MR::useStageSwitchAwake&#039;&#039;)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== ItemGenerator.bcsv ==&lt;br /&gt;
Relates on items that can be generated from the actor.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| ActionName || string || The action that has to be committed for the item to spawn. These actions are defined through code.&lt;br /&gt;
|-&lt;br /&gt;
| ItemInfoName || string || The item to spawn. See [[#Item_Info|Item Info]].&lt;br /&gt;
|-&lt;br /&gt;
| JointName || string || The joint where the item is spawned.&lt;br /&gt;
|-&lt;br /&gt;
| Count || int || The number of said item to spawn.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Item Info ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| Coinx1 || Spawns a single coin.&lt;br /&gt;
|-&lt;br /&gt;
| StarPiecex1 || Spawns a single star piece.&lt;br /&gt;
|-&lt;br /&gt;
| StarPiecex3 || Spawns three star pieces.&lt;br /&gt;
|-&lt;br /&gt;
| StarPiecex6 || Spawns six star pieces.&lt;br /&gt;
|-&lt;br /&gt;
| StarPiecex10 || Spawns ten star pieces.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=ActorInfo&amp;diff=835</id>
		<title>ActorInfo</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=ActorInfo&amp;diff=835"/>
		<updated>2025-03-19T19:01:00Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: /* InitActor.bcsv */ Bloom note&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Files]]&lt;br /&gt;
&lt;br /&gt;
= ActorInfo =&lt;br /&gt;
&#039;&#039;&#039;ActorInfo&#039;&#039;&#039; is a folder that only exists in &#039;&#039;SMG2&#039;&#039;. it contains files that control certain aspects of objects. Below is a list of every file that can be put in this folder.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Filename !! Uses !! Description&lt;br /&gt;
|-&lt;br /&gt;
| ActionBgmCtrl.bcsv || 13 || Used by bosses to start their music&lt;br /&gt;
|-&lt;br /&gt;
| ActionFlagCtrl.bcsv || 111 ||&lt;br /&gt;
|-&lt;br /&gt;
| ActionFootPrintCtrl.bcsv || 1 || Used by &#039;&#039;DinoPackunBaby&#039;&#039; to assist in controlling the footsteps&lt;br /&gt;
|-&lt;br /&gt;
| ActionScreenBlurCtrl.bcsv || 21 ||&lt;br /&gt;
|-&lt;br /&gt;
| ActorAnimCtrl.bcsv || 109 ||&lt;br /&gt;
|-&lt;br /&gt;
| ActorHitReactionCtrl.bcsv || 139 ||&lt;br /&gt;
|-&lt;br /&gt;
| ActorParam.bcsv || 5 ||&lt;br /&gt;
|-&lt;br /&gt;
| ActorStateWalk.bcsv || 1 || Used by &#039;&#039;DinoPackunBaby&#039;&#039; to assist in controlling his walk&lt;br /&gt;
|-&lt;br /&gt;
| AnimBlendTriple.bcsv || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
| InitActor.bcsv || 529 || Contains information on how the actor gets initialized.&lt;br /&gt;
|-&lt;br /&gt;
| InitActor2D.bcsv || 1 || Contains information on how the 2D actor gets initialized. Only used by &#039;&#039;Tongari&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| InitActor2DWater.bcsv || 1 || Contains information on how the 2D Water actor gets initialized. Only used by &#039;&#039;GhostAttackGhost&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| InitActorCollection.bcsv || 7 || Contains information on how the Collection actor gets initialized. Used by all 7 Powerups that appear on &#039;&#039;Starship Mario&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| InitActorDemo.bcsv || 10 || Contains information on how the Demo actor gets initialized. Used by &#039;&#039;GrandStar&#039;&#039;, &#039;&#039;PowerStar&#039;&#039;, and some other objects used in the game&#039;s main cutscenes.&lt;br /&gt;
|-&lt;br /&gt;
| InitActorDemoBellyDragon.bcsv || 2 || Contains information on how the Demo actor gets initialized during a Gobblegut cutscene. Only used by &#039;&#039;KoopaJr&#039;&#039; and &#039;&#039;KoopaJrRobotPod&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| InitActorDemoTitle.bcsv || 3 || Contains information on how the Demo actor gets initialized while on the Title Screen. Only used by &#039;&#039;DemoTitlePlanet&#039;&#039;, &#039;&#039;Tico&#039;&#039;, and &#039;&#039;Yoshi&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| InitActorDemoWithShadow.bcsv || 1 || Contains information on how the Demo actor gets initialized with a shadow. Only used by &#039;&#039;PowerStar&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| InitActorDummy.bcsv || 5 || Contains information on how the actor gets initialized in dummy form. Used by &#039;&#039;KinokoLifeUp&#039;&#039;, &#039;&#039;KinokoOneUp&#039;&#039;, &#039;&#039;Kuribo&#039;&#039;, &#039;&#039;PowerStar&#039;&#039;, and &#039;&#039;Tico&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| InitActorExit.bcsv || 1 || Contains information on how the exit actor gets initialized. Only used by &#039;&#039;PetitPorter&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| InitCollision.bcsv || 101 || Contains information on how the collision for this object is created&lt;br /&gt;
|-&lt;br /&gt;
| InitScale.bcsv || 6 || Contains a Vector3 that represents a size scale.&lt;br /&gt;
|-&lt;br /&gt;
| InitSensor.bcsv || 303 || Contains information on how to setup hitboxes for this object.&lt;br /&gt;
|-&lt;br /&gt;
| InitStageEffectCamera.bcsv || 11 || Contains information on how this object interacts with the camera.&lt;br /&gt;
|-&lt;br /&gt;
| InitStageEffectPad.bcsv || 12 || Contains information on pad. Unknown for sure, but it looks to be related to Wiimote Rumbling&lt;br /&gt;
|-&lt;br /&gt;
| InitSwitch.bcsv || 114 || Contains information on which switches are used and how&lt;br /&gt;
|-&lt;br /&gt;
| ItemGenerator.bcsv || 77 || Contains information on what objects to spawn when certain events are triggered (such as &amp;quot;Death by Spin Attack&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
| PadAndCameraCtrl.bcsv || 105 ||&lt;br /&gt;
|-&lt;br /&gt;
| Reaction.bcsv || 3 ||&lt;br /&gt;
|-&lt;br /&gt;
| Sequence.bcsv || 2 || Used for the Chimp Ice skating minigames&lt;br /&gt;
|-&lt;br /&gt;
| Shadow.bcsv || 256 || Contains information on how to create shadows for this object. Useful for &#039;&#039;&#039;ProductMapObjDataTable&#039;&#039;&#039; classes such as &#039;&#039;SimpleMapObj&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| (ObjectName).banmt || 234 ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== InitActor.bcsv ==&lt;br /&gt;
InitActor.bcsv and it&#039;s variants (like InitActor2D.bcsv) are all structured the same way, and define certain values for the object during it&#039;s initialization.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Name !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| InitFunction || string || The name of the function that this entry corresponds to.&amp;lt;br&amp;gt;Functions:&amp;lt;br&amp;gt;&#039;&#039;&#039;Rail&#039;&#039;&#039;: Only uses &#039;&#039;Data&#039;&#039;. &amp;quot;&amp;quot; for &amp;quot;Doesn&#039;t use Rails&amp;quot;. &amp;quot;Use&amp;quot; for &amp;quot;Can use Rails&amp;quot;. &amp;quot;Needs&amp;quot; for &amp;quot;Requires a Rail&amp;quot;&amp;lt;br&amp;gt;&#039;&#039;&#039;DefaultPos&#039;&#039;&#039;: Only uses &#039;&#039;Data&#039;&#039;. &amp;quot;o&amp;quot; for Enabled, &amp;quot;x&amp;quot; for Disabled.&amp;lt;br&amp;gt;&#039;&#039;&#039;UseScaleForParam&#039;&#039;&#039;: Only uses &#039;&#039;Data&#039;&#039;. &amp;quot;o&amp;quot; for Enabled, &amp;quot;x&amp;quot; for Disabled.&amp;lt;br&amp;gt;&#039;&#039;&#039;Model&#039;&#039;&#039;: Only uses &#039;&#039;Data&#039;&#039;. The name of the model to use.&amp;lt;br&amp;gt;&#039;&#039;&#039;Executor&#039;&#039;&#039;: Only uses &#039;&#039;Data&#039;&#039;. Check the executor list below this table for more details.&amp;lt;br&amp;gt;&#039;&#039;&#039;Light&#039;&#039;&#039;: Only uses &#039;&#039;Data&#039;&#039;. The name of the Light Type to use.&amp;lt;br&amp;gt;&#039;&#039;&#039;Binder&#039;&#039;&#039;: &amp;quot;o&amp;quot; for Enabled, &amp;quot;x&amp;quot; for Disabled.&amp;lt;br&amp;gt;&#039;&#039;&#039;Effect&#039;&#039;&#039;: The name of the Effect group to use.&amp;lt;br&amp;gt;&#039;&#039;&#039;Sound&#039;&#039;&#039;:The name of the Sound group to use. You can offset the sound from the object position using the Param00VecX, Y, and Z.&amp;lt;br&amp;gt;&#039;&#039;&#039;Clipping&#039;&#039;&#039;: Only uses &#039;&#039;Param00F32&#039;&#039;. The distance that this object will clip out at.&amp;lt;br&amp;gt;&#039;&#039;&#039;GroupClipping&#039;&#039;&#039;:&amp;lt;br&amp;gt;&#039;&#039;&#039;DemoSimpleCastAll&#039;&#039;&#039;:&amp;lt;br&amp;gt;&#039;&#039;&#039;StarPointer&#039;&#039;&#039;:&amp;lt;br&amp;gt;&#039;&#039;&#039;DebugNode&#039;&#039;&#039;: Useless.&lt;br /&gt;
|-&lt;br /&gt;
| Data || string || The main data input. Most InitFunctions use this.&lt;br /&gt;
|-&lt;br /&gt;
| Param00Int || int || An integer parameter&lt;br /&gt;
|-&lt;br /&gt;
| Param00F32 || float || A float parameter&lt;br /&gt;
|-&lt;br /&gt;
| Param01F32 || float || A second float parameter&lt;br /&gt;
|-&lt;br /&gt;
| Param00Str || string || A string parameter, different from the Data parameter.&lt;br /&gt;
|-&lt;br /&gt;
| Param00VecX || float || The X Value of a Vector3 parameter.&lt;br /&gt;
|-&lt;br /&gt;
| Param00VecY || float || The Y Value of a Vector3 parameter.&lt;br /&gt;
|-&lt;br /&gt;
| Param00VecZ || float || The Z Value of a Vector3 parameter.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Executor !! Description&lt;br /&gt;
|-&lt;br /&gt;
| MapObj || &lt;br /&gt;
|-&lt;br /&gt;
| MapObjStrongLight || &lt;br /&gt;
|-&lt;br /&gt;
| MapObjNoShadow || This object does not get shadows applied to it&lt;br /&gt;
|-&lt;br /&gt;
| MapObjNoSilhouetted || &lt;br /&gt;
|-&lt;br /&gt;
| MapObjDecoration || &lt;br /&gt;
|-&lt;br /&gt;
| MapObjNoCalcAnim || &lt;br /&gt;
|-&lt;br /&gt;
| MapObjMovement || &lt;br /&gt;
|-&lt;br /&gt;
| MapObjNoMovement || &lt;br /&gt;
|-&lt;br /&gt;
| MapObjIndirect || &lt;br /&gt;
|-&lt;br /&gt;
| MapObjIndirectStrongLight || &lt;br /&gt;
|-&lt;br /&gt;
| MapObjNoMovementNoCalcAnimIndirectStrongLight || &lt;br /&gt;
|-&lt;br /&gt;
| ClippedMapParts || &lt;br /&gt;
|-&lt;br /&gt;
| CollisionMapObj || &lt;br /&gt;
|-&lt;br /&gt;
| CollisionMapObjWeakLight || &lt;br /&gt;
|-&lt;br /&gt;
| CollisionMapObjNoShadow || &lt;br /&gt;
|-&lt;br /&gt;
| CollisionMapObjNoShadowNoCalcAnim || &lt;br /&gt;
|-&lt;br /&gt;
| CollisionMapObjIndirectNoCalcAnim || &lt;br /&gt;
|-&lt;br /&gt;
| Enemy || &lt;br /&gt;
|-&lt;br /&gt;
| EnemyDecoration || &lt;br /&gt;
|-&lt;br /&gt;
| EnemyIndirect || &lt;br /&gt;
|-&lt;br /&gt;
| EnemySilhouette || &lt;br /&gt;
|-&lt;br /&gt;
| EnemyNoShadow || &lt;br /&gt;
|-&lt;br /&gt;
| EnemyNoMovement || &lt;br /&gt;
|-&lt;br /&gt;
| Boss || &lt;br /&gt;
|-&lt;br /&gt;
| NpcNoShadow || &lt;br /&gt;
|-&lt;br /&gt;
| NpcNoCalcAnim || &lt;br /&gt;
|-&lt;br /&gt;
| Ride || &lt;br /&gt;
|-&lt;br /&gt;
| RideSilhouette || &lt;br /&gt;
|-&lt;br /&gt;
| Planet || &lt;br /&gt;
|-&lt;br /&gt;
| PlanetIndirect || &lt;br /&gt;
|-&lt;br /&gt;
| DynamicMapObj || &lt;br /&gt;
|-&lt;br /&gt;
| PlayerDecoration || &lt;br /&gt;
|-&lt;br /&gt;
| Item || &lt;br /&gt;
|-&lt;br /&gt;
| Bloom || Renders the object on the Bloom pass, which requires a BloomArea to activate.&lt;br /&gt;
|-&lt;br /&gt;
| BossBussun || &lt;br /&gt;
|-&lt;br /&gt;
| CrystalItem || &lt;br /&gt;
|-&lt;br /&gt;
| FireBarBall || &lt;br /&gt;
|-&lt;br /&gt;
| GliBird || &lt;br /&gt;
|-&lt;br /&gt;
| HipDropStarMove || &lt;br /&gt;
|-&lt;br /&gt;
| StoryBook || &lt;br /&gt;
|-&lt;br /&gt;
| StoryBookFilter || &lt;br /&gt;
|-&lt;br /&gt;
| WorldMapMiniObj || &lt;br /&gt;
|-&lt;br /&gt;
| GhostMazeMask || &lt;br /&gt;
|-&lt;br /&gt;
| Crystal || &lt;br /&gt;
|-&lt;br /&gt;
| Tamakoro || &lt;br /&gt;
|-&lt;br /&gt;
| SuperDreamer || &lt;br /&gt;
|-&lt;br /&gt;
| Ghost2DWater || &lt;br /&gt;
|-&lt;br /&gt;
| WoodLogBridge || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Shadow.bcsv ==&lt;br /&gt;
Shadow.bcsv is used to create shadows for objects.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Name !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| Name || string || Shadow name&lt;br /&gt;
|-&lt;br /&gt;
| GroupName || string || &lt;br /&gt;
|-&lt;br /&gt;
| Joint || string || Name of the joint to attach to&lt;br /&gt;
|-&lt;br /&gt;
| DropStart || float || How far until the shadow starts to drop&lt;br /&gt;
|-&lt;br /&gt;
| DropLength || float || How far the shadow drops for&lt;br /&gt;
|-&lt;br /&gt;
| FollowScale || int || Set to 1 to make the shadow scale with the model (if scaled in an editor from the original size)&lt;br /&gt;
|-&lt;br /&gt;
| SyncShow || int || Set to 1 to make the shadow clip in and out with it&#039;s parent model&lt;br /&gt;
|-&lt;br /&gt;
| Gravity || int || &lt;br /&gt;
|-&lt;br /&gt;
| Collision || int || &lt;br /&gt;
|-&lt;br /&gt;
| DropOffsetX || float || X Offset to drop the shadow at.&lt;br /&gt;
|-&lt;br /&gt;
| DropOffsetY || float || Y Offset to drop the shadow at.&lt;br /&gt;
|-&lt;br /&gt;
| DropOffsetZ || float || Z Offset to drop the shadow at.&lt;br /&gt;
|-&lt;br /&gt;
| VolumeStart || float ||&lt;br /&gt;
|-&lt;br /&gt;
| VolumeEnd || float ||&lt;br /&gt;
|-&lt;br /&gt;
| VolumeCut || int || Set to 1&lt;br /&gt;
|-&lt;br /&gt;
| Type || string || &#039;&#039;&#039;VolumeBox&#039;&#039;&#039;: A Box where any shadow responsive object that enters it gets the shadow applied&amp;lt;br&amp;gt;&#039;&#039;&#039;VolumeSphere&#039;&#039;&#039;:&amp;lt;br&amp;gt;&#039;&#039;&#039;VolumeCylinder&#039;&#039;&#039;:&amp;lt;br&amp;gt;&#039;&#039;&#039;VolumeOval&#039;&#039;&#039;:&amp;lt;br&amp;gt;&#039;&#039;&#039;VolumeLine&#039;&#039;&#039;:&amp;lt;br&amp;gt;&#039;&#039;&#039;VolumeOvalPole&#039;&#039;&#039;:&amp;lt;br&amp;gt;&#039;&#039;&#039;VolumeFlatModel&#039;&#039;&#039;: Define the shadow using a shadow model&amp;lt;br&amp;gt;&#039;&#039;&#039;SurfaceCircle&#039;&#039;&#039;:&amp;lt;br&amp;gt;&#039;&#039;&#039;SurfaceOval&#039;&#039;&#039;:&lt;br /&gt;
|-&lt;br /&gt;
| SizeX || float || X Scale of the shadow&lt;br /&gt;
|-&lt;br /&gt;
| SizeY || float || Y Scale of the shadow&lt;br /&gt;
|-&lt;br /&gt;
| SizeZ || float || Z Scale of the shadow&lt;br /&gt;
|-&lt;br /&gt;
| Radius || float ||&lt;br /&gt;
|-&lt;br /&gt;
| LineStart || string || &lt;br /&gt;
|-&lt;br /&gt;
| LineEnd || string || &lt;br /&gt;
|-&lt;br /&gt;
| LineStartRadius || float ||&lt;br /&gt;
|-&lt;br /&gt;
| LineEndRadius || float ||&lt;br /&gt;
|-&lt;br /&gt;
| Model || string || Used to specify what model to use for the Shadow&lt;br /&gt;
|-&lt;br /&gt;
| LocalRotateX || float ||&lt;br /&gt;
|-&lt;br /&gt;
| LocalRotateY || float ||&lt;br /&gt;
|-&lt;br /&gt;
| LocalRotateZ || float ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== InitSensor.bcsv ==&lt;br /&gt;
InitSensor.bcsv defines all of the HitSensors that are applied to the actor.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| SensorName || string ||&lt;br /&gt;
|-&lt;br /&gt;
| SensorType || string || &lt;br /&gt;
|-&lt;br /&gt;
| Radius || float || The radius of the sensor.&lt;br /&gt;
|-&lt;br /&gt;
| HitSensorNumMax || int || The maximum amount of other sensors that can interact with this sensor.&lt;br /&gt;
|-&lt;br /&gt;
| JointName || string || The joint to attach this sensor to on the model. &lt;br /&gt;
|-&lt;br /&gt;
| Callback || string ||&lt;br /&gt;
|-&lt;br /&gt;
| OffsetX || float || Offset X of the sensor.&lt;br /&gt;
|-&lt;br /&gt;
| OffsetY || float || Offset Y of the sensor.&lt;br /&gt;
|-&lt;br /&gt;
| OffsetZ || float || Offset Z of the sensor.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== InitSwitch.bcsv ==&lt;br /&gt;
InitSwitch.bcsv defines all of the switches that can be used with the actor.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| SwitchName || string || The name of the switch.&lt;br /&gt;
|-&lt;br /&gt;
| Usage || string || The way that the switch is used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Usage Types ===&lt;br /&gt;
Below is a table of the available options for the Usage field.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| UseRead || The switch type can be read from.&lt;br /&gt;
|-&lt;br /&gt;
| NeedRead || The switch type is &#039;&#039;&#039;required&#039;&#039;&#039; to read from.&lt;br /&gt;
|-&lt;br /&gt;
| UseWrite || The switch type can be written to.&lt;br /&gt;
|-&lt;br /&gt;
| NeedWrite || The switch type is &#039;&#039;&#039;required&#039;&#039;&#039; to write to.&lt;br /&gt;
|-&lt;br /&gt;
| UseWriteAuto || The switch type can be automatically triggered.&lt;br /&gt;
|-&lt;br /&gt;
| NeedWriteAuto || The switch type is &#039;&#039;&#039;required&#039;&#039;&#039; to automatically trigger.&lt;br /&gt;
|-&lt;br /&gt;
| x || Switch type is disabled.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Availability ===&lt;br /&gt;
Certain Switches only support specific Usage Types. This table details which switches can use which Usage Types.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Switch Name !! Available Usage Types&lt;br /&gt;
|-&lt;br /&gt;
| SW_APPEAR || &#039;&#039;&#039;UseRead&#039;&#039;&#039; (calls &#039;&#039;MR::useStageSwitchReadAppear&#039;&#039;)&amp;lt;br/&amp;gt;&#039;&#039;&#039;NeedRead&#039;&#039;&#039; (calls &#039;&#039;MR::needStageSwitchReadAppear&#039;&#039;)&lt;br /&gt;
|-&lt;br /&gt;
| SW_DEAD || &#039;&#039;&#039;UseWrite&#039;&#039;&#039; (calls &#039;&#039;MR::useStageSwitchWriteDead&#039;&#039;)&amp;lt;br/&amp;gt;&#039;&#039;&#039;NeedWrite&#039;&#039;&#039; (calls &#039;&#039;MR::needStageSwitchWriteDead&#039;&#039;)&amp;lt;br/&amp;gt;&#039;&#039;&#039;UseWriteAuto&#039;&#039;&#039; (calls &#039;&#039;MR::useStageSwitchWriteAutoDead&#039;&#039;)&amp;lt;br/&amp;gt;&#039;&#039;&#039;NeedWriteAuto&#039;&#039;&#039; (calls &#039;&#039;MR::needStageSwitchWriteAutoDead&#039;&#039;)&lt;br /&gt;
|-&lt;br /&gt;
| SW_A || &#039;&#039;&#039;UseRead&#039;&#039;&#039; (calls &#039;&#039;MR::initUseStageSwitchReadA&#039;&#039;)&amp;lt;br/&amp;gt;&#039;&#039;&#039;UseWrite&#039;&#039;&#039; (calls &#039;&#039;MR::initUseStageSwitchWriteA&#039;&#039;)&amp;lt;br/&amp;gt;&#039;&#039;&#039;NeedRead&#039;&#039;&#039; (calls &#039;&#039;MR::needStageSwitchReadA&#039;&#039;)&amp;lt;br/&amp;gt;&#039;&#039;&#039;NeedWrite&#039;&#039;&#039; (calls &#039;&#039;MR::needStageSwitchWriteA&#039;&#039;)&lt;br /&gt;
|-&lt;br /&gt;
| SW_B || &#039;&#039;&#039;UseRead&#039;&#039;&#039; (calls &#039;&#039;MR::useStageSwitchReadB&#039;&#039;)&amp;lt;br/&amp;gt;&#039;&#039;&#039;UseWrite&#039;&#039;&#039; (calls &#039;&#039;MR::initUseStageSwitchWriteB&#039;&#039;)&amp;lt;br/&amp;gt;&#039;&#039;&#039;NeedRead&#039;&#039;&#039; (calls &#039;&#039;MR::needStageSwitchReadB&#039;&#039;)&amp;lt;br/&amp;gt;&#039;&#039;&#039;NeedWrite&#039;&#039;&#039; (calls &#039;&#039;MR::needStageSwitchWriteB&#039;&#039;)&lt;br /&gt;
|-&lt;br /&gt;
| SW_AWAKE&amp;lt;br/&amp;gt;(Optional) || &#039;&#039;&#039;UseRead&#039;&#039;&#039; (calls &#039;&#039;MR::useStageSwitchAwake&#039;&#039;)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== ItemGenerator.bcsv ==&lt;br /&gt;
Relates on items that can be generated from the actor.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| ActionName || string || The action that has to be committed for the item to spawn. These actions are defined through code.&lt;br /&gt;
|-&lt;br /&gt;
| ItemInfoName || string || The item to spawn. See [[#Item_Info|Item Info]].&lt;br /&gt;
|-&lt;br /&gt;
| JointName || string || The joint where the item is spawned.&lt;br /&gt;
|-&lt;br /&gt;
| Count || int || The number of said item to spawn.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Item Info ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| Coinx1 || Spawns a single coin.&lt;br /&gt;
|-&lt;br /&gt;
| StarPiecex1 || Spawns a single star piece.&lt;br /&gt;
|-&lt;br /&gt;
| StarPiecex3 || Spawns three star pieces.&lt;br /&gt;
|-&lt;br /&gt;
| StarPiecex6 || Spawns six star pieces.&lt;br /&gt;
|-&lt;br /&gt;
| StarPiecex10 || Spawns ten star pieces.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=834</id>
		<title>BMD/BDL (File Format)</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=834"/>
		<updated>2025-03-01T23:39:21Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: /* INF1 - Scene Information */ Added missing Offset&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:File formats]]&lt;br /&gt;
{{WIP}}&lt;br /&gt;
&lt;br /&gt;
BMD (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;M&#039;&#039;&#039;o&#039;&#039;&#039;d&#039;&#039;&#039;el) and BDL (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;D&#039;&#039;&#039;isplay &#039;&#039;&#039;L&#039;&#039;&#039;ist) are two 3D model formats used in &#039;&#039;Super Mario Galaxy&#039;&#039; and &#039;&#039;Super Mario Galaxy 2&#039;&#039;, among a few other &#039;&#039;Wii&#039;&#039; and &#039;&#039;GameCube&#039;&#039; games, such as &#039;&#039;Super Mario Sunshine&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These two formats hold the same data, except BDL contains an additional set of data which is used for faster rendering speeds.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Super Mario Galaxy&#039;&#039; &amp;amp; &#039;&#039;Super Mario Galaxy 2&#039;&#039; contain J3DLoader versions 21 and 26.&lt;br /&gt;
&lt;br /&gt;
== File Header ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || The magic that tells the game which format this file is. (ASCII)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bmd2&#039;&#039;&#039; for BMD (J3DLoader V21)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bmd3&#039;&#039;&#039; for BMD (J3DLoader v26)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bdl4&#039;&#039;&#039; for BDL (J3DLoader v26)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int32 || The total size of the file&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || The number of chunks present in this file.&amp;lt;br/&amp;gt;&#039;&#039;&#039;8&#039;&#039;&#039; for BMD&amp;lt;br/&amp;gt;&#039;&#039;&#039;9&#039;&#039;&#039; for BDL&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Subversion Header ===&lt;br /&gt;
This part of the header is not used, and can be anything.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || A 4 character value representing the Subversion. Usually SVR3 for SMG/2.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Byte[12] || Twelve bytes of padding. Usually these are &#039;&#039;&#039;0xFF&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== INF1 - Scene Information ==&lt;br /&gt;
The &#039;&#039;&#039;Inf&#039;&#039;&#039;ormation section hosts a hierarchy of Joints, Materials, and Shapes, which are used to render the model.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;INF1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || [[#J3DLoader%20Flags|J3DLoader Flags]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Matrix Group Count&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Vertex Count&amp;lt;br/&amp;gt;Always equals the number of entries in the &amp;quot;POSITION&amp;quot; [[#Buffer%20Formats|data buffer]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Relative offset to Scene Hierarchy&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== J3DLoader Flags ===&lt;br /&gt;
The J3DLoader contains several flags which affect how models are handled. There are more than what are shown here, however, those must be applied by the game itself in the code.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000000 || No flags applied (TODO: Check if this defaults to basic matrix calculation)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000001 || Use Autodesk Softimage matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000010 || Use Autodesk Maya matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000100 || Use Basic matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000001000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000010000 || UseImmidiateMtx (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000100000 || UsePostTexMtx (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000001000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000010000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000100000000 || NoMatrixTransform (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000001000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000010000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000100000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0001000000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0010000000000000 || DoBdlMaterialCalc&lt;br /&gt;
|-&lt;br /&gt;
| 0b0100000000000000 || NoBdlMaterialPatch - If set, skips the call to &#039;&#039;&#039;J3DModelLoader::readPatchedMaterial&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0b1000000000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
For all BMD files, the game always includes load flags &#039;&#039;Material_PE_Full&#039;&#039;, &#039;&#039;Material_UseIndirect&#039;&#039;, &#039;&#039;UseUniqueMaterials&#039;&#039;, and &#039;&#039;UNKNOWN_21&#039;&#039;.&amp;lt;br/&amp;gt;&lt;br /&gt;
For all BDL files, the game always includes load flags &#039;&#039;Material_UseIndirect&#039;&#039;, and &#039;&#039;UseUniqueMaterials&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;gt; &#039;&#039;Note: Changing the load flags by changing the code doesn&#039;t seem to do much.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== VTX1 - Vertex Data ==&lt;br /&gt;
The &#039;&#039;&#039;V&#039;&#039;&#039;er&#039;&#039;&#039;t&#039;&#039;&#039;e&#039;&#039;&#039;x&#039;&#039;&#039; Data section contains the actual number values used for the properties of the geometry. It also includes the information on how the values are formatted.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;VTX1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int32 || Buffer Format list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || &amp;quot;POSITION&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || &amp;quot;NORMAL&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || &amp;quot;TANGENT&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || &amp;quot;COLOR_0&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Int32 || &amp;quot;COLOR_1&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Int32 || &amp;quot;TEXCOORD_0&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Int32 || &amp;quot;TEXCOORD_1&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Int32 || &amp;quot;TEXCOORD_2&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C || Int32 || &amp;quot;TEXCOORD_3&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x30 || Int32 || &amp;quot;TEXCOORD_4&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x34 || Int32 || &amp;quot;TEXCOORD_5&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x38 || Int32 || &amp;quot;TEXCOORD_6&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C || Int32 || &amp;quot;TEXCOORD_7&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Buffer Formats ===&lt;br /&gt;
Each of the Buffers in this section have a format descriptor. This allows different types of data storage, allowing for smaller files.&lt;br /&gt;
&lt;br /&gt;
Each format descriptor contains an Attribute Target, a Component Count, a Data Type, and a Mantissa shifter (to allow floats to be stored as smaller datatypes compared to FLOAT).&amp;lt;br/&amp;gt;Only one descriptor can exist for each attribute.&lt;br /&gt;
&lt;br /&gt;
The Attribute Target tells the game what this buffer is used for.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Attribute Targets&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000009 || POSITION || This buffer represents the positions of vertices in the model. Basically required for all visual models.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000A || NORMAL || This buffer represents vertex normals, used for the engine&#039;s vertex shading. Not needed if no material requires it.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000B || COLOR_0 || This buffer is available for Vertex Colors.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000C || COLOR_1 || This buffer is available for Vertex Colors.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000D || TEXCOORD_0 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000E || TEXCOORD_1 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000F || TEXCOORD_2 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000010 || TEXCOORD_3 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000011 || TEXCOORD_4 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000012 || TEXCOORD_5 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000013 || TEXCOORD_6 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000014 || TEXCOORD_7 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000019 || TANGENT || &#039;&#039;Currently unknown exactly what goes in here.&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x000000FF || List End || A buffer using this target will end the descriptor list.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The component count tells the game how many parts of the component that there are. Note that the values are considered based on the attribute target they&#039;re assigned to.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Component Count&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || POSITION_XY || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || POSITION_XYZ || Represents a position in 3D space with 3 values: X, Y, and Z.&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || NORMAL_XYZ || Represents a normal vector in 3D space with 3 values: X, Y, and Z.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || NORMAL_NBT || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || NORMAL_NBT3 || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || COLOR_RGB || Represents a color value with only Red, Green, and Blue values.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || COLOR_RGBA || Represents a color value with Red, Green, Blue, and Alpha values.&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || TEXCOORD_S || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || TEXCOORD_ST || Represents a UV texture coordinate with 2 values: X and Y.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Data Type tells the game how many bytes each value is, in the sense that an Int32 is 4 bytes, a Int16 is 2 bytes, a Float is 4 bytes, etc.&amp;lt;br/&amp;gt;Note that the Color values have a different set of options.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Data Types&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || UInt8 || 1 byte per value (0 to 255)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || Int8 || 1 byte per value (-128 to 127)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || UInt16 || 2 bytes per value (0 to 65535)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || Int16 || 2 bytes per value (-32,768 to 32,767)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || Float || 4 bytes per value&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || RGB565 || 2 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || RGB8 || 3 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || RGBX8 || 3 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || RGBA4 || 2 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || RGBA6 || 4 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000005 || RGBA8 || 4 bytes per color&lt;br /&gt;
|}&lt;br /&gt;
&amp;gt; &#039;&#039;Note: Both games require colors to be 4 bytes wide at all times, so changing from RGBA8 is worthless.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== EVP1 - Skinning Envelopes ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;EVP1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Envelopes stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || &amp;quot;Joint Count&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || &amp;quot;&#039;Joint Count&#039; list index&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || &amp;quot;Joint Weight&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || &amp;quot;Inverse Bind Matrices&amp;quot; list offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== DRW1 - Skinning Assignments ==&lt;br /&gt;
&lt;br /&gt;
== JNT1 - Joint Hierarchy ==&lt;br /&gt;
The &#039;&#039;&#039;J&#039;&#039;&#039;oi&#039;&#039;&#039;nt&#039;&#039;&#039; Hierarchy section defines the rigging skeleton of a model. There can only be one skeleton per model.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;JNT1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Joints stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Joint Data table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Remap table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Name table offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Joint Data ===&lt;br /&gt;
Each joint includes positional data and a bounding box which is used by the game for determining rendering range automatically.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int16 || Matrix Type&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || UInt8 || Parent Scale inheritance&amp;lt;br/&amp;gt;0 = Follow parent joint&#039;s scale&amp;lt;br/&amp;gt;1 = Ignore parent joint&#039;s scale&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt8 || Padding (0xFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Float || Scale X&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Float || Scale Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Float || Scale Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int16 || Rotation X&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || Int16 || Rotation Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int16 || Rotation Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x16 || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Float || Translation X&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Float || Translation Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Float || Translation Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Float || Bounding Sphere&amp;lt;br/&amp;gt;Should encapsulate all vertices that the joint affects&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Float || Bounding Box Minimum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C || Float || Bounding Box Minimum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x30 || Float || Bounding Box Minimum Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x34 || Float || Bounding Box Maximum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x38 || Float || Bounding Box Maximum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C || Float || Bounding Box Maximum Z&lt;br /&gt;
|}&lt;br /&gt;
Rotation is stored between -0x7FFF and 0x7FFF, which ranges -180 degrees and 180 degrees.&lt;br /&gt;
&lt;br /&gt;
== SHP1 - Shape Information==&lt;br /&gt;
The &#039;&#039;&#039;Sh&#039;&#039;&#039;a&#039;&#039;&#039;p&#039;&#039;&#039;e Information section determines how to use the data in the [[#VTX1_-_Vertex_Data|VTX1]] section to create shapes.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;SHP1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Shapes stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Shape Data table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Remap table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Name table offset&amp;lt;br/&amp;gt;(Generally not used, and thus set to 0)&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || &amp;quot;Vertex Attribute table&amp;quot; offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Int32 || &amp;quot;Weight Matrix data table&amp;quot; offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Int32 || &amp;quot;GXDisplayList data buffer&amp;quot; offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Int32 || &amp;quot;Weight Matrix group table&amp;quot; offset (entry count must equal the entry count of the GXDisplayList group table)&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Int32 || &amp;quot;GXDisplayList group table&amp;quot; offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Shape Data ===&lt;br /&gt;
Each shape denotes a Matrix Calculation type, which is used for Billboarding, as well as multi-joint skinning.&amp;lt;br/&amp;gt;A shape also contains a group of GXDisplayList primitives, and can have multiple groups if the geometry needs to be weighted to more than 10 [[#DRW1_-_Skinning_Assignments|DRW1]] matrices.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;TODO: Figure out what happens in the event that more than 10 are needed. Is it just straight up not allowed?&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt8 || Matrix Type&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || UInt8 || Padding (0xFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Int16 || &amp;quot;GXDisplayList group&amp;quot; count&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int16 || Vertex Attribute offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Int16 || First &amp;quot;Weight Matrix group table&amp;quot; index&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || First &amp;quot;GXDisplayList group&amp;quot; index&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Float || Bounding Sphere&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Float || Bounding Box Minimum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Float || Bounding Box Minimum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Float || Bounding Box Minimum Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Float || Bounding Box Maximum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Float || Bounding Box Maximum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Float || Bounding Box Maximum Z&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== MAT2 - Material List (Old) ==&lt;br /&gt;
Technically supported by the game, but not known to be used by any model.&lt;br /&gt;
&lt;br /&gt;
== MAT3 - Material List ==&lt;br /&gt;
&lt;br /&gt;
== MDL3 - Display List ==&lt;br /&gt;
&lt;br /&gt;
== TEX1 - Texture Data ==&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=833</id>
		<title>BMD/BDL (File Format)</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=833"/>
		<updated>2025-03-01T23:35:52Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: Added note about how INF1 counts &amp;quot;Verticies&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:File formats]]&lt;br /&gt;
{{WIP}}&lt;br /&gt;
&lt;br /&gt;
BMD (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;M&#039;&#039;&#039;o&#039;&#039;&#039;d&#039;&#039;&#039;el) and BDL (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;D&#039;&#039;&#039;isplay &#039;&#039;&#039;L&#039;&#039;&#039;ist) are two 3D model formats used in &#039;&#039;Super Mario Galaxy&#039;&#039; and &#039;&#039;Super Mario Galaxy 2&#039;&#039;, among a few other &#039;&#039;Wii&#039;&#039; and &#039;&#039;GameCube&#039;&#039; games, such as &#039;&#039;Super Mario Sunshine&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These two formats hold the same data, except BDL contains an additional set of data which is used for faster rendering speeds.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Super Mario Galaxy&#039;&#039; &amp;amp; &#039;&#039;Super Mario Galaxy 2&#039;&#039; contain J3DLoader versions 21 and 26.&lt;br /&gt;
&lt;br /&gt;
== File Header ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || The magic that tells the game which format this file is. (ASCII)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bmd2&#039;&#039;&#039; for BMD (J3DLoader V21)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bmd3&#039;&#039;&#039; for BMD (J3DLoader v26)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bdl4&#039;&#039;&#039; for BDL (J3DLoader v26)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int32 || The total size of the file&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || The number of chunks present in this file.&amp;lt;br/&amp;gt;&#039;&#039;&#039;8&#039;&#039;&#039; for BMD&amp;lt;br/&amp;gt;&#039;&#039;&#039;9&#039;&#039;&#039; for BDL&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Subversion Header ===&lt;br /&gt;
This part of the header is not used, and can be anything.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || A 4 character value representing the Subversion. Usually SVR3 for SMG/2.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Byte[12] || Twelve bytes of padding. Usually these are &#039;&#039;&#039;0xFF&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== INF1 - Scene Information ==&lt;br /&gt;
The &#039;&#039;&#039;Inf&#039;&#039;&#039;ormation section hosts a hierarchy of Joints, Materials, and Shapes, which are used to render the model.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;INF1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || [[#J3DLoader%20Flags|J3DLoader Flags]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Matrix Group Count&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Vertex Count&amp;lt;br/&amp;gt;Always equals the number of entries in the &amp;quot;POSITION&amp;quot; [[#Buffer%20Formats|data buffer]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== J3DLoader Flags ===&lt;br /&gt;
The J3DLoader contains several flags which affect how models are handled. There are more than what are shown here, however, those must be applied by the game itself in the code.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000000 || No flags applied (TODO: Check if this defaults to basic matrix calculation)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000001 || Use Autodesk Softimage matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000010 || Use Autodesk Maya matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000100 || Use Basic matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000001000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000010000 || UseImmidiateMtx (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000100000 || UsePostTexMtx (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000001000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000010000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000100000000 || NoMatrixTransform (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000001000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000010000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000100000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0001000000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0010000000000000 || DoBdlMaterialCalc&lt;br /&gt;
|-&lt;br /&gt;
| 0b0100000000000000 || NoBdlMaterialPatch - If set, skips the call to &#039;&#039;&#039;J3DModelLoader::readPatchedMaterial&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0b1000000000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
For all BMD files, the game always includes load flags &#039;&#039;Material_PE_Full&#039;&#039;, &#039;&#039;Material_UseIndirect&#039;&#039;, &#039;&#039;UseUniqueMaterials&#039;&#039;, and &#039;&#039;UNKNOWN_21&#039;&#039;.&amp;lt;br/&amp;gt;&lt;br /&gt;
For all BDL files, the game always includes load flags &#039;&#039;Material_UseIndirect&#039;&#039;, and &#039;&#039;UseUniqueMaterials&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;gt; &#039;&#039;Note: Changing the load flags by changing the code doesn&#039;t seem to do much.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== VTX1 - Vertex Data ==&lt;br /&gt;
The &#039;&#039;&#039;V&#039;&#039;&#039;er&#039;&#039;&#039;t&#039;&#039;&#039;e&#039;&#039;&#039;x&#039;&#039;&#039; Data section contains the actual number values used for the properties of the geometry. It also includes the information on how the values are formatted.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;VTX1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int32 || Buffer Format list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || &amp;quot;POSITION&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || &amp;quot;NORMAL&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || &amp;quot;TANGENT&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || &amp;quot;COLOR_0&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Int32 || &amp;quot;COLOR_1&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Int32 || &amp;quot;TEXCOORD_0&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Int32 || &amp;quot;TEXCOORD_1&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Int32 || &amp;quot;TEXCOORD_2&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C || Int32 || &amp;quot;TEXCOORD_3&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x30 || Int32 || &amp;quot;TEXCOORD_4&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x34 || Int32 || &amp;quot;TEXCOORD_5&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x38 || Int32 || &amp;quot;TEXCOORD_6&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C || Int32 || &amp;quot;TEXCOORD_7&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Buffer Formats ===&lt;br /&gt;
Each of the Buffers in this section have a format descriptor. This allows different types of data storage, allowing for smaller files.&lt;br /&gt;
&lt;br /&gt;
Each format descriptor contains an Attribute Target, a Component Count, a Data Type, and a Mantissa shifter (to allow floats to be stored as smaller datatypes compared to FLOAT).&amp;lt;br/&amp;gt;Only one descriptor can exist for each attribute.&lt;br /&gt;
&lt;br /&gt;
The Attribute Target tells the game what this buffer is used for.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Attribute Targets&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000009 || POSITION || This buffer represents the positions of vertices in the model. Basically required for all visual models.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000A || NORMAL || This buffer represents vertex normals, used for the engine&#039;s vertex shading. Not needed if no material requires it.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000B || COLOR_0 || This buffer is available for Vertex Colors.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000C || COLOR_1 || This buffer is available for Vertex Colors.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000D || TEXCOORD_0 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000E || TEXCOORD_1 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000F || TEXCOORD_2 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000010 || TEXCOORD_3 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000011 || TEXCOORD_4 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000012 || TEXCOORD_5 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000013 || TEXCOORD_6 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000014 || TEXCOORD_7 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000019 || TANGENT || &#039;&#039;Currently unknown exactly what goes in here.&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x000000FF || List End || A buffer using this target will end the descriptor list.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The component count tells the game how many parts of the component that there are. Note that the values are considered based on the attribute target they&#039;re assigned to.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Component Count&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || POSITION_XY || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || POSITION_XYZ || Represents a position in 3D space with 3 values: X, Y, and Z.&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || NORMAL_XYZ || Represents a normal vector in 3D space with 3 values: X, Y, and Z.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || NORMAL_NBT || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || NORMAL_NBT3 || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || COLOR_RGB || Represents a color value with only Red, Green, and Blue values.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || COLOR_RGBA || Represents a color value with Red, Green, Blue, and Alpha values.&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || TEXCOORD_S || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || TEXCOORD_ST || Represents a UV texture coordinate with 2 values: X and Y.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Data Type tells the game how many bytes each value is, in the sense that an Int32 is 4 bytes, a Int16 is 2 bytes, a Float is 4 bytes, etc.&amp;lt;br/&amp;gt;Note that the Color values have a different set of options.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Data Types&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || UInt8 || 1 byte per value (0 to 255)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || Int8 || 1 byte per value (-128 to 127)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || UInt16 || 2 bytes per value (0 to 65535)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || Int16 || 2 bytes per value (-32,768 to 32,767)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || Float || 4 bytes per value&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || RGB565 || 2 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || RGB8 || 3 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || RGBX8 || 3 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || RGBA4 || 2 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || RGBA6 || 4 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000005 || RGBA8 || 4 bytes per color&lt;br /&gt;
|}&lt;br /&gt;
&amp;gt; &#039;&#039;Note: Both games require colors to be 4 bytes wide at all times, so changing from RGBA8 is worthless.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== EVP1 - Skinning Envelopes ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;EVP1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Envelopes stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || &amp;quot;Joint Count&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || &amp;quot;&#039;Joint Count&#039; list index&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || &amp;quot;Joint Weight&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || &amp;quot;Inverse Bind Matrices&amp;quot; list offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== DRW1 - Skinning Assignments ==&lt;br /&gt;
&lt;br /&gt;
== JNT1 - Joint Hierarchy ==&lt;br /&gt;
The &#039;&#039;&#039;J&#039;&#039;&#039;oi&#039;&#039;&#039;nt&#039;&#039;&#039; Hierarchy section defines the rigging skeleton of a model. There can only be one skeleton per model.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;JNT1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Joints stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Joint Data table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Remap table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Name table offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Joint Data ===&lt;br /&gt;
Each joint includes positional data and a bounding box which is used by the game for determining rendering range automatically.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int16 || Matrix Type&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || UInt8 || Parent Scale inheritance&amp;lt;br/&amp;gt;0 = Follow parent joint&#039;s scale&amp;lt;br/&amp;gt;1 = Ignore parent joint&#039;s scale&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt8 || Padding (0xFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Float || Scale X&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Float || Scale Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Float || Scale Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int16 || Rotation X&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || Int16 || Rotation Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int16 || Rotation Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x16 || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Float || Translation X&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Float || Translation Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Float || Translation Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Float || Bounding Sphere&amp;lt;br/&amp;gt;Should encapsulate all vertices that the joint affects&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Float || Bounding Box Minimum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C || Float || Bounding Box Minimum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x30 || Float || Bounding Box Minimum Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x34 || Float || Bounding Box Maximum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x38 || Float || Bounding Box Maximum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C || Float || Bounding Box Maximum Z&lt;br /&gt;
|}&lt;br /&gt;
Rotation is stored between -0x7FFF and 0x7FFF, which ranges -180 degrees and 180 degrees.&lt;br /&gt;
&lt;br /&gt;
== SHP1 - Shape Information==&lt;br /&gt;
The &#039;&#039;&#039;Sh&#039;&#039;&#039;a&#039;&#039;&#039;p&#039;&#039;&#039;e Information section determines how to use the data in the [[#VTX1_-_Vertex_Data|VTX1]] section to create shapes.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;SHP1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Shapes stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Shape Data table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Remap table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Name table offset&amp;lt;br/&amp;gt;(Generally not used, and thus set to 0)&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || &amp;quot;Vertex Attribute table&amp;quot; offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Int32 || &amp;quot;Weight Matrix data table&amp;quot; offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Int32 || &amp;quot;GXDisplayList data buffer&amp;quot; offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Int32 || &amp;quot;Weight Matrix group table&amp;quot; offset (entry count must equal the entry count of the GXDisplayList group table)&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Int32 || &amp;quot;GXDisplayList group table&amp;quot; offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Shape Data ===&lt;br /&gt;
Each shape denotes a Matrix Calculation type, which is used for Billboarding, as well as multi-joint skinning.&amp;lt;br/&amp;gt;A shape also contains a group of GXDisplayList primitives, and can have multiple groups if the geometry needs to be weighted to more than 10 [[#DRW1_-_Skinning_Assignments|DRW1]] matrices.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;TODO: Figure out what happens in the event that more than 10 are needed. Is it just straight up not allowed?&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt8 || Matrix Type&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || UInt8 || Padding (0xFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Int16 || &amp;quot;GXDisplayList group&amp;quot; count&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int16 || Vertex Attribute offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Int16 || First &amp;quot;Weight Matrix group table&amp;quot; index&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || First &amp;quot;GXDisplayList group&amp;quot; index&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Float || Bounding Sphere&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Float || Bounding Box Minimum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Float || Bounding Box Minimum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Float || Bounding Box Minimum Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Float || Bounding Box Maximum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Float || Bounding Box Maximum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Float || Bounding Box Maximum Z&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== MAT2 - Material List (Old) ==&lt;br /&gt;
Technically supported by the game, but not known to be used by any model.&lt;br /&gt;
&lt;br /&gt;
== MAT3 - Material List ==&lt;br /&gt;
&lt;br /&gt;
== MDL3 - Display List ==&lt;br /&gt;
&lt;br /&gt;
== TEX1 - Texture Data ==&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=826</id>
		<title>BMD/BDL (File Format)</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=826"/>
		<updated>2025-02-06T19:20:11Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: Added JNT1&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:File formats]]&lt;br /&gt;
{{WIP}}&lt;br /&gt;
&lt;br /&gt;
BMD (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;M&#039;&#039;&#039;o&#039;&#039;&#039;d&#039;&#039;&#039;el) and BDL (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;D&#039;&#039;&#039;isplay &#039;&#039;&#039;L&#039;&#039;&#039;ist) are two 3D model formats used in &#039;&#039;Super Mario Galaxy&#039;&#039; and &#039;&#039;Super Mario Galaxy 2&#039;&#039;, among a few other &#039;&#039;Wii&#039;&#039; and &#039;&#039;GameCube&#039;&#039; games, such as &#039;&#039;Super Mario Sunshine&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These two formats hold the same data, except BDL contains an additional set of data which is used for faster rendering speeds.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Super Mario Galaxy&#039;&#039; &amp;amp; &#039;&#039;Super Mario Galaxy 2&#039;&#039; contain J3DLoader versions 21 and 26.&lt;br /&gt;
&lt;br /&gt;
== File Header ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || The magic that tells the game which format this file is. (ASCII)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bmd2&#039;&#039;&#039; for BMD (J3DLoader V21)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bmd3&#039;&#039;&#039; for BMD (J3DLoader v26)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bdl4&#039;&#039;&#039; for BDL (J3DLoader v26)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int32 || The total size of the file&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || The number of chunks present in this file.&amp;lt;br/&amp;gt;&#039;&#039;&#039;8&#039;&#039;&#039; for BMD&amp;lt;br/&amp;gt;&#039;&#039;&#039;9&#039;&#039;&#039; for BDL&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Subversion Header ===&lt;br /&gt;
This part of the header is not used, and can be anything.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || A 4 character value representing the Subversion. Usually SVR3 for SMG/2.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Byte[12] || Twelve bytes of padding. Usually these are &#039;&#039;&#039;0xFF&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== INF1 - Scene Information ==&lt;br /&gt;
The &#039;&#039;&#039;Inf&#039;&#039;&#039;ormation section hosts a hierarchy of Joints, Materials, and Shapes, which are used to render the model.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;INF1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || [[#J3DLoader%20Flags|J3DLoader Flags]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Matrix Group Count&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Vertex Count&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== J3DLoader Flags ===&lt;br /&gt;
The J3DLoader contains several flags which affect how models are handled. There are more than what are shown here, however, those must be applied by the game itself in the code.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000000 || No flags applied (TODO: Check if this defaults to basic matrix calculation)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000001 || Use Autodesk Softimage matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000010 || Use Autodesk Maya matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000100 || Use Basic matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000001000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000010000 || UseImmidiateMtx (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000100000 || UsePostTexMtx (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000001000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000010000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000100000000 || NoMatrixTransform (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000001000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000010000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000100000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0001000000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0010000000000000 || DoBdlMaterialCalc&lt;br /&gt;
|-&lt;br /&gt;
| 0b0100000000000000 || NoBdlMaterialPatch - If set, skips the call to &#039;&#039;&#039;J3DModelLoader::readPatchedMaterial&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0b1000000000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
For all BMD files, the game always includes load flags &#039;&#039;Material_PE_Full&#039;&#039;, &#039;&#039;Material_UseIndirect&#039;&#039;, &#039;&#039;UseUniqueMaterials&#039;&#039;, and &#039;&#039;UNKNOWN_21&#039;&#039;.&amp;lt;br/&amp;gt;&lt;br /&gt;
For all BDL files, the game always includes load flags &#039;&#039;Material_UseIndirect&#039;&#039;, and &#039;&#039;UseUniqueMaterials&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;gt; &#039;&#039;Note: Changing the load flags by changing the code doesn&#039;t seem to do much.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== VTX1 - Vertex Data ==&lt;br /&gt;
The &#039;&#039;&#039;V&#039;&#039;&#039;er&#039;&#039;&#039;t&#039;&#039;&#039;e&#039;&#039;&#039;x&#039;&#039;&#039; Data section contains the actual number values used for the properties of the geometry. It also includes the information on how the values are formatted.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;VTX1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int32 || Buffer Format list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || &amp;quot;POSITION&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || &amp;quot;NORMAL&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || &amp;quot;TANGENT&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || &amp;quot;COLOR_0&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Int32 || &amp;quot;COLOR_1&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Int32 || &amp;quot;TEXCOORD_0&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Int32 || &amp;quot;TEXCOORD_1&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Int32 || &amp;quot;TEXCOORD_2&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C || Int32 || &amp;quot;TEXCOORD_3&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x30 || Int32 || &amp;quot;TEXCOORD_4&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x34 || Int32 || &amp;quot;TEXCOORD_5&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x38 || Int32 || &amp;quot;TEXCOORD_6&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C || Int32 || &amp;quot;TEXCOORD_7&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Buffer Formats ===&lt;br /&gt;
Each of the Buffers in this section have a format descriptor. This allows different types of data storage, allowing for smaller files.&lt;br /&gt;
&lt;br /&gt;
Each format descriptor contains an Attribute Target, a Component Count, a Data Type, and a Mantissa shifter (to allow floats to be stored as smaller datatypes compared to FLOAT).&amp;lt;br/&amp;gt;Only one descriptor can exist for each attribute.&lt;br /&gt;
&lt;br /&gt;
The Attribute Target tells the game what this buffer is used for.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Attribute Targets&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000009 || POSITION || This buffer represents the positions of vertices in the model. Basically required for all visual models.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000A || NORMAL || This buffer represents vertex normals, used for the engine&#039;s vertex shading. Not needed if no material requires it.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000B || COLOR_0 || This buffer is available for Vertex Colors.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000C || COLOR_1 || This buffer is available for Vertex Colors.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000D || TEXCOORD_0 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000E || TEXCOORD_1 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000F || TEXCOORD_2 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000010 || TEXCOORD_3 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000011 || TEXCOORD_4 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000012 || TEXCOORD_5 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000013 || TEXCOORD_6 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000014 || TEXCOORD_7 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000019 || TANGENT || &#039;&#039;Currently unknown exactly what goes in here.&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x000000FF || List End || A buffer using this target will end the descriptor list.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The component count tells the game how many parts of the component that there are. Note that the values are considered based on the attribute target they&#039;re assigned to.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Component Count&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || POSITION_XY || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || POSITION_XYZ || Represents a position in 3D space with 3 values: X, Y, and Z.&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || NORMAL_XYZ || Represents a normal vector in 3D space with 3 values: X, Y, and Z.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || NORMAL_NBT || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || NORMAL_NBT3 || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || COLOR_RGB || Represents a color value with only Red, Green, and Blue values.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || COLOR_RGBA || Represents a color value with Red, Green, Blue, and Alpha values.&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || TEXCOORD_S || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || TEXCOORD_ST || Represents a UV texture coordinate with 2 values: X and Y.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Data Type tells the game how many bytes each value is, in the sense that an Int32 is 4 bytes, a Int16 is 2 bytes, a Float is 4 bytes, etc.&amp;lt;br/&amp;gt;Note that the Color values have a different set of options.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Data Types&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || UInt8 || 1 byte per value (0 to 255)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || Int8 || 1 byte per value (-128 to 127)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || UInt16 || 2 bytes per value (0 to 65535)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || Int16 || 2 bytes per value (-32,768 to 32,767)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || Float || 4 bytes per value&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || RGB565 || 2 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || RGB8 || 3 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || RGBX8 || 3 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || RGBA4 || 2 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || RGBA6 || 4 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000005 || RGBA8 || 4 bytes per color&lt;br /&gt;
|}&lt;br /&gt;
&amp;gt; &#039;&#039;Note: Both games require colors to be 4 bytes wide at all times, so changing from RGBA8 is worthless.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== EVP1 - Skinning Envelopes ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;EVP1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Envelopes stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || &amp;quot;Joint Count&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || &amp;quot;&#039;Joint Count&#039; list index&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || &amp;quot;Joint Weight&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || &amp;quot;Inverse Bind Matrices&amp;quot; list offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== DRW1 - Skinning Assignments ==&lt;br /&gt;
&lt;br /&gt;
== JNT1 - Joint Hierarchy ==&lt;br /&gt;
The &#039;&#039;&#039;J&#039;&#039;&#039;oi&#039;&#039;&#039;nt&#039;&#039;&#039; Hierarchy section defines the rigging skeleton of a model. There can only be one skeleton per model.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;JNT1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Joints stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Joint Data table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Remap table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Name table offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Joint Data ===&lt;br /&gt;
Each joint includes positional data and a bounding box which is used by the game for determining rendering range automatically.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Int16 || Matrix Type&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || UInt8 || Parent Scale inheritance&amp;lt;br/&amp;gt;0 = Follow parent joint&#039;s scale&amp;lt;br/&amp;gt;1 = Ignore parent joint&#039;s scale&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt8 || Padding (0xFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Float || Scale X&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Float || Scale Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Float || Scale Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int16 || Rotation X&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || Int16 || Rotation Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int16 || Rotation Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x16 || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Float || Translation X&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Float || Translation Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Float || Translation Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Float || Bounding Sphere&amp;lt;br/&amp;gt;Should encapsulate all vertices that the joint affects&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Float || Bounding Box Minimum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C || Float || Bounding Box Minimum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x30 || Float || Bounding Box Minimum Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x34 || Float || Bounding Box Maximum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x38 || Float || Bounding Box Maximum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C || Float || Bounding Box Maximum Z&lt;br /&gt;
|}&lt;br /&gt;
Rotation is stored between -0x7FFF and 0x7FFF, which ranges -180 degrees and 180 degrees.&lt;br /&gt;
&lt;br /&gt;
== SHP1 - Shape Information==&lt;br /&gt;
The &#039;&#039;&#039;Sh&#039;&#039;&#039;a&#039;&#039;&#039;p&#039;&#039;&#039;e Information section determines how to use the data in the [[#VTX1_-_Vertex_Data|VTX1]] section to create shapes.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;SHP1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Shapes stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Shape Data table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Remap table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Name table offset&amp;lt;br/&amp;gt;(Generally not used, and thus set to 0)&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || &amp;quot;Vertex Attribute table&amp;quot; offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Int32 || &amp;quot;Weight Matrix data table&amp;quot; offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Int32 || &amp;quot;GXDisplayList data buffer&amp;quot; offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Int32 || &amp;quot;Weight Matrix group table&amp;quot; offset (entry count must equal the entry count of the GXDisplayList group table)&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Int32 || &amp;quot;GXDisplayList group table&amp;quot; offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Shape Data ===&lt;br /&gt;
Each shape denotes a Matrix Calculation type, which is used for Billboarding, as well as multi-joint skinning.&amp;lt;br/&amp;gt;A shape also contains a group of GXDisplayList primitives, and can have multiple groups if the geometry needs to be weighted to more than 10 [[#DRW1_-_Skinning_Assignments|DRW1]] matrices.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;TODO: Figure out what happens in the event that more than 10 are needed. Is it just straight up not allowed?&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt8 || Matrix Type&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || UInt8 || Padding (0xFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Int16 || &amp;quot;GXDisplayList group&amp;quot; count&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int16 || Vertex Attribute offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Int16 || First &amp;quot;Weight Matrix group table&amp;quot; index&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || First &amp;quot;GXDisplayList group&amp;quot; index&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Float || Bounding Sphere&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Float || Bounding Box Minimum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Float || Bounding Box Minimum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Float || Bounding Box Minimum Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Float || Bounding Box Maximum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Float || Bounding Box Maximum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Float || Bounding Box Maximum Z&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== MAT2 - Material List (Old) ==&lt;br /&gt;
Technically supported by the game, but not known to be used by any model.&lt;br /&gt;
&lt;br /&gt;
== MAT3 - Material List ==&lt;br /&gt;
&lt;br /&gt;
== MDL3 - Display List ==&lt;br /&gt;
&lt;br /&gt;
== TEX1 - Texture Data ==&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=794</id>
		<title>BMD/BDL (File Format)</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=794"/>
		<updated>2025-01-10T04:22:49Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:File formats]]&lt;br /&gt;
{{WIP}}&lt;br /&gt;
&lt;br /&gt;
BMD (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;M&#039;&#039;&#039;o&#039;&#039;&#039;d&#039;&#039;&#039;el) and BDL (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;D&#039;&#039;&#039;isplay &#039;&#039;&#039;L&#039;&#039;&#039;ist) are two 3D model formats used in &#039;&#039;Super Mario Galaxy&#039;&#039; and &#039;&#039;Super Mario Galaxy 2&#039;&#039;, among a few other &#039;&#039;Wii&#039;&#039; and &#039;&#039;GameCube&#039;&#039; games, such as &#039;&#039;Super Mario Sunshine&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These two formats hold the same data, except BDL contains an additional set of data which is used for faster rendering speeds.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Super Mario Galaxy&#039;&#039; &amp;amp; &#039;&#039;Super Mario Galaxy 2&#039;&#039; contain J3DLoader versions 21 and 26.&lt;br /&gt;
&lt;br /&gt;
== File Header ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || The magic that tells the game which format this file is. (ASCII)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bmd2&#039;&#039;&#039; for BMD (J3DLoader V21)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bmd3&#039;&#039;&#039; for BMD (J3DLoader v26)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bdl4&#039;&#039;&#039; for BDL (J3DLoader v26)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int32 || The total size of the file&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || The number of chunks present in this file.&amp;lt;br/&amp;gt;&#039;&#039;&#039;8&#039;&#039;&#039; for BMD&amp;lt;br/&amp;gt;&#039;&#039;&#039;9&#039;&#039;&#039; for BDL&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Subversion Header ===&lt;br /&gt;
This part of the header is not used, and can be anything.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || A 4 character value representing the Subversion. Usually SVR3 for SMG/2.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Byte[12] || Twelve bytes of padding. Usually these are &#039;&#039;&#039;0xFF&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== INF1 - Scene Information ==&lt;br /&gt;
The &#039;&#039;&#039;Inf&#039;&#039;&#039;ormation section hosts a hierarchy of Joints, Materials, and Shapes, which are used to render the model.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;INF1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || [[#J3DLoader%20Flags|J3DLoader Flags]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Matrix Group Count&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Vertex Count&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== J3DLoader Flags ===&lt;br /&gt;
The J3DLoader contains several flags which affect how models are handled. There are more than what are shown here, however, those must be applied by the game itself in the code.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000000 || No flags applied (TODO: Check if this defaults to basic matrix calculation)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000001 || Use Autodesk Softimage matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000010 || Use Autodesk Maya matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000100 || Use Basic matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000001000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000010000 || UseImmidiateMtx (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000100000 || UsePostTexMtx (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000001000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000010000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000100000000 || NoMatrixTransform (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000001000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000010000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000100000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0001000000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0010000000000000 || DoBdlMaterialCalc&lt;br /&gt;
|-&lt;br /&gt;
| 0b0100000000000000 || NoBdlMaterialPatch - If set, skips the call to &#039;&#039;&#039;J3DModelLoader::readPatchedMaterial&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0b1000000000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
For all BMD files, the game always includes load flags &#039;&#039;Material_PE_Full&#039;&#039;, &#039;&#039;Material_UseIndirect&#039;&#039;, &#039;&#039;UseUniqueMaterials&#039;&#039;, and &#039;&#039;UNKNOWN_21&#039;&#039;.&amp;lt;br/&amp;gt;&lt;br /&gt;
For all BDL files, the game always includes load flags &#039;&#039;Material_UseIndirect&#039;&#039;, and &#039;&#039;UseUniqueMaterials&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;gt; &#039;&#039;Note: Changing the load flags by changing the code doesn&#039;t seem to do much.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== VTX1 - Vertex Data ==&lt;br /&gt;
The &#039;&#039;&#039;V&#039;&#039;&#039;er&#039;&#039;&#039;t&#039;&#039;&#039;e&#039;&#039;&#039;x&#039;&#039;&#039; Data section contains the actual number values used for the properties of the geometry. It also includes the information on how the values are formatted.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;VTX1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int32 || Buffer Format list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || &amp;quot;POSITION&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || &amp;quot;NORMAL&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || &amp;quot;TANGENT&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || &amp;quot;COLOR_0&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Int32 || &amp;quot;COLOR_1&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Int32 || &amp;quot;TEXCOORD_0&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Int32 || &amp;quot;TEXCOORD_1&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Int32 || &amp;quot;TEXCOORD_2&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C || Int32 || &amp;quot;TEXCOORD_3&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x30 || Int32 || &amp;quot;TEXCOORD_4&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x34 || Int32 || &amp;quot;TEXCOORD_5&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x38 || Int32 || &amp;quot;TEXCOORD_6&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C || Int32 || &amp;quot;TEXCOORD_7&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Buffer Formats ===&lt;br /&gt;
Each of the Buffers in this section have a format descriptor. This allows different types of data storage, allowing for smaller files.&lt;br /&gt;
&lt;br /&gt;
Each format descriptor contains an Attribute Target, a Component Count, a Data Type, and a Mantissa shifter (to allow floats to be stored as smaller datatypes compared to FLOAT).&amp;lt;br/&amp;gt;Only one descriptor can exist for each attribute.&lt;br /&gt;
&lt;br /&gt;
The Attribute Target tells the game what this buffer is used for.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Attribute Targets&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000009 || POSITION || This buffer represents the positions of vertices in the model. Basically required for all visual models.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000A || NORMAL || This buffer represents vertex normals, used for the engine&#039;s vertex shading. Not needed if no material requires it.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000B || COLOR_0 || This buffer is available for Vertex Colors.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000C || COLOR_1 || This buffer is available for Vertex Colors.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000D || TEXCOORD_0 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000E || TEXCOORD_1 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000F || TEXCOORD_2 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000010 || TEXCOORD_3 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000011 || TEXCOORD_4 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000012 || TEXCOORD_5 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000013 || TEXCOORD_6 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000014 || TEXCOORD_7 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000019 || TANGENT || &#039;&#039;Currently unknown exactly what goes in here.&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x000000FF || List End || A buffer using this target will end the descriptor list.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The component count tells the game how many parts of the component that there are. Note that the values are considered based on the attribute target they&#039;re assigned to.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Component Count&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || POSITION_XY || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || POSITION_XYZ || Represents a position in 3D space with 3 values: X, Y, and Z.&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || NORMAL_XYZ || Represents a normal vector in 3D space with 3 values: X, Y, and Z.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || NORMAL_NBT || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || NORMAL_NBT3 || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || COLOR_RGB || Represents a color value with only Red, Green, and Blue values.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || COLOR_RGBA || Represents a color value with Red, Green, Blue, and Alpha values.&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || TEXCOORD_S || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || TEXCOORD_ST || Represents a UV texture coordinate with 2 values: X and Y.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Data Type tells the game how many bytes each value is, in the sense that an Int32 is 4 bytes, a Int16 is 2 bytes, a Float is 4 bytes, etc.&amp;lt;br/&amp;gt;Note that the Color values have a different set of options.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Data Types&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || UInt8 || 1 byte per value (0 to 255)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || Int8 || 1 byte per value (-128 to 127)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || UInt16 || 2 bytes per value (0 to 65535)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || Int16 || 2 bytes per value (-32,768 to 32,767)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || Float || 4 bytes per value&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || RGB565 || 2 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || RGB8 || 3 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || RGBX8 || 3 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || RGBA4 || 2 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || RGBA6 || 4 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000005 || RGBA8 || 4 bytes per color&lt;br /&gt;
|}&lt;br /&gt;
&amp;gt; &#039;&#039;Note: Both games require colors to be 4 bytes wide at all times, so changing from RGBA8 is worthless.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== EVP1 - Skinning Envelopes ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;EVP1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Envelopes stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || &amp;quot;Joint Count&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || &amp;quot;&#039;Joint Count&#039; list index&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || &amp;quot;Joint Weight&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || &amp;quot;Inverse Bind Matrices&amp;quot; list offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== DRW1 - Skinning Assignments ==&lt;br /&gt;
&lt;br /&gt;
== JNT1 - Joint Hierarchy ==&lt;br /&gt;
&lt;br /&gt;
== SHP1 - Shape Information==&lt;br /&gt;
The &#039;&#039;&#039;Sh&#039;&#039;&#039;a&#039;&#039;&#039;p&#039;&#039;&#039;e Information section determines how to use the data in the [[#VTX1_-_Vertex_Data|VTX1]] section to create shapes.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;SHP1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Shapes stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Shape Data table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Remap table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Name table offset&amp;lt;br/&amp;gt;(Generally not used, and thus set to 0)&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || &amp;quot;Vertex Attribute table&amp;quot; offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Int32 || &amp;quot;Weight Matrix data table&amp;quot; offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Int32 || &amp;quot;GXDisplayList data buffer&amp;quot; offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Int32 || &amp;quot;Weight Matrix group table&amp;quot; offset (entry count must equal the entry count of the GXDisplayList group table)&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Int32 || &amp;quot;GXDisplayList group table&amp;quot; offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Shape Data ===&lt;br /&gt;
Each shape denotes a Matrix Calculation type, which is used for Billboarding, as well as multi-joint skinning.&amp;lt;br/&amp;gt;A shape also contains a group of GXDisplayList primitives, and can have multiple groups if the geometry needs to be weighted to more than 10 [[#DRW1_-_Skinning_Assignments|DRW1]] matrices.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;TODO: Figure out what happens in the event that more than 10 are needed. Is it just straight up not allowed?&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt8 || Matrix Type&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || UInt8 || Padding (0xFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Int16 || &amp;quot;GXDisplayList group&amp;quot; count&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int16 || Vertex Attribute offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Int16 || First &amp;quot;Weight Matrix group table&amp;quot; index&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || First &amp;quot;GXDisplayList group&amp;quot; index&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Float || Bounding Sphere&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Float || Bounding Box Minimum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Float || Bounding Box Minimum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Float || Bounding Box Minimum Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Float || Bounding Box Maximum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Float || Bounding Box Maximum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Float || Bounding Box Maximum Z&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== MAT2 - Material List (Old) ==&lt;br /&gt;
Technically supported by the game, but not known to be used by any model.&lt;br /&gt;
&lt;br /&gt;
== MAT3 - Material List ==&lt;br /&gt;
&lt;br /&gt;
== MDL3 - Display List ==&lt;br /&gt;
&lt;br /&gt;
== TEX1 - Texture Data ==&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=792</id>
		<title>BMD/BDL (File Format)</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=792"/>
		<updated>2025-01-09T22:17:20Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: Early SHP1 writeup&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:File formats]]&lt;br /&gt;
{{WIP}}&lt;br /&gt;
&lt;br /&gt;
BMD (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;M&#039;&#039;&#039;o&#039;&#039;&#039;d&#039;&#039;&#039;el) and BDL (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;D&#039;&#039;&#039;isplay &#039;&#039;&#039;L&#039;&#039;&#039;ist) are two 3D model formats used in &#039;&#039;Super Mario Galaxy&#039;&#039; and &#039;&#039;Super Mario Galaxy 2&#039;&#039;, among a few other &#039;&#039;Wii&#039;&#039; and &#039;&#039;GameCube&#039;&#039; games, such as &#039;&#039;Super Mario Sunshine&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These two formats hold the same data, except BDL contains an additional set of data which is used for faster rendering speeds.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Super Mario Galaxy&#039;&#039; &amp;amp; &#039;&#039;Super Mario Galaxy 2&#039;&#039; contain J3DLoader versions 21 and 26.&lt;br /&gt;
&lt;br /&gt;
== File Header ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || The magic that tells the game which format this file is. (ASCII)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bmd2&#039;&#039;&#039; for BMD (J3DLoader V21)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bmd3&#039;&#039;&#039; for BMD (J3DLoader v26)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bdl4&#039;&#039;&#039; for BDL (J3DLoader v26)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int32 || The total size of the file&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || The number of chunks present in this file.&amp;lt;br/&amp;gt;&#039;&#039;&#039;8&#039;&#039;&#039; for BMD&amp;lt;br/&amp;gt;&#039;&#039;&#039;9&#039;&#039;&#039; for BDL&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Subversion Header ===&lt;br /&gt;
This part of the header is not used, and can be anything.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || A 4 character value representing the Subversion. Usually SVR3 for SMG/2.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Byte[12] || Twelve bytes of padding. Usually these are &#039;&#039;&#039;0xFF&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== INF1 - Scene Information ==&lt;br /&gt;
The &#039;&#039;&#039;Inf&#039;&#039;&#039;ormation section hosts a hierarchy of Joints, Materials, and Shapes, which are used to render the model.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;INF1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || [[#J3DLoader%20Flags|J3DLoader Flags]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Matrix Group Count&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Vertex Count&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== J3DLoader Flags ===&lt;br /&gt;
The J3DLoader contains several flags which affect how models are handled. There are more than what are shown here, however, those must be applied by the game itself in the code.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000000 || No flags applied (TODO: Check if this defaults to basic matrix calculation)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000001 || Use Autodesk Softimage matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000010 || Use Autodesk Maya matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000100 || Use Basic matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000001000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000010000 || UseImmidiateMtx (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000100000 || UsePostTexMtx (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000001000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000010000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000100000000 || NoMatrixTransform (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000001000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000010000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000100000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0001000000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0010000000000000 || DoBdlMaterialCalc&lt;br /&gt;
|-&lt;br /&gt;
| 0b0100000000000000 || NoBdlMaterialPatch - If set, skips the call to &#039;&#039;&#039;J3DModelLoader::readPatchedMaterial&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0b1000000000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
For all BMD files, the game always includes load flags &#039;&#039;Material_PE_Full&#039;&#039;, &#039;&#039;Material_UseIndirect&#039;&#039;, &#039;&#039;UseUniqueMaterials&#039;&#039;, and &#039;&#039;UNKNOWN_21&#039;&#039;.&amp;lt;br/&amp;gt;&lt;br /&gt;
For all BDL files, the game always includes load flags &#039;&#039;Material_UseIndirect&#039;&#039;, and &#039;&#039;UseUniqueMaterials&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;gt; &#039;&#039;Note: Changing the load flags by changing the code doesn&#039;t seem to do much.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== VTX1 - Vertex Data ==&lt;br /&gt;
The &#039;&#039;&#039;V&#039;&#039;&#039;er&#039;&#039;&#039;t&#039;&#039;&#039;e&#039;&#039;&#039;x&#039;&#039;&#039; Data section contains the actual number values used for the properties of the geometry. It also includes the information on how the values are formatted.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;VTX1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int32 || Buffer Format list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || &amp;quot;POSITION&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || &amp;quot;NORMAL&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || &amp;quot;TANGENT&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || &amp;quot;COLOR_0&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Int32 || &amp;quot;COLOR_1&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Int32 || &amp;quot;TEXCOORD_0&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Int32 || &amp;quot;TEXCOORD_1&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Int32 || &amp;quot;TEXCOORD_2&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C || Int32 || &amp;quot;TEXCOORD_3&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x30 || Int32 || &amp;quot;TEXCOORD_4&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x34 || Int32 || &amp;quot;TEXCOORD_5&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x38 || Int32 || &amp;quot;TEXCOORD_6&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C || Int32 || &amp;quot;TEXCOORD_7&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Buffer Formats ===&lt;br /&gt;
Each of the Buffers in this section have a format descriptor. This allows different types of data storage, allowing for smaller files.&lt;br /&gt;
&lt;br /&gt;
Each format descriptor contains an Attribute Target, a Component Count, a Data Type, and a Mantissa shifter (to allow floats to be stored as smaller datatypes compared to FLOAT).&amp;lt;br/&amp;gt;Only one descriptor can exist for each attribute.&lt;br /&gt;
&lt;br /&gt;
The Attribute Target tells the game what this buffer is used for.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Attribute Targets&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000009 || POSITION || This buffer represents the positions of vertices in the model. Basically required for all visual models.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000A || NORMAL || This buffer represents vertex normals, used for the engine&#039;s vertex shading. Not needed if no material requires it.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000B || COLOR_0 || This buffer is available for Vertex Colors.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000C || COLOR_1 || This buffer is available for Vertex Colors.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000D || TEXCOORD_0 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000E || TEXCOORD_1 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000F || TEXCOORD_2 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000010 || TEXCOORD_3 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000011 || TEXCOORD_4 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000012 || TEXCOORD_5 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000013 || TEXCOORD_6 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000014 || TEXCOORD_7 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000019 || TANGENT || &#039;&#039;Currently unknown exactly what goes in here.&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x000000FF || List End || A buffer using this target will end the descriptor list.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The component count tells the game how many parts of the component that there are. Note that the values are considered based on the attribute target they&#039;re assigned to.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Component Count&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || POSITION_XY || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || POSITION_XYZ || Represents a position in 3D space with 3 values: X, Y, and Z.&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || NORMAL_XYZ || Represents a normal vector in 3D space with 3 values: X, Y, and Z.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || NORMAL_NBT || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || NORMAL_NBT3 || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || COLOR_RGB || Represents a color value with only Red, Green, and Blue values.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || COLOR_RGBA || Represents a color value with Red, Green, Blue, and Alpha values.&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || TEXCOORD_S || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || TEXCOORD_ST || Represents a UV texture coordinate with 2 values: X and Y.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Data Type tells the game how many bytes each value is, in the sense that an Int32 is 4 bytes, a Int16 is 2 bytes, a Float is 4 bytes, etc.&amp;lt;br/&amp;gt;Note that the Color values have a different set of options.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Data Types&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || UInt8 || 1 byte per value (0 to 255)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || Int8 || 1 byte per value (-128 to 127)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || UInt16 || 2 bytes per value (0 to 65535)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || Int16 || 2 bytes per value (-32,768 to 32,767)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || Float || 4 bytes per value&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || RGB565 || 2 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || RGB8 || 3 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || RGBX8 || 3 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || RGBA4 || 2 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || RGBA6 || 4 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000005 || RGBA8 || 4 bytes per color&lt;br /&gt;
|}&lt;br /&gt;
&amp;gt; &#039;&#039;Note: Both games require colors to be 4 bytes wide at all times, so changing from RGBA8 is worthless.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== EVP1 - Skinning Envelopes ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;EVP1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Envelopes stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || &amp;quot;Joint Count&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || &amp;quot;&#039;Joint Count&#039; list index&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || &amp;quot;Joint Weight&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || &amp;quot;Inverse Bind Matrices&amp;quot; list offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== DRW1 - Skinning Assignments ==&lt;br /&gt;
&lt;br /&gt;
== JNT1 - Joint Hierarchy ==&lt;br /&gt;
&lt;br /&gt;
== SHP1 - Shape Information==&lt;br /&gt;
The &#039;&#039;&#039;Sh&#039;&#039;&#039;a&#039;&#039;&#039;p&#039;&#039;&#039;e Information section determines how to use the data in the [[#VTX1_-_Vertex_Data|VTX1]] section to create shapes.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;SHP1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Shapes stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Shape Data table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Remap table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || Name table offset&amp;lt;br/&amp;gt;(Generally not used, and thus set to 0)&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || Vertex Attribute table offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Int32 || &lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Int32 || GXDisplayList data buffer offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Int32 || &lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Int32 || GXDisplayList location table offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Shape Data ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt8 || Matrix Type&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || UInt8 || Padding (0xFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Int16 || GXDisplayList count&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int16 || Vertex Attribute offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Int16 || &lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || First GXDisplayList index&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Float || Bounding Sphere&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Float || Bounding Box Minimum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Float || Bounding Box Minimum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Float || Bounding Box Minimum Z&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Float || Bounding Box Maximum X&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Float || Bounding Box Maximum Y&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Float || Bounding Box Maximum Z&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== MAT2 - Material List (Old) ==&lt;br /&gt;
Technically supported by the game, but not known to be used by any model.&lt;br /&gt;
&lt;br /&gt;
== MAT3 - Material List ==&lt;br /&gt;
&lt;br /&gt;
== MDL3 - Display List ==&lt;br /&gt;
&lt;br /&gt;
== TEX1 - Texture Data ==&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=791</id>
		<title>BMD/BDL (File Format)</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=791"/>
		<updated>2025-01-08T18:52:23Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: A bunch of VTX1 docs&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:File formats]]&lt;br /&gt;
{{WIP}}&lt;br /&gt;
&lt;br /&gt;
BMD (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;M&#039;&#039;&#039;o&#039;&#039;&#039;d&#039;&#039;&#039;el) and BDL (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;D&#039;&#039;&#039;isplay &#039;&#039;&#039;L&#039;&#039;&#039;ist) are two 3D model formats used in &#039;&#039;Super Mario Galaxy&#039;&#039; and &#039;&#039;Super Mario Galaxy 2&#039;&#039;, among a few other &#039;&#039;Wii&#039;&#039; and &#039;&#039;GameCube&#039;&#039; games, such as &#039;&#039;Super Mario Sunshine&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These two formats hold the same data, except BDL contains an additional set of data which is used for faster rendering speeds.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Super Mario Galaxy&#039;&#039; &amp;amp; &#039;&#039;Super Mario Galaxy 2&#039;&#039; contain J3DLoader versions 21 and 26.&lt;br /&gt;
&lt;br /&gt;
== File Header ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || The magic that tells the game which format this file is. (ASCII)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bmd2&#039;&#039;&#039; for BMD (J3DLoader V21)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bmd3&#039;&#039;&#039; for BMD (J3DLoader v26)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bdl4&#039;&#039;&#039; for BDL (J3DLoader v26)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int32 || The total size of the file&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || The number of chunks present in this file.&amp;lt;br/&amp;gt;&#039;&#039;&#039;8&#039;&#039;&#039; for BMD&amp;lt;br/&amp;gt;&#039;&#039;&#039;9&#039;&#039;&#039; for BDL&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Subversion Header ===&lt;br /&gt;
This part of the header is not used, and can be anything.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || A 4 character value representing the Subversion. Usually SVR3 for SMG/2.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Byte[12] || Twelve bytes of padding. Usually these are &#039;&#039;&#039;0xFF&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== INF1 - Scene Information ==&lt;br /&gt;
The &#039;&#039;&#039;Inf&#039;&#039;&#039;ormation section hosts a hierarchy of Joints, Materials, and Shapes, which are used to render the model.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;INF1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || [[#J3DLoader%20Flags|J3DLoader Flags]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Matrix Group Count&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Vertex Count&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== J3DLoader Flags ===&lt;br /&gt;
The J3DLoader contains several flags which affect how models are handled. There are more than what are shown here, however, those must be applied by the game itself in the code.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000000 || No flags applied (TODO: Check if this defaults to basic matrix calculation)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000001 || Use Autodesk Softimage matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000010 || Use Autodesk Maya matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000100 || Use Basic matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000001000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000010000 || UseImmidiateMtx (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000100000 || UsePostTexMtx (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000001000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000010000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000100000000 || NoMatrixTransform (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000001000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000010000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000100000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0001000000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0010000000000000 || DoBdlMaterialCalc&lt;br /&gt;
|-&lt;br /&gt;
| 0b0100000000000000 || NoBdlMaterialPatch - If set, skips the call to &#039;&#039;&#039;J3DModelLoader::readPatchedMaterial&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0b1000000000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
For all BMD files, the game always includes load flags &#039;&#039;Material_PE_Full&#039;&#039;, &#039;&#039;Material_UseIndirect&#039;&#039;, &#039;&#039;UseUniqueMaterials&#039;&#039;, and &#039;&#039;UNKNOWN_21&#039;&#039;.&amp;lt;br/&amp;gt;&lt;br /&gt;
For all BDL files, the game always includes load flags &#039;&#039;Material_UseIndirect&#039;&#039;, and &#039;&#039;UseUniqueMaterials&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;gt; &#039;&#039;Note: Changing the load flags by changing the code doesn&#039;t seem to do much.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== VTX1 - Vertex Data ==&lt;br /&gt;
The &#039;&#039;&#039;V&#039;&#039;&#039;er&#039;&#039;&#039;t&#039;&#039;&#039;e&#039;&#039;&#039;x&#039;&#039;&#039; Data section contains the actual number values used for the properties of the geometry. It also includes the information on how the values are formatted.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;VTX1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int32 || Buffer Format list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || &amp;quot;POSITION&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || &amp;quot;NORMAL&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || &amp;quot;TANGENT&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || &amp;quot;COLOR_0&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x1C || Int32 || &amp;quot;COLOR_1&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x20 || Int32 || &amp;quot;TEXCOORD_0&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x24 || Int32 || &amp;quot;TEXCOORD_1&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x28 || Int32 || &amp;quot;TEXCOORD_2&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x2C || Int32 || &amp;quot;TEXCOORD_3&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x30 || Int32 || &amp;quot;TEXCOORD_4&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x34 || Int32 || &amp;quot;TEXCOORD_5&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x38 || Int32 || &amp;quot;TEXCOORD_6&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|-&lt;br /&gt;
| 0x3C || Int32 || &amp;quot;TEXCOORD_7&amp;quot; data buffer offset&amp;lt;br/&amp;gt;0 if not used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Buffer Formats ===&lt;br /&gt;
Each of the Buffers in this section have a format descriptor. This allows different types of data storage, allowing for smaller files.&lt;br /&gt;
&lt;br /&gt;
Each format descriptor contains an Attribute Target, a Component Count, a Data Type, and a Mantissa shifter (to allow floats to be stored as smaller datatypes compared to FLOAT).&amp;lt;br/&amp;gt;Only one descriptor can exist for each attribute.&lt;br /&gt;
&lt;br /&gt;
The Attribute Target tells the game what this buffer is used for.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Attribute Targets&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000009 || POSITION || This buffer represents the positions of vertices in the model. Basically required for all visual models.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000A || NORMAL || This buffer represents vertex normals, used for the engine&#039;s vertex shading. Not needed if no material requires it.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000B || COLOR_0 || This buffer is available for Vertex Colors.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000C || COLOR_1 || This buffer is available for Vertex Colors.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000D || TEXCOORD_0 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000E || TEXCOORD_1 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0000000F || TEXCOORD_2 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000010 || TEXCOORD_3 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000011 || TEXCOORD_4 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000012 || TEXCOORD_5 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000013 || TEXCOORD_6 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000014 || TEXCOORD_7 || This buffer is available for Texture Coordinates.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000019 || TANGENT || &#039;&#039;Currently unknown exactly what goes in here.&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x000000FF || List End || A buffer using this target will end the descriptor list.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The component count tells the game how many parts of the component that there are. Note that the values are considered based on the attribute target they&#039;re assigned to.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Component Count&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || POSITION_XY || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || POSITION_XYZ || Represents a position in 3D space with 3 values: X, Y, and Z.&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || NORMAL_XYZ || Represents a normal vector in 3D space with 3 values: X, Y, and Z.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || NORMAL_NBT || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || NORMAL_NBT3 || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || COLOR_RGB || Represents a color value with only Red, Green, and Blue values.&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || COLOR_RGBA || Represents a color value with Red, Green, Blue, and Alpha values.&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || TEXCOORD_S || &#039;&#039;Unknown&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || TEXCOORD_ST || Represents a UV texture coordinate with 2 values: X and Y.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The Data Type tells the game how many bytes each value is, in the sense that an Int32 is 4 bytes, a Int16 is 2 bytes, a Float is 4 bytes, etc.&amp;lt;br/&amp;gt;Note that the Color values have a different set of options.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Data Types&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || UInt8 || 1 byte per value (0 to 255)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || Int8 || 1 byte per value (-128 to 127)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || UInt16 || 2 bytes per value (0 to 65535)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || Int16 || 2 bytes per value (-32,768 to 32,767)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || Float || 4 bytes per value&lt;br /&gt;
|-&lt;br /&gt;
|colspan=&amp;quot;3&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000000 || RGB565 || 2 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000001 || RGB8 || 3 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000002 || RGBX8 || 3 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000003 || RGBA4 || 2 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000004 || RGBA6 || 4 bytes per color&lt;br /&gt;
|-&lt;br /&gt;
| 0x00000005 || RGBA8 || 4 bytes per color&lt;br /&gt;
|}&lt;br /&gt;
&amp;gt; &#039;&#039;Note: Both games require colors to be 4 bytes wide at all times, so changing from RGBA8 is worthless.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== EVP1 - Skinning Envelopes ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;EVP1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || The number of Envelopes stored.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || &amp;quot;Joint Count&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || &amp;quot;&#039;Joint Count&#039; list index&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x14 || Int32 || &amp;quot;Joint Weight&amp;quot; list offset&lt;br /&gt;
|-&lt;br /&gt;
| 0x18 || Int32 || &amp;quot;Inverse Bind Matrices&amp;quot; list offset&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== DRW1 - Skinning Assignments ==&lt;br /&gt;
&lt;br /&gt;
== JNT1 - Joint Hierarchy ==&lt;br /&gt;
&lt;br /&gt;
== SHP1 - Shape Information==&lt;br /&gt;
&lt;br /&gt;
== MAT2 - Material List (Old) ==&lt;br /&gt;
Technically supported by the game, but not known to be used by any model.&lt;br /&gt;
&lt;br /&gt;
== MAT3 - Material List ==&lt;br /&gt;
&lt;br /&gt;
== MDL3 - Display List ==&lt;br /&gt;
&lt;br /&gt;
== TEX1 - Texture Data ==&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=790</id>
		<title>BMD/BDL (File Format)</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=790"/>
		<updated>2025-01-08T16:10:37Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: Add section headers&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:File formats]]&lt;br /&gt;
{{WIP}}&lt;br /&gt;
&lt;br /&gt;
BMD (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;M&#039;&#039;&#039;o&#039;&#039;&#039;d&#039;&#039;&#039;el) and BDL (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;D&#039;&#039;&#039;isplay &#039;&#039;&#039;L&#039;&#039;&#039;ist) are two 3D model formats used in &#039;&#039;Super Mario Galaxy&#039;&#039; and &#039;&#039;Super Mario Galaxy 2&#039;&#039;, among a few other &#039;&#039;Wii&#039;&#039; and &#039;&#039;GameCube&#039;&#039; games, such as &#039;&#039;Super Mario Sunshine&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These two formats hold the same data, except BDL contains an additional set of data which is used for faster rendering speeds.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Super Mario Galaxy&#039;&#039; &amp;amp; &#039;&#039;Super Mario Galaxy 2&#039;&#039; contain J3DLoader versions 21 and 26.&lt;br /&gt;
&lt;br /&gt;
== File Header ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || The magic that tells the game which format this file is. (ASCII)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bmd2&#039;&#039;&#039; for BMD (J3DLoader V21)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bmd3&#039;&#039;&#039; for BMD (J3DLoader v26)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bdl4&#039;&#039;&#039; for BDL (J3DLoader v26)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int32 || The total size of the file&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || The number of chunks present in this file.&amp;lt;br/&amp;gt;&#039;&#039;&#039;8&#039;&#039;&#039; for BMD&amp;lt;br/&amp;gt;&#039;&#039;&#039;9&#039;&#039;&#039; for BDL&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Subversion Header ===&lt;br /&gt;
This part of the header is not used, and can be anything.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || A 4 character value representing the Subversion. Usually SVR3 for SMG/2.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Byte[12] || Twelve bytes of padding. Usually these are &#039;&#039;&#039;0xFF&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Information (INF1) ==&lt;br /&gt;
The &#039;&#039;&#039;Inf&#039;&#039;&#039;ormation section hosts a hierarchy of Joints, Materials, and Shapes, which are used to render the model.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;INF1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || [[#J3DLoader%20Flags|J3DLoader Flags]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Matrix Group Count&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Vertex Count&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== J3DLoader Flags ===&lt;br /&gt;
The J3DLoader contains several flags which affect how models are handled. There are more than what are shown here, however, those must be applied by the game itself in the code.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000000 || No flags applied (TODO: Check if this defaults to basic matrix calculation)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000001 || Use Autodesk Softimage matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000010 || Use Autodesk Maya matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000100 || Use Basic matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000001000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000010000 || UseImmidiateMtx (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000100000 || UsePostTexMtx (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000001000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000010000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000100000000 || NoMatrixTransform (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000001000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000010000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000100000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0001000000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0010000000000000 || DoBdlMaterialCalc&lt;br /&gt;
|-&lt;br /&gt;
| 0b0100000000000000 || NoBdlMaterialPatch - If set, skips the call to &#039;&#039;&#039;J3DModelLoader::readPatchedMaterial&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0b1000000000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
For all BMD files, the game always includes load flags &#039;&#039;Material_PE_Full&#039;&#039;, &#039;&#039;Material_UseIndirect&#039;&#039;, &#039;&#039;UseUniqueMaterials&#039;&#039;, and &#039;&#039;UNKNOWN_21&#039;&#039;.&amp;lt;br/&amp;gt;&lt;br /&gt;
For all BDL files, the game always includes load flags &#039;&#039;Material_UseIndirect&#039;&#039;, and &#039;&#039;UseUniqueMaterials&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;gt; &#039;&#039;Note: Changing the load flags by changing the code doesn&#039;t seem to do much.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== VTX1 ==&lt;br /&gt;
&lt;br /&gt;
== EVP1 ==&lt;br /&gt;
&lt;br /&gt;
== DRW1 ==&lt;br /&gt;
&lt;br /&gt;
== JNT1 ==&lt;br /&gt;
&lt;br /&gt;
== SHP1 ==&lt;br /&gt;
&lt;br /&gt;
== MAT2 ==&lt;br /&gt;
&lt;br /&gt;
== MAT3 ==&lt;br /&gt;
&lt;br /&gt;
== MDL3 ==&lt;br /&gt;
&lt;br /&gt;
== TEX1 ==&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=784</id>
		<title>BMD/BDL (File Format)</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=784"/>
		<updated>2025-01-02T07:40:51Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:File formats]]&lt;br /&gt;
{{WIP}}&lt;br /&gt;
&lt;br /&gt;
BMD (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;M&#039;&#039;&#039;o&#039;&#039;&#039;d&#039;&#039;&#039;el) and BDL (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;D&#039;&#039;&#039;isplay &#039;&#039;&#039;L&#039;&#039;&#039;ist) are two 3D model formats used in &#039;&#039;Super Mario Galaxy&#039;&#039; and &#039;&#039;Super Mario Galaxy 2&#039;&#039;, among a few other &#039;&#039;Wii&#039;&#039; and &#039;&#039;GameCube&#039;&#039; games, such as &#039;&#039;Super Mario Sunshine&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These two formats hold the same data, except BDL contains an additional set of data which is used for faster rendering speeds.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Super Mario Galaxy&#039;&#039; &amp;amp; &#039;&#039;Super Mario Galaxy 2&#039;&#039; contain J3DLoader versions 21 and 26.&lt;br /&gt;
&lt;br /&gt;
== File Header ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || The magic that tells the game which format this file is. (ASCII)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bmd2&#039;&#039;&#039; for BMD (J3DLoader V21)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bmd3&#039;&#039;&#039; for BMD (J3DLoader v26)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bdl4&#039;&#039;&#039; for BDL (J3DLoader v26)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int32 || The total size of the file&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || The number of chunks present in this file.&amp;lt;br/&amp;gt;&#039;&#039;&#039;8&#039;&#039;&#039; for BMD&amp;lt;br/&amp;gt;&#039;&#039;&#039;9&#039;&#039;&#039; for BDL&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Subversion Header ===&lt;br /&gt;
This part of the header is not used, and can be anything.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || A 4 character value representing the Subversion. Usually SVR3 for SMG/2.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Byte[12] || Twelve bytes of padding. Usually these are &#039;&#039;&#039;0xFF&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Information (INF1) ==&lt;br /&gt;
The &#039;&#039;&#039;Inf&#039;&#039;&#039;ormation section hosts a hierarchy of Joints, Materials, and Shapes, which are used to render the model.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;INF1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || [[#J3DLoader%20Flags|J3DLoader Flags]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Matrix Group Count&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Vertex Count&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== J3DLoader Flags ===&lt;br /&gt;
The J3DLoader contains several flags which affect how models are handled. There are more than what are shown here, however, those must be applied by the game itself in the code.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000000 || No flags applied (TODO: Check if this defaults to basic matrix calculation)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000001 || Use Autodesk Softimage matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000010 || Use Autodesk Maya matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000100 || Use Basic matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000001000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000010000 || UseImmidiateMtx (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000100000 || UsePostTexMtx (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000001000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000010000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000100000000 || NoMatrixTransform (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000001000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000010000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000100000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0001000000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0010000000000000 || DoBdlMaterialCalc&lt;br /&gt;
|-&lt;br /&gt;
| 0b0100000000000000 || NoBdlMaterialPatch - If set, skips the call to &#039;&#039;&#039;J3DModelLoader::readPatchedMaterial&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0b1000000000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
For all BMD files, the game always includes load flags &#039;&#039;Material_PE_Full&#039;&#039;, &#039;&#039;Material_UseIndirect&#039;&#039;, &#039;&#039;UseUniqueMaterials&#039;&#039;, and &#039;&#039;UNKNOWN_21&#039;&#039;.&amp;lt;br/&amp;gt;&lt;br /&gt;
For all BDL files, the game always includes load flags &#039;&#039;Material_UseIndirect&#039;&#039;, and &#039;&#039;UseUniqueMaterials&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;gt; &#039;&#039;Note: Changing the load flags by changing the code doesn&#039;t seem to do much.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=783</id>
		<title>BMD/BDL (File Format)</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=783"/>
		<updated>2025-01-02T04:40:45Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:File formats]]&lt;br /&gt;
{{WIP}}&lt;br /&gt;
&lt;br /&gt;
BMD (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;M&#039;&#039;&#039;o&#039;&#039;&#039;d&#039;&#039;&#039;el) and BDL (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;D&#039;&#039;&#039;isplay &#039;&#039;&#039;L&#039;&#039;&#039;ist) are two 3D model formats used in &#039;&#039;Super Mario Galaxy&#039;&#039; and &#039;&#039;Super Mario Galaxy 2&#039;&#039;, among a few other &#039;&#039;Wii&#039;&#039; and &#039;&#039;GameCube&#039;&#039; games, such as &#039;&#039;Super Mario Sunshine&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These two formats hold the same data, except BDL contains an additional set of data which is used for faster rendering speeds.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Super Mario Galaxy&#039;&#039; &amp;amp; &#039;&#039;Super Mario Galaxy 2&#039;&#039; contain J3DLoader versions 21 and 26.&lt;br /&gt;
&lt;br /&gt;
== File Header ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || The magic that tells the game which format this file is. (ASCII)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bmd2&#039;&#039;&#039; for BMD (J3DLoader V21)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bmd3&#039;&#039;&#039; for BMD (J3DLoader v26)&amp;lt;br/&amp;gt;&#039;&#039;&#039;J3D2bdl4&#039;&#039;&#039; for BDL (J3DLoader v26)&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int32 || The total size of the file&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || The number of chunks present in this file.&amp;lt;br/&amp;gt;&#039;&#039;&#039;8&#039;&#039;&#039; for BMD&amp;lt;br/&amp;gt;&#039;&#039;&#039;9&#039;&#039;&#039; for BDL&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Subversion Header ===&lt;br /&gt;
This part of the header is not used, and can be anything.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || A 4 character value representing the Subversion. Usually SVR3 for SMG/2.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Byte[12] || Twelve bytes of padding. Usually these are &#039;&#039;&#039;0xFF&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Information (INF1) ==&lt;br /&gt;
The &#039;&#039;&#039;Inf&#039;&#039;&#039;ormation section hosts a hierarchy of Joints, Materials, and Shapes, which are used to render the model.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || Always &#039;&#039;&#039;INF1&#039;&#039;&#039; (ASCII)&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Int32 || The total size of this chunk&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int16 || [[#J3DLoader%20Flags|J3DLoader Flags]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Int16 || Padding (0xFFFF)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Matrix Group Count&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Int32 || Vertex Count&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== J3DLoader Flags ===&lt;br /&gt;
The J3DLoader contains several flags which affect how models are handled. There are more than what are shown here, however, those must be applied by the game itself in the code.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000000 || No flags applied (TODO: Check if this defaults to basic matrix calculation)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000001 || Use Autodesk Softimage matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000010 || Use Autodesk Maya matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000000100 || Use Basic matrix calculation&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000001000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000010000 || UseImmidiateMtx (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000000100000 || UsePostTexMtx (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000001000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000010000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000000100000000 || NoMatrixTransform (needs research)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000001000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000010000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0000100000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0001000000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0b0010000000000000 || DoBdlMaterialCalc (needs research. might skip a call to `J3DModelLoader::readPatchedMaterial`... Look into that soon.)&lt;br /&gt;
|-&lt;br /&gt;
| 0b0100000000000000 || &#039;&#039;UNKNOWN&#039;&#039; (Might be related to the above one)&lt;br /&gt;
|-&lt;br /&gt;
| 0b1000000000000000 || &#039;&#039;UNKNOWN&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=782</id>
		<title>BMD/BDL (File Format)</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=BMD/BDL_(File_Format)&amp;diff=782"/>
		<updated>2025-01-01T00:49:41Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: Begin a BMD/BDL page with the goal to actually have a complete one&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:File formats]]&lt;br /&gt;
{{WIP}}&lt;br /&gt;
&lt;br /&gt;
BMD (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;M&#039;&#039;&#039;o&#039;&#039;&#039;d&#039;&#039;&#039;el) and BDL (&#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;D&#039;&#039;&#039;isplay &#039;&#039;&#039;L&#039;&#039;&#039;ist) are two 3D model formats used in &#039;&#039;Super Mario Galaxy&#039;&#039; and &#039;&#039;Super Mario Galaxy 2&#039;&#039;, among a few other &#039;&#039;Wii&#039;&#039; and &#039;&#039;GameCube&#039;&#039; games, such as &#039;&#039;Super Mario Sunshine&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
These two formats hold the same data, except BDL contains an additional set of data which is used for faster rendering speeds.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=Decompiling&amp;diff=776</id>
		<title>Decompiling</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=Decompiling&amp;diff=776"/>
		<updated>2024-12-27T14:57:52Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: Add Overload Symbol suffixes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Guides]]&lt;br /&gt;
[[Category:Decompiling]]&lt;br /&gt;
{{WIP}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&#039;&#039;Decompiling&#039;&#039; is the process of taking assembly code and turning it back into a higher level language such as C or C++. It is essentially the reverse of &#039;&#039;compiling&#039;&#039;. &#039;&#039;Matching decompilation&#039;&#039; is the process of decompiling, but having the compiled code match the original assembly 1:1. While matching decompilation is harder than normal decompiling, it can become easier when you understand the patterns of the compiler used. This page aims to let new people understand how this process works, and hopefully be able to get new people into decompilation! While you do not need to be an expert at C or C++ to decompile, it is recommended that you have some experience before attempting decompilation. It is also very recommended that you have some prior knowledge of PowerPC assembly, as that is the key to understanding how a function works. [https://www.nxp.com/docs/en/reference-manual/MPC82XINSET.pdf This document] is a good way to learn or refresh knowledge of the PowerPC architecture. [https://www.warthman.com/images/IBM_PPC_Compiler_Writer%27s_Guide-cwg.pdf This document] is also good to learn some of the patterns that CodeWarrior does.&lt;br /&gt;
&lt;br /&gt;
== Getting Set Up ==&lt;br /&gt;
To begin decompiling &#039;&#039;Super Mario Galaxy&#039;&#039;, you first need to set up the environment. You will need the following tools:&lt;br /&gt;
* [https://gitforwindows.org/ Git (Windows)]&lt;br /&gt;
* Any IDE ([https://code.visualstudio.com/ Visual Studio Recommended])&lt;br /&gt;
* [https://www.python.org/downloads/release/python-397/ Python 3.9.7]&lt;br /&gt;
* IDA Pro (recommended) or Ghidra (Not recommended)&lt;br /&gt;
* [https://shibbo.net/smg/RMGK01_01.idb SMG1 Korean IDB (For IDA)]&lt;br /&gt;
* A &#039;&#039;Super Mario Galaxy&#039;&#039; Korean region DOL.&lt;br /&gt;
&lt;br /&gt;
After you have acquired all of these, setting up [https://github.com/shibbo/Petari Petari] is very simple.&lt;br /&gt;
&lt;br /&gt;
# With a new command prompt open, type in &#039;&#039;&#039;git clone https://github.com/shibbo/Petari&#039;&#039;&#039;. This will clone the repository into a directory called &amp;quot;Petari&amp;quot;.&lt;br /&gt;
# In this new &amp;quot;Petari&amp;quot; folder, place the SMG1 Korean &#039;&#039;&#039;main.dol&#039;&#039;&#039; into this folder, and rename it to &#039;&#039;&#039;baserom.dol&#039;&#039;&#039;.&lt;br /&gt;
# Open a new command prompt in the &amp;quot;Petari&amp;quot; folder.&lt;br /&gt;
# Run the command &#039;&#039;&#039;python setup.py&#039;&#039;&#039;. This will verify your DOL and install all of the libraries used, and the compilers we use to compile the code.&lt;br /&gt;
# Run the command &#039;&#039;&#039;python build.py&#039;&#039;&#039;. This will build the entire project. If you see any warnings, do not worry about them.&lt;br /&gt;
&lt;br /&gt;
== Environment ==&lt;br /&gt;
To properly utilize and use &#039;&#039;Petari&#039;&#039;, it is necessary to understand the structure of the environment. Petari is structured in a way that makes it easy to access and use.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Folder Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| archive || The folder that gets created when &#039;&#039;&#039;build.py -link&#039;&#039;&#039; is ran. Contains an archive of the object files in each library.&lt;br /&gt;
|-&lt;br /&gt;
| build || The folder that gets created when &#039;&#039;&#039;build.py&#039;&#039;&#039; is ran. Contains the compiled object files.&lt;br /&gt;
|-&lt;br /&gt;
| csv || Contains CSV files that store the status of functions being matched.&lt;br /&gt;
|-&lt;br /&gt;
| data || Contains map files and the percentage badges for the GitHub repo.&lt;br /&gt;
|-&lt;br /&gt;
| docs || The folder that gets created when &#039;&#039;&#039;progress.py&#039;&#039;&#039; is ran. Contains all of the Markdown documentation for matching status.&lt;br /&gt;
|-&lt;br /&gt;
| include || Contains all of the header files for &#039;&#039;Super Mario Galaxy&#039;&#039; specific code.&lt;br /&gt;
|-&lt;br /&gt;
| libs || Contains this folder structure but for different libraries used by the game.&lt;br /&gt;
|-&lt;br /&gt;
| scripts || Various scripts used in IDA for generating headers.&lt;br /&gt;
|-&lt;br /&gt;
| source || Contains all of the source files for &#039;&#039;Super Mario Galaxy&#039;&#039; specific code.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Libraries ==&lt;br /&gt;
&#039;&#039;Super Mario Galaxy&#039;&#039; uses a lot of libraries for certain functionality such as heaps, layouts, OS specific code, and more. Each library described in the table below are &#039;&#039;&#039;statically linked&#039;&#039;&#039; to the game, so every library&#039;s used code is inside of the &#039;&#039;main.dol&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Non-SMG Libraries ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Name !! Language !! Description&lt;br /&gt;
|-&lt;br /&gt;
| JSystem || C++ || Contains classes for backend things, such as heaps and linked lists.&lt;br /&gt;
|-&lt;br /&gt;
| MetroTRK || C || Target Resident Kernel, for debugging.&lt;br /&gt;
|-&lt;br /&gt;
| MSL_C || C &amp;amp; C++ || Contains standard library functions and types.&lt;br /&gt;
|-&lt;br /&gt;
| nw4r || C++ || Contains classes for sounds, layouts, and more. (SMG only uses the layouts and some math functions)&lt;br /&gt;
|-&lt;br /&gt;
| Runtime || C &amp;amp; C++ || Contains functions that relate to CodeWarrior&#039;s runtime code generation (ctor / dtor lists, etc)&lt;br /&gt;
|-&lt;br /&gt;
| RVL_SDK || C || Contains functions that relate to the Wii&#039;s &amp;quot;OS&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
| RVLFaceLib || C || Contains functions that relate to Miis.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== SMG Libraries ===&lt;br /&gt;
All of &#039;&#039;Super Mario Galaxy&#039;&#039;&#039;s libraries are written in C++.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Header text !! Header text&lt;br /&gt;
|-&lt;br /&gt;
| Animation || Library for animation playing.&lt;br /&gt;
|-&lt;br /&gt;
| AreaObj || Library for invisible areas that can be accessed by players in the game.&lt;br /&gt;
|-&lt;br /&gt;
| AudioLib || N/A&lt;br /&gt;
|-&lt;br /&gt;
| Boss || Library for all of the bosses and mini-bosses in the game.&lt;br /&gt;
|-&lt;br /&gt;
| Camera || Library for all camera types.&lt;br /&gt;
|-&lt;br /&gt;
| Demo || Library for all cutscenes.&lt;br /&gt;
|-&lt;br /&gt;
| Effect || Library for all effect rendering.&lt;br /&gt;
|-&lt;br /&gt;
| Enemy || Library for all enemies.&lt;br /&gt;
|-&lt;br /&gt;
| GameAudio || N/A&lt;br /&gt;
|-&lt;br /&gt;
| Gravity || Library for all of the gravity types in the game.&lt;br /&gt;
|-&lt;br /&gt;
| LiveActor || Library for LiveActor, which is an actor that can switch states.&lt;br /&gt;
|-&lt;br /&gt;
| Map || Library for map classes that do not directly interact with the player. (ie switches)&lt;br /&gt;
|-&lt;br /&gt;
| MapObj || Library for all of the map objects in the game.&lt;br /&gt;
|-&lt;br /&gt;
| NameObj || Library for the most basic form of an object in the game.&lt;br /&gt;
|-&lt;br /&gt;
| NPC || Library for all of the non-playable characters.&lt;br /&gt;
|-&lt;br /&gt;
| NWC24 || Library for the mail system in the game.&lt;br /&gt;
|-&lt;br /&gt;
| Player || Library for all of the player related functions.&lt;br /&gt;
|-&lt;br /&gt;
| RhythmLib || N/A&lt;br /&gt;
|-&lt;br /&gt;
| Ride || Library for all of the actors that can be controlled by the player.&lt;br /&gt;
|-&lt;br /&gt;
| Scene || Library for all of the game scene related code.&lt;br /&gt;
|-&lt;br /&gt;
| Screen || Library for all of the layouts in the game.&lt;br /&gt;
|-&lt;br /&gt;
| Speaker || Library for the sound effect playing done on the Wiimote.&lt;br /&gt;
|-&lt;br /&gt;
| System || Library for a lot of the game&#039;s backend systems.&lt;br /&gt;
|-&lt;br /&gt;
| Util || Library for utility functions and classes.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Basics ==&lt;br /&gt;
To properly decompile, it is vital to know how a lot of the assembly will translate into C / C++ code. Here are a couple of patterns that you will see when decompiling code.&lt;br /&gt;
&lt;br /&gt;
== Class Mapping ==&lt;br /&gt;
=== Base Class ===&lt;br /&gt;
The first step to decompiling a class is to map out the class itself. You need to be sure that you document every member, its type (as close as you can guess), its virtual functions, and more. The easiest way to achieve this is to look at the class&#039;s &#039;&#039;constructor&#039;&#039;. Seen below, is an example of a &#039;&#039;constructor&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[Image:NameObj_Ctor.png|frameless|700px|The constructor for &#039;&#039;NameObj&#039;&#039;.]]&lt;br /&gt;
&lt;br /&gt;
There are a couple of takeaways from this screenshot:&lt;br /&gt;
* The constructor passes an argument, which is a &#039;&#039;&#039;const char *&#039;&#039;&#039; (contained in r4) and is stored in (r3 + 0x4).&lt;br /&gt;
* (r3 + 0x0) is where the vtable is &#039;&#039;usually&#039;&#039; stored when a class has virtual functions. There are rare execptions.&lt;br /&gt;
* (r3 + 0x8) is stored with a &#039;&#039;&#039;sth&#039;&#039;&#039;, which means that it is a &#039;&#039;&#039;short&#039;&#039;&#039; datatype.&lt;br /&gt;
* (r3 + 0xA) is also stored with a &#039;&#039;&#039;sth&#039;&#039;&#039;, but with a &#039;&#039;&#039;-1&#039;&#039;&#039; value, so we know for sure that this type is &#039;&#039;signed&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Keep in mind that a constructor does not have to initialize every single member variable in the class! So there could be other members in a class that aren&#039;t mentioned in the constructor at all. After you look at the constructor, look around at the &#039;&#039;member functions&#039;&#039; to see if they use any members that are not initialized in the constructor. You can always verify if your class setup is correct when you can find where this class is created using the &#039;&#039;&#039;new&#039;&#039;&#039; operator. Check if the size passed to the &#039;&#039;&#039;new&#039;&#039;&#039; call matches the size of the class that you have mapped. If it is smaller, you are missing members. If it is bigger, you have too many! Remember that the vtable is implicitly stored at &#039;&#039;&#039;(this + 0x0)&#039;&#039;&#039;, so you do not have to explicitly define it. With all of these members documented, our class setup looks a little like this so far:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class NameObj {&lt;br /&gt;
public:&lt;br /&gt;
    NameObj(const char *pName);&lt;br /&gt;
&lt;br /&gt;
    /* remember that the vtable will be placed here once we define our virtuals! */&lt;br /&gt;
    /* 0x4 */   const char* mName;&lt;br /&gt;
    /* 0x8 */   volatile u16 mFlags;&lt;br /&gt;
    /* 0xA */   s16 mExecutorIdx;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After the members comes the &#039;&#039;&#039;vtable&#039;&#039;&#039;, or &#039;&#039;virtual table&#039;&#039;. It is an array of function pointers that can be overridden by classes that inherit the parent class. The vtable for &#039;&#039;&#039;NameObj&#039;&#039;&#039; looks like this:&lt;br /&gt;
[[Image:NameObj_Vtable.png|frameless|700px|The vtable for &#039;&#039;NameObj&#039;&#039;.]]&lt;br /&gt;
&lt;br /&gt;
To document the vtable, you simply document every single function placed here that contains the class name of the class you are currently decompiling. Since &#039;&#039;NameObj&#039;&#039; is a base class, every single function here is going to be defined. If a class overrides a function, you will only document the functions that are overridden. After documenting the vtable, our class looks something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class NameObj {&lt;br /&gt;
public:&lt;br /&gt;
    NameObj(const char *pName);&lt;br /&gt;
&lt;br /&gt;
    virtual ~NameObj();&lt;br /&gt;
    virtual void init(const JMapInfoIter &amp;amp;rIter);&lt;br /&gt;
    virtual void initAfterPlacement();&lt;br /&gt;
    virtual void movement();&lt;br /&gt;
    virtual void draw() const;&lt;br /&gt;
    virtual void calcAnim();&lt;br /&gt;
    virtual void calcViewAndEntry();&lt;br /&gt;
&lt;br /&gt;
    /* remember that the vtable will be placed here once we define our virtuals! */&lt;br /&gt;
    /* 0x4 */   const char* mName;&lt;br /&gt;
    /* 0x8 */   volatile u16 mFlags;&lt;br /&gt;
    /* 0xA */   s16 mExecutorIdx;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once the vtable is complete, you want to document all of the member functions that are in the class. Since &#039;&#039;Super Mario Galaxy 1&#039;&#039; has a symbol map, we can easily find the member functions that &#039;&#039;NameObj&#039;&#039; contains. Once you have figured out their return types and their arguments, you can finish mapping out a class! After finding all of &#039;&#039;NameObj&#039;&#039;&#039;s member functions, the class looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class NameObj {&lt;br /&gt;
public:&lt;br /&gt;
    NameObj(const char *pName);&lt;br /&gt;
&lt;br /&gt;
    virtual ~NameObj();&lt;br /&gt;
    virtual void init(const JMapInfoIter &amp;amp;rIter);&lt;br /&gt;
    virtual void initAfterPlacement();&lt;br /&gt;
    virtual void movement();&lt;br /&gt;
    virtual void draw() const;&lt;br /&gt;
    virtual void calcAnim();&lt;br /&gt;
    virtual void calcViewAndEntry();&lt;br /&gt;
&lt;br /&gt;
    void initWithoutIter();&lt;br /&gt;
    void setName(const char *pName);&lt;br /&gt;
    void executeMovement();&lt;br /&gt;
    void requestSuspend();&lt;br /&gt;
    void requestResume();&lt;br /&gt;
    void syncWithFlags();&lt;br /&gt;
&lt;br /&gt;
    /* remember that the vtable will be placed here once we define our virtuals! */&lt;br /&gt;
    /* 0x4 */   const char* mName;&lt;br /&gt;
    /* 0x8 */   volatile u16 mFlags;&lt;br /&gt;
    /* 0xA */   s16 mExecutorIdx;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Inheriting Class ===&lt;br /&gt;
The process of mapping a class that inherits another class is mainly the same as mapping a base class, except there are things to watch out for so you don&#039;t accidentally duplicate a member variable. The first step is to look at the &#039;&#039;constructor&#039;&#039; of the class you want to map:&lt;br /&gt;
&lt;br /&gt;
[[Image:TripodBossCoin_Ctor.png|frameless|700px|The constructor for &#039;&#039;TripodBossCoin&#039;&#039;.]]&lt;br /&gt;
&lt;br /&gt;
There are a few takeaways from this by looking at the constructor:&lt;br /&gt;
* The class inherits NameObj. Since &#039;&#039;NameObj&#039;&#039; is 0xC bytes long, we know that any member variables for &#039;&#039;TripodBossCoin&#039;&#039; start at &#039;&#039;&#039;0xC&#039;&#039;&#039;.&lt;br /&gt;
* The vtable pointer &#039;&#039;&#039;(this + 0x0)&#039;&#039;&#039; from &#039;&#039;NameObj&#039;&#039; is overridden with the vtable for &#039;&#039;TripodBossCoin&#039;&#039; implicitly.&lt;br /&gt;
* &#039;&#039;&#039;(this + 0xC)&#039;&#039;&#039; is a 32-bit integer initialized to 0. It is not possible to determine if it is signed or not from this store alone.&lt;br /&gt;
* &#039;&#039;&#039;(this + 0x10)&#039;&#039;&#039; is the same scenario as &#039;&#039;&#039;(this + 0xC)&#039;&#039;&#039;.&lt;br /&gt;
* There is a direct instance of &#039;&#039;JGeometry::TMatrix34&amp;lt;JGeometry::SMatrix34C&amp;lt;f32&amp;gt;&#039;&#039; at 0x14. (in Petari &amp;amp; Syati this is typedef&#039;d as &#039;&#039;TMtx34f&#039;&#039;). Since &#039;&#039;TMtx34f&#039;&#039; is 0x30 in size, the next member variable is at 0x14 + 0x30, which is &#039;&#039;&#039;0x44&#039;&#039;&#039;.&lt;br /&gt;
* &#039;&#039;&#039;(this + 0x44)&#039;&#039;&#039; is a signed 32-bit integer, due to &#039;&#039;&#039;-1&#039;&#039;&#039; being stored to it.&lt;br /&gt;
&lt;br /&gt;
After these observations, our class looks like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class TripodBossCoin : public NameObj {&lt;br /&gt;
public:&lt;br /&gt;
	TripodBossCoin(const char *);&lt;br /&gt;
	&lt;br /&gt;
	u32 _C;&lt;br /&gt;
	u32 _10;&lt;br /&gt;
	TMtx34f _14;&lt;br /&gt;
	s32 _44;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next are the virtuals. The process is a little different from a base class. Let&#039;s take a look at the vtable for &#039;&#039;TripodBossCoin&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
[[Image:TripodBossCoin_Vtable.png|frameless|700px|The vtable for &#039;&#039;TripodBossCoin&#039;&#039;.]]&lt;br /&gt;
&lt;br /&gt;
The biggest takeaway from this screenshot is that only three virtuals are overriden by &#039;&#039;TripodBossCoin&#039;&#039;. And those three functions are &#039;&#039;&#039;TripodBossCoin::~TripodBossCoin()&#039;&#039;&#039;, &#039;&#039;&#039;TripodBossCoin::init()&#039;&#039;&#039; and &#039;&#039;&#039;TripodBossCoin::movement()&#039;&#039;&#039;. So we define them as such:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class TripodBossCoin : public NameObj {&lt;br /&gt;
public:&lt;br /&gt;
	TripodBossCoin(const char *);&lt;br /&gt;
&lt;br /&gt;
    virtual ~TripodBossCoin();&lt;br /&gt;
    virtual void init(const JMapInfoIter &amp;amp;);&lt;br /&gt;
    virtual void movement();&lt;br /&gt;
	&lt;br /&gt;
	u32 _C;&lt;br /&gt;
	u32 _10;&lt;br /&gt;
	TMtx34f _14;&lt;br /&gt;
	s32 _44;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is worth noting that the &#039;&#039;&#039;override&#039;&#039;&#039; keyword was not a part of the C++ standard at this point in time, so all overrides are implicit. After all of this is done, you simply have to repeat the process for base classes and document the member functions that are a part of the class.&lt;br /&gt;
&lt;br /&gt;
=== Loops ===&lt;br /&gt;
==== Predefined bounds ====&lt;br /&gt;
Let&#039;s take a simple loop that stores &amp;lt;i&amp;gt;nullptr&amp;lt;/i&amp;gt; in each 8 elements of a pointer array.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class TestClass {&lt;br /&gt;
public:&lt;br /&gt;
    TestClass();&lt;br /&gt;
&lt;br /&gt;
     int* mPointers[8];&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
TestClass::TestClass() {&lt;br /&gt;
    for (int i = 0; i &amp;lt; 8; i++) {&lt;br /&gt;
        mPointers[i] = nullptr;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output assembly would look something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
li r0, 8 # there are 8 elements in this loop&lt;br /&gt;
li r5, 0 # the value to store in the element (nullptr)&lt;br /&gt;
li r4, 0 # the current element offset in the loop&lt;br /&gt;
mtctr r0 # move the number of iterations into the counter register (8)&lt;br /&gt;
&lt;br /&gt;
loop:&lt;br /&gt;
    stwx r5, r3, r4 # store 0 (r5) into the array at r3 (this) + r4 (our current offset, which is i * 4)&lt;br /&gt;
    addi r4, r4, 4 # increment our offset by sizeof(int) since integers are 32-bits&lt;br /&gt;
    bdnz+ loop # branch back to our loop again&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Variable Length Bounds ====&lt;br /&gt;
Let&#039;s take a simple loop that stores &amp;lt;i&amp;gt;nullptr&amp;lt;/i&amp;gt; in each element of a variable-length array. We will have a class with two members, one that contains the pointer array itself, and another that stores the number of pointers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class TestClass {&lt;br /&gt;
public:&lt;br /&gt;
    TestClass();&lt;br /&gt;
&lt;br /&gt;
     int** mPointers;&lt;br /&gt;
     int mNumPointers;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
TestClass::TestClass() {&lt;br /&gt;
    mNumPointers = 8;&lt;br /&gt;
    for (int i = 0; i &amp;lt; mNumPointers ; i++) {&lt;br /&gt;
        mPointers[i] = nullptr;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Because we do not know how many pointers we have stored, we cannot use the counter register like we did with a fixed-size array. Instead, the compiler will use a cmpw (signed integer) or cmplw (unsigned) instruction to compare the current iteration to how many pointers are stored in the class.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
li r0, 8 # there are 8 elements in this loop&lt;br /&gt;
li r7, 0 # the value to store in the element (nullptr)&lt;br /&gt;
stw r0, 4(r3) # r3 + 4 is the offset to our member variable &amp;quot;mNumPointers&amp;quot;&lt;br /&gt;
mr r6, r7 # simple copy of the 0 value so we can also use it for our counter&lt;br /&gt;
li r4, 0 # load 0 into our offset&lt;br /&gt;
b loop # branch into our loop&lt;br /&gt;
&lt;br /&gt;
loop:&lt;br /&gt;
    lwz r5, 0(r3) # load our pointer array from this + 0&lt;br /&gt;
    addi r7, r7, 1 # increment our index by 1&lt;br /&gt;
    stwx r6, r5, r4 # store our nullptr value (r6) into r5 + r4 (ptrArray + currentOffset)&lt;br /&gt;
    addi r4, r4, 4 # increment our offset by sizeof(int) since integers are 32-bits&lt;br /&gt;
    lwz r0, 4(r3) # load our number of pointers we will increment by (mNumPointers)&lt;br /&gt;
    cmpw r7, r0 # compare our number of pointers to the current index in our loop&lt;br /&gt;
    blt+ loop # branch if the number is less than mNumPointers&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Structure Access In Arrays (Pointer Array) ====&lt;br /&gt;
More complex forms of loops comes into play when you are iterating through structures and storing / loading members from those structures. Let&#039;s take this class for example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct TestStruct {&lt;br /&gt;
    int SomeMember;&lt;br /&gt;
    int AnotherMember;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
class TestClass {&lt;br /&gt;
public:&lt;br /&gt;
    TestClass();&lt;br /&gt;
&lt;br /&gt;
    void storeVals();&lt;br /&gt;
&lt;br /&gt;
     TestStruct** mStructures;&lt;br /&gt;
     int mNumStructures;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
For the sake of simplicity, let&#039;s assume that the TestClass constructor initializes the number of structures to 8, and constructs them accordingly. With that in mind, let&#039;s see how a struct store will work.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void TestClass::storeVals() {&lt;br /&gt;
    for (int i = 0; i &amp;lt; mNumStructures; i++) {&lt;br /&gt;
        mStructures[i]-&amp;gt;AnotherMember = 5;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The output assembly would look something like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
li r7, 0 # our &amp;quot;i&amp;quot; used in the loop, starts at 0&lt;br /&gt;
li r4, 0 # our current offset into the array&lt;br /&gt;
li r6, 5 # the value we are storing into the array&lt;br /&gt;
b loop&lt;br /&gt;
&lt;br /&gt;
loop:&lt;br /&gt;
    lwz r5, 0(r3) # load the array pointer&lt;br /&gt;
    addi r7, r7, 1 # increment our current index (i) by 1&lt;br /&gt;
    lwzx r5, r5, r4 # load the current structure, mStructures[i] where r4 is the current offset&lt;br /&gt;
    addi r4, r4, 4 # increment our offset by sizeof(TestStruct*), which is 4&lt;br /&gt;
    stw r6, 4(r5) # store our value (5) into (mStructures[i] + 4), which is our AnotherMember&lt;br /&gt;
    lwz r0, 4(r3) # load the number of structures from TestClass&lt;br /&gt;
    cmpw r7, r0 # compare the current index to our value in TestClass&lt;br /&gt;
    blt+ loop # loop back if it is less than the value&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Structure Access In Arrays (Direct Array) ====&lt;br /&gt;
Let&#039;s take the previous example and modify it a little. Instead of making an array of pointers to the struct instances, let&#039;s store the array &amp;lt;i&amp;gt;directly&amp;lt;/i&amp;gt; into our class instance.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
struct TestStruct {&lt;br /&gt;
    int SomeMember;&lt;br /&gt;
    int AnotherMember;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
class TestClass {&lt;br /&gt;
public:&lt;br /&gt;
    TestClass();&lt;br /&gt;
&lt;br /&gt;
    void storeVals();&lt;br /&gt;
&lt;br /&gt;
     TestStruct mStructures[8];&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Again, let us assume that the array has already been constructed and everything is initialized as it should be.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void TestClass::storeVals() {&lt;br /&gt;
    for (int i = 0; i &amp;lt; 8; i++) {&lt;br /&gt;
        mStructures[i].AnotherMember = 5;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The output assembly would look something like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
li r0, 8 # load our number of iterations (8)&lt;br /&gt;
li r4, 0 # current offset into the array. initialized at 0&lt;br /&gt;
li r6, 5 # the value to store into the array&lt;br /&gt;
mtctr r0 # move the number of iterations into the counter register&lt;br /&gt;
&lt;br /&gt;
loop:&lt;br /&gt;
    add r5, r3, r4 # jump to the offset into the array. r5 = (this + 0) + r4&lt;br /&gt;
    addi r4, r4, 8 # increment our current offset by sizeof(TestStruct), which is 8&lt;br /&gt;
    stw r6, 4(r5) # store our constant value (5) into the loaded struct + 4 (AnotherMember)&lt;br /&gt;
    bdnz+ loop # branch back to the loop if the counter is not 8&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Operator Overloads ==&lt;br /&gt;
There are specific ways that CodeWarrior mangles symbols when overloading operators for classes.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Operator !! Mangled Symbol&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;+&amp;quot; || &amp;quot;pl&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;-&amp;quot; || &amp;quot;mi&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;*&amp;quot; || &amp;quot;ml&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;/&amp;quot; || &amp;quot;dv&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;%&amp;quot; || &amp;quot;md&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;^&amp;quot; || &amp;quot;er&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;/=&amp;quot; || &amp;quot;adv&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;&amp;amp;&amp;quot; || &amp;quot;ad&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;&amp;amp;verbar;&amp;quot; || &amp;quot;or&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;~&amp;quot; || &amp;quot;co&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;!&amp;quot; || &amp;quot;nt&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;=&amp;quot; || &amp;quot;as&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;&amp;lt;&amp;quot; || &amp;quot;lt&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;&amp;gt;&amp;quot; || &amp;quot;gt&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;+=&amp;quot; || &amp;quot;apl&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;-=&amp;quot; || &amp;quot;ami&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;*=&amp;quot; || &amp;quot;amu&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;%=&amp;quot; || &amp;quot;amd&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;^=&amp;quot; || &amp;quot;aer&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;&amp;amp;=&amp;quot; || &amp;quot;aad&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;&amp;amp;verbar;=&amp;quot; || &amp;quot;aor&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;&amp;lt;&amp;lt;&amp;quot; || &amp;quot;ls&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;&amp;gt;&amp;gt;&amp;quot; || &amp;quot;rs&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;&amp;gt;&amp;gt;=&amp;quot; || &amp;quot;ars&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;&amp;lt;&amp;lt;=&amp;quot; || &amp;quot;als&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;==&amp;quot; || &amp;quot;eq&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;!=&amp;quot; || &amp;quot;ne&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;&amp;lt;=&amp;quot; || &amp;quot;le&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;&amp;gt;=&amp;quot; || &amp;quot;ge&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;&amp;amp;&amp;amp;&amp;quot; || &amp;quot;aa&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;&amp;amp;verbar;&amp;amp;verbar;&amp;quot; || &amp;quot;oo&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;++&amp;quot; || &amp;quot;pp&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;--&amp;quot; || &amp;quot;mm&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;()&amp;quot; || &amp;quot;cl&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;[]&amp;quot; || &amp;quot;vc&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;-&amp;gt;&amp;quot; || &amp;quot;rf&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;,&amp;quot; || &amp;quot;cm&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;quot;-&amp;gt;*&amp;quot; || &amp;quot;rm&amp;quot;&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=MediaWiki:Sidebar&amp;diff=774</id>
		<title>MediaWiki:Sidebar</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=MediaWiki:Sidebar&amp;diff=774"/>
		<updated>2024-12-18T06:28:00Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: I don&amp;#039;t understand mediawiki...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* navigation&lt;br /&gt;
** mainpage|mainpage-description&lt;br /&gt;
** recentchanges-url|recentchanges&lt;br /&gt;
** randompage-url|randompage&lt;br /&gt;
** helppage|help-mediawiki&lt;br /&gt;
* Modding&lt;br /&gt;
** Tools_and_Resources|Tools &amp;amp; Resources&lt;br /&gt;
** https://smgcommunity.github.io/galaxydatabase|Object Database&lt;br /&gt;
** Category:File_formats|File Formats&lt;br /&gt;
** Category:Files|Data Files&lt;br /&gt;
** Category:Lists|Data Lists&lt;br /&gt;
* Community&lt;br /&gt;
** https://discord.gg/ZxEqyYeZbf|Our Discord server&lt;br /&gt;
* SEARCH&lt;br /&gt;
* TOOLBOX&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=MediaWiki:Sidebar&amp;diff=773</id>
		<title>MediaWiki:Sidebar</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=MediaWiki:Sidebar&amp;diff=773"/>
		<updated>2024-12-18T06:27:28Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: ???&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* navigation&lt;br /&gt;
** mainpage|mainpage-description&lt;br /&gt;
** recentchanges-url|recentchanges&lt;br /&gt;
** randompage-url|randompage&lt;br /&gt;
** helppage|help-mediawiki&lt;br /&gt;
* Modding&lt;br /&gt;
** Tools_and_Resources|Tools &amp;amp; Resources&lt;br /&gt;
** https://smgcommunity.github.io/galaxydatabase/|Object Database&lt;br /&gt;
** Category:File_formats|File Formats&lt;br /&gt;
** Category:Files|Data Files&lt;br /&gt;
** Category:Lists|Data Lists&lt;br /&gt;
* Community&lt;br /&gt;
** https://discord.gg/ZxEqyYeZbf|Our Discord server&lt;br /&gt;
* SEARCH&lt;br /&gt;
* TOOLBOX&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=MediaWiki:Sidebar&amp;diff=772</id>
		<title>MediaWiki:Sidebar</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=MediaWiki:Sidebar&amp;diff=772"/>
		<updated>2024-12-18T06:24:41Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: Fix Object Database link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* navigation&lt;br /&gt;
** mainpage|mainpage-description&lt;br /&gt;
** recentchanges-url|recentchanges&lt;br /&gt;
** randompage-url|randompage&lt;br /&gt;
** helppage|help-mediawiki&lt;br /&gt;
* Modding&lt;br /&gt;
** Tools_and_Resources|Tools &amp;amp; Resources&lt;br /&gt;
** https://www.smgcommunity.github.io/galaxydatabase/|Object Database&lt;br /&gt;
** Category:File_formats|File Formats&lt;br /&gt;
** Category:Files|Data Files&lt;br /&gt;
** Category:Lists|Data Lists&lt;br /&gt;
* Community&lt;br /&gt;
** https://discord.gg/ZxEqyYeZbf|Our Discord server&lt;br /&gt;
* SEARCH&lt;br /&gt;
* TOOLBOX&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=BMS_(File_Format)&amp;diff=655</id>
		<title>BMS (File Format)</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=BMS_(File_Format)&amp;diff=655"/>
		<updated>2024-10-23T15:09:52Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== File Format ==&lt;br /&gt;
BMS files are &#039;&#039;&#039;B&#039;&#039;&#039;inary &#039;&#039;&#039;M&#039;&#039;&#039;usic &#039;&#039;&#039;S&#039;&#039;&#039;equences that store commands for the audio engine to play notes, similar to the MIDI file format.&lt;br /&gt;
&lt;br /&gt;
== Data ==&lt;br /&gt;
BMS files contain raw instructions for the audio engine. There are no headers or filesize checks. Each instruction (OpCode) stands for its own function in the engine. The following table lists all JAudio2 OpCodes that have functions in SMG2:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! OpCode&lt;br /&gt;
! Function (SMG/SMG2)&lt;br /&gt;
! Usage&lt;br /&gt;
! Example&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| 00&amp;lt;br /&amp;gt;01&amp;lt;br /&amp;gt;02&amp;lt;br /&amp;gt;...&amp;lt;br /&amp;gt;7D&amp;lt;br /&amp;gt;7E&amp;lt;br /&amp;gt;7F&lt;br /&gt;
| &lt;br /&gt;
| {OpCode[1]} {Voice[1]} {Velocity[1]}&amp;lt;br /&amp;gt;OpCode: one byte with range 0x00 through 0x7F. 0x00 = C-1, 0x60 = C4 (middle C), 0x7F = G9.&amp;lt;br /&amp;gt;Voice: one byte with range 0x01 through 0x07 (needs testing/verification). Each Voice can only hold one Note.&amp;lt;br /&amp;gt;Velocity: one byte with range 0x00 through 0x7F. 0x00 = 0, 0x7F = 127.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;If the Voice is not 1 - 7, the game will treat this note as a Midi Gate note, and will expect a 4th value that is one or more bytes with range 0x00 through 0xFF. If the leading byte is 0x80 (bit 7 = 1) or greater, another following byte will be taken into account.&amp;lt;br/&amp;gt;It is unknown what effects this has on the output&lt;br /&gt;
| 64 02 68&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;64: Key E4&amp;lt;br /&amp;gt;02: Voice 2&amp;lt;br /&amp;gt;68: Velocity 104&lt;br /&gt;
| Starts playing a Note with the previously defined Instrument (see E1, E2 and E3).&lt;br /&gt;
|-&lt;br /&gt;
| 80&lt;br /&gt;
| Unknown.&amp;lt;br/&amp;gt;Seems to do nothing based on the code...&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 81&amp;lt;br /&amp;gt;...&amp;lt;br /&amp;gt;87&lt;br /&gt;
| &lt;br /&gt;
| {OpCode[1]}&amp;lt;br /&amp;gt;OpCode: one byte with range 0x81 through 0x87. 0x81 = Close Voice 1, 0x87 = Close Voice 7.&lt;br /&gt;
| &lt;br /&gt;
| Stops playing a Note.&lt;br /&gt;
|-&lt;br /&gt;
| 88&amp;lt;br /&amp;gt;...&amp;lt;br /&amp;gt;8F&lt;br /&gt;
| Unknown&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 90&amp;lt;br /&amp;gt;...&amp;lt;br /&amp;gt;9F&lt;br /&gt;
| Unknown&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A0&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A1&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A2&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A3&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A4&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A5&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A6&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A7&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A8&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| A9&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AA&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AB&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AC&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AD&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B0&lt;br /&gt;
| Extended Opcode Indicator&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B1&lt;br /&gt;
| JASSeqParser::cmdNoteOn&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B2&lt;br /&gt;
| JASSeqParser::cmdNoteOff&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B3&lt;br /&gt;
| JASSeqParser::cmdNote&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B4&lt;br /&gt;
| JASSeqParser::cmdSetLastNote&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B5&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B6&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B7&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B8&lt;br /&gt;
| JASSeqParser::cmdParamE&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B9&lt;br /&gt;
| JASSeqParser::cmdParamI&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BA&lt;br /&gt;
| JASSeqParser::cmdParamEI&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BB&lt;br /&gt;
| JASSeqParser::cmdParamII&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BC&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BD&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C0&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C1&lt;br /&gt;
| JASSeqParser::cmdOpenTrack&lt;br /&gt;
| {OpCode[1]} {TrackNumber[1]} {Pointer[3]}&amp;lt;br /&amp;gt;OpCode: one byte, C1.&amp;lt;br /&amp;gt;TrackNumber: one byte with range 0x00 through 0x0F. 0x00 = Track 0, 0x0F = Track 15.&amp;lt;br /&amp;gt;Pointer: three bytes with range 0x000000 through 0xFFFFFF. Defines an offset in the file.&lt;br /&gt;
| C1 04 05 B4 73&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;C1: OpCode&amp;lt;br /&amp;gt;04: Track 4&amp;lt;br /&amp;gt;05 B4 73: Offset&lt;br /&gt;
| Creates a Track which can play Notes. Track 15 is usually reserved for Yoshi Drums.&lt;br /&gt;
|-&lt;br /&gt;
| C2&lt;br /&gt;
| JASSeqParser::cmdCloseTrack&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C3&lt;br /&gt;
| JASSeqParser::cmdCall&lt;br /&gt;
| {OpCode[1]} {Pointer[3]}&amp;lt;br /&amp;gt;OpCode: one byte, C3.&amp;lt;br /&amp;gt;Pointer: three bytes with range 0x000000 through 0xFFFFFF. Defines an offset in the file.&lt;br /&gt;
| C3 00 00 40&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;C3: OpCode&amp;lt;br /&amp;gt;00 00 40: Offset&lt;br /&gt;
| Redirects execution to the defined offset. Execution can return with C5.&lt;br /&gt;
|-&lt;br /&gt;
| C4&lt;br /&gt;
| JASSeqParser::cmdCallF&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C5&lt;br /&gt;
| JASSeqParser::cmdRet&lt;br /&gt;
| {OpCode[1]}&amp;lt;br /&amp;gt;OpCode: one byte, C5.&lt;br /&gt;
| &lt;br /&gt;
| Returns redirected execution (like from C3) to the initial call.&lt;br /&gt;
|-&lt;br /&gt;
| C6&lt;br /&gt;
| JASSeqParser::cmdRetF&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C7&lt;br /&gt;
| JASSeqParser::cmdJmp&lt;br /&gt;
| {OpCode[1]} {Pointer[3]}&amp;lt;br /&amp;gt;OpCode: one byte, C7.&amp;lt;br /&amp;gt;Pointer: three bytes with range 0x000000 through 0xFFFFFF. Defines an offset in the file.&lt;br /&gt;
| C7 08 02 34&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;C7: OpCode&amp;lt;br /&amp;gt;08 02 34: Offset&lt;br /&gt;
| Redirects execution to the defined offset, used for Loops.&lt;br /&gt;
|-&lt;br /&gt;
| C8&lt;br /&gt;
| JASSeqParser::cmdJmpF&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| C9&lt;br /&gt;
| JASSeqParser::cmdJmpTable&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CA&lt;br /&gt;
| JASSeqParser::cmdCallTable&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CB&lt;br /&gt;
| JASSeqParser::cmdLoopS&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CC&lt;br /&gt;
| JASSeqParser::cmdLoopE&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CD&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| CF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D0&lt;br /&gt;
| JASSeqParser::cmdReadPort&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D1&lt;br /&gt;
| JASSeqParser::cmdWritePort&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D2&lt;br /&gt;
| JASSeqParser::cmdCheckPortImport&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D3&lt;br /&gt;
| JASSeqParser::cmdCheckPortExport&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D4&lt;br /&gt;
| JASSeqParser::cmdParentWritePort&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D5&lt;br /&gt;
| JASSeqParser::cmdChildWritePort&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D6&lt;br /&gt;
| JASSeqParser::cmdParentReadPort&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D7&lt;br /&gt;
| JASSeqParser::cmdChildReadPort&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D8&lt;br /&gt;
| JASSeqParser::cmdRegLoad&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| D9&lt;br /&gt;
| JASSeqParser::cmdReg&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DA&lt;br /&gt;
| JASSeqParser::cmdReg&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DB&lt;br /&gt;
| JASSeqParser::cmdRegUni&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DC&lt;br /&gt;
| JASSeqParser::cmdRegTblLoad&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DD&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| DF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E0&lt;br /&gt;
| JASSeqParser::cmdTempo&lt;br /&gt;
| {OpCode[1]} {Unknown[1]} {BPM[1]}&amp;lt;br /&amp;gt;OpCode: one byte, E0.&amp;lt;br /&amp;gt;Unknown: one byte with unknown range and purpose.&amp;lt;br /&amp;gt;BPM: one byte with range 0x00 through 0xFF. 0x78 = 120, F0 = 240.&lt;br /&gt;
| E0 00 90&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;E0: OpCode&amp;lt;br /&amp;gt;00: Unknown&amp;lt;br /&amp;gt;90: BPM 144&lt;br /&gt;
| Defines the tempo (playback speed) of the BMS file.&lt;br /&gt;
|-&lt;br /&gt;
| E1&lt;br /&gt;
| JASSeqParser::cmdBankPrg&lt;br /&gt;
| {OpCode[1]} {Bank[1]} {Program[1]}&amp;lt;br /&amp;gt;OpCode: one byte, E1.&amp;lt;br /&amp;gt;Bank: one byte with range 0x00 through 0xFF. This byte represents a WSYS ID.&amp;lt;br /&amp;gt;Program: one byte ranging from 0x00 through 0xFF. This byte represents a LIST entry in the IBNK belonging to the defined WSYS ID.&lt;br /&gt;
| E1 01 0F&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;E1: OpCode&amp;lt;br /&amp;gt;01: WSYS ID 1&amp;lt;br /&amp;gt;0F: IBNK LIST entry 15&amp;lt;br /&amp;gt;(01 0F is the percussion set for Yoshi Drums)&lt;br /&gt;
| Defines the Instrument to be used in a Track.&lt;br /&gt;
|-&lt;br /&gt;
| E2&lt;br /&gt;
| JASSeqParser::cmdBank&lt;br /&gt;
| {OpCode[1]} {Bank[1]}&amp;lt;br /&amp;gt;OpCode: one byte, E2.&amp;lt;br /&amp;gt;Bank: one byte with range 0x00 through 0xFF. This byte represents a WSYS ID.&lt;br /&gt;
| E2 53&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;E2: OpCode&amp;lt;br /&amp;gt;53: WSYS ID 83&amp;lt;br /&amp;gt;(This bank holds sounds for Megahammer)&lt;br /&gt;
| Defines the WSYS/IBNK whose sounds are to be used in a Track.&lt;br /&gt;
|-&lt;br /&gt;
| E3&lt;br /&gt;
| JASSeqParser::cmdPrg&lt;br /&gt;
| {OpCode[1]} {Program[1]}&amp;lt;br /&amp;gt;OpCode: one byte, E3.&amp;lt;br /&amp;gt;Program: one byte with range 0x00 through 0xFF. This byte represents a LIST entry in the IBNK belonging to the defined WSYS ID.&lt;br /&gt;
| E3 0B&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;E3: OpCode&amp;lt;br /&amp;gt;0B: IBNK LIST entry 11&amp;lt;br /&amp;gt;(In relation to Megahammer, this Program holds movement related sounds)&lt;br /&gt;
| Defines the Keyboard which holds more specific sounds to an IBNK.&lt;br /&gt;
|-&lt;br /&gt;
| E4&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E5&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E6&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E7&lt;br /&gt;
| JASSeqParser::cmdEnvScaleSet&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E8&lt;br /&gt;
| JASSeqParser::cmdEnvSet&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| E9&lt;br /&gt;
| JASSeqParser::cmdSimpleADSR&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| EA&lt;br /&gt;
| JASSeqParser::cmdBusConnect&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| EB&lt;br /&gt;
| JASSeqParser::cmdIIRCutOff&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| EC&lt;br /&gt;
| JASSeqParser::cmdIIRSet&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| ED&lt;br /&gt;
| JASSeqParser::cmdFIRSet&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| EE&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| EF&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F0&lt;br /&gt;
| JASSeqParser::cmdWait&lt;br /&gt;
| {OpCode[1]} {WaitTime[n]}&amp;lt;br /&amp;gt;OpCode: one byte, 0xF0.&amp;lt;br /&amp;gt;WaitTime: one or more bytes with range 0x00 through 0xFF. If the leading byte is 0x80 (bit 7 = 1) or greater, another following byte will be taken into account. Time is measured in ticks here.&lt;br /&gt;
| F0 60 (96 Ticks)&amp;lt;br /&amp;gt;F0 81 56 (214 Ticks)&amp;lt;br /&amp;gt;F0 83 81 30 (49328 Ticks)&lt;br /&gt;
| Creates a delay, used to define the length of a Note or gap between Notes.&lt;br /&gt;
|-&lt;br /&gt;
| F1&lt;br /&gt;
| JASSeqParser::cmdWaitByte&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F2&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F3&lt;br /&gt;
| JASSeqParser::cmdSetIntTable&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F4&lt;br /&gt;
| JASSeqParser::cmdSetInterrupt&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F5&lt;br /&gt;
| JASSeqParser::cmdDisInterrupt&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F6&lt;br /&gt;
| JASSeqParser::cmdRetI&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F7&lt;br /&gt;
| JASSeqParser::cmdClrI&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F8&lt;br /&gt;
| JASSeqParser::cmdIntTimer&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| F9&lt;br /&gt;
| JASSeqParser::cmdSyncCPU&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FA&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FB&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FC&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FD&lt;br /&gt;
| JASSeqParser::cmdPrintf&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FE&lt;br /&gt;
| JASSeqParser::cmdNop&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| FF&lt;br /&gt;
| JASSeqParser::cmdFinish&lt;br /&gt;
| {OpCode[1]}&amp;lt;br /&amp;gt;OpCode: one byte, 0xFF.&lt;br /&gt;
| &lt;br /&gt;
| Stops execution of a Track.&lt;br /&gt;
|-&lt;br /&gt;
| B000&lt;br /&gt;
| NULL&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| B001&lt;br /&gt;
| JASSeqParser::cmdDump&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
[https://cdn.discordapp.com/attachments/421356154795458570/1291660143758413824/BMS_DEC.zip?ex=6719f440&amp;amp;is=6718a2c0&amp;amp;hm=f44c5197a070f30a00283858942f9e4ae5066034862eba006f8abe87a228a6aa&amp;amp; BMS_DEC] (converts BMS to MIDI)&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/XAYRGA/JaiSeqX JaiSeqX] (playback for JAudio1 and JAudio2 BMS files)&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=IBNK&amp;diff=643</id>
		<title>IBNK</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=IBNK&amp;diff=643"/>
		<updated>2024-09-19T16:25:09Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: /* IBNK Header */ Fully documented header&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;IBNK page. Feel free to overwrite with accurate information&lt;br /&gt;
&lt;br /&gt;
== IBNK Header ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! Offset !! Type !! Description !! Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String[4] || IBNK (0x49424E4B) || | &lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt32 || File size minus 0x08 || | &lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int32 || Bank ID || | &lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || Int32 || Bank Version || 0x00000000 = Bank Version 0&amp;lt;br/&amp;gt;0x00000001 = Bank Version 1&amp;lt;br/&amp;gt;Both are supported in &#039;&#039;Super Mario Galaxy&#039;&#039; &amp;amp; &#039;&#039;Super Mario Galaxy 2&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Byte[16] || Padding? || All Zeros |&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== INST Section ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| String[4]&lt;br /&gt;
| INST (0x494E5354)&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| UInt32&lt;br /&gt;
| Section size minus 0x08&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
| UInt32&lt;br /&gt;
| Amount &#039;&#039;&#039;N&#039;&#039;&#039; of Inst sections&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x0C&lt;br /&gt;
| &lt;br /&gt;
| Start of first Inst section&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Inst Section ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| String[4]&lt;br /&gt;
| Inst (0x496E7374)&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| UInt32&lt;br /&gt;
| ?&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
| UInt32&lt;br /&gt;
| ?&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x0C&lt;br /&gt;
| UInt32&lt;br /&gt;
| ?&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| UInt32&lt;br /&gt;
| Amount &#039;&#039;&#039;N&#039;&#039;&#039; of Keyboard sections&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x14&lt;br /&gt;
| &lt;br /&gt;
| Start of first Keyboard section&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x14+N*0x18&lt;br /&gt;
| Float&lt;br /&gt;
| Keyboard global volume&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x14+N*0x18+0x04&lt;br /&gt;
| Float&lt;br /&gt;
| Keyboard global pitch&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Keyboard section (size 0x18) ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| UInt8&lt;br /&gt;
| Highest key of current keyboard&lt;br /&gt;
| Cannot be higher than 7F. Lowest key of next keyboard (if exists) is this value + 0x01.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01&lt;br /&gt;
| Byte[6]&lt;br /&gt;
| ?&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x07&lt;br /&gt;
| Byte[1]&lt;br /&gt;
| ?&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
| UInt8&lt;br /&gt;
| Velocity&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x09&lt;br /&gt;
| Byte[3]&lt;br /&gt;
| ?&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x0C&lt;br /&gt;
| UInt16&lt;br /&gt;
| &#039;&#039;&#039;Bank ID&#039;&#039;&#039;&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x0E&lt;br /&gt;
| UInt16&lt;br /&gt;
| &#039;&#039;&#039;Wave ID&#039;&#039;&#039;&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| Float&lt;br /&gt;
| Volume&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x14&lt;br /&gt;
| Float&lt;br /&gt;
| Pitch&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== PMAP Section ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| String[4]&lt;br /&gt;
| PMAP (0x504D4150)&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| UInt32&lt;br /&gt;
| Section size minus 0x08&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
| UInt32&lt;br /&gt;
| Amount &#039;&#039;&#039;N&#039;&#039;&#039; of Pmap sections&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x0C&lt;br /&gt;
| &lt;br /&gt;
| Start of first Inst section&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Pmap Section (Size 0x28) ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| String[4]&lt;br /&gt;
| Pmap (0x506D6170)&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| Float&lt;br /&gt;
| ?&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
| Float&lt;br /&gt;
| ?&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x0C&lt;br /&gt;
| Float&lt;br /&gt;
| ?&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x10&lt;br /&gt;
| Byte[7]&lt;br /&gt;
| ?&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x17&lt;br /&gt;
| Byte[1]&lt;br /&gt;
| ?&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x18&lt;br /&gt;
| UInt8&lt;br /&gt;
| Velocity&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x19&lt;br /&gt;
| Byte[3]&lt;br /&gt;
| ?&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x1C&lt;br /&gt;
| UInt16&lt;br /&gt;
| &#039;&#039;&#039;Bank ID&#039;&#039;&#039;&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x1E&lt;br /&gt;
| UInt16&lt;br /&gt;
| &#039;&#039;&#039;Wave ID&#039;&#039;&#039;&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x20&lt;br /&gt;
| Float&lt;br /&gt;
| ?&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x24&lt;br /&gt;
| Float&lt;br /&gt;
| ?&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== PERC Section ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| String[4]&lt;br /&gt;
| PERC (0x50455243)&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| UInt32&lt;br /&gt;
| Section size minus 0x08&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
| UInt32&lt;br /&gt;
| Amount &#039;&#039;&#039;N&#039;&#039;&#039; of Perc sections&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x0C&lt;br /&gt;
| &lt;br /&gt;
| Start of first Inst section&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Perc Section ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| String[4]&lt;br /&gt;
| Perc (0x50657263)&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| UInt32&lt;br /&gt;
| Amount &#039;&#039;&#039;N&#039;&#039;&#039; of entries&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
| &lt;br /&gt;
| Start of entries&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Perc entry ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| UInt32&lt;br /&gt;
| Offset to Pmap section relative to file beginning.&lt;br /&gt;
| Many entries can be found holding no offset (0x00000000).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== LIST Section ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| String[4]&lt;br /&gt;
| LIST (0x4C495354)&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x04&lt;br /&gt;
| UInt32&lt;br /&gt;
| Section size minus 0x08&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x08&lt;br /&gt;
| UInt32&lt;br /&gt;
| Amount &#039;&#039;&#039;N&#039;&#039;&#039; of entries&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| 0x0C&lt;br /&gt;
| &lt;br /&gt;
| Start of entries&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== List entry ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Offset&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| 0x00&lt;br /&gt;
| UInt32&lt;br /&gt;
| Offset to Inst or Perc section relative to file beginning.&lt;br /&gt;
| Many entries can be found holding no offset (0x00000000). The position of an entry in this list defines the &#039;&#039;&#039;Program ID&#039;&#039;&#039;. It starts counting at 0.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=ActorInfo&amp;diff=581</id>
		<title>ActorInfo</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=ActorInfo&amp;diff=581"/>
		<updated>2024-07-10T22:49:59Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: Fully document InitSwitch.bcsv&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Files]]&lt;br /&gt;
&lt;br /&gt;
= ActorInfo =&lt;br /&gt;
&#039;&#039;&#039;ActorInfo&#039;&#039;&#039; is a folder that only exists in &#039;&#039;SMG2&#039;&#039;. it contains files that control certain aspects of objects. Below is a list of every file that can be put in this folder.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Filename !! Uses !! Description&lt;br /&gt;
|-&lt;br /&gt;
| ActionBgmCtrl.bcsv || 13 || Used by bosses to start their music&lt;br /&gt;
|-&lt;br /&gt;
| ActionFlagCtrl.bcsv || 111 ||&lt;br /&gt;
|-&lt;br /&gt;
| ActionFootPrintCtrl.bcsv || 1 || Used by &#039;&#039;DinoPackunBaby&#039;&#039; to assist in controlling the footsteps&lt;br /&gt;
|-&lt;br /&gt;
| ActionScreenBlurCtrl.bcsv || 21 ||&lt;br /&gt;
|-&lt;br /&gt;
| ActorAnimCtrl.bcsv || 109 ||&lt;br /&gt;
|-&lt;br /&gt;
| ActorHitReactionCtrl.bcsv || 139 ||&lt;br /&gt;
|-&lt;br /&gt;
| ActorParam.bcsv || 5 ||&lt;br /&gt;
|-&lt;br /&gt;
| ActorStateWalk.bcsv || 1 || Used by &#039;&#039;DinoPackunBaby&#039;&#039; to assist in controlling his walk&lt;br /&gt;
|-&lt;br /&gt;
| AnimBlendTriple.bcsv || 2 ||&lt;br /&gt;
|-&lt;br /&gt;
| InitActor.bcsv || 529 || Contains information on how the actor gets initialized.&lt;br /&gt;
|-&lt;br /&gt;
| InitActor2D.bcsv || 1 || Contains information on how the 2D actor gets initialized. Only used by &#039;&#039;Tongari&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| InitActor2DWater.bcsv || 1 || Contains information on how the 2D Water actor gets initialized. Only used by &#039;&#039;GhostAttackGhost&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| InitActorCollection.bcsv || 7 || Contains information on how the Collection actor gets initialized. Used by all 7 Powerups that appear on &#039;&#039;Starship Mario&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| InitActorDemo.bcsv || 10 || Contains information on how the Demo actor gets initialized. Used by &#039;&#039;GrandStar&#039;&#039;, &#039;&#039;PowerStar&#039;&#039;, and some other objects used in the game&#039;s main cutscenes.&lt;br /&gt;
|-&lt;br /&gt;
| InitActorDemoBellyDragon.bcsv || 2 || Contains information on how the Demo actor gets initialized during a Gobblegut cutscene. Only used by &#039;&#039;KoopaJr&#039;&#039; and &#039;&#039;KoopaJrRobotPod&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| InitActorDemoTitle.bcsv || 3 || Contains information on how the Demo actor gets initialized while on the Title Screen. Only used by &#039;&#039;DemoTitlePlanet&#039;&#039;, &#039;&#039;Tico&#039;&#039;, and &#039;&#039;Yoshi&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| InitActorDemoWithShadow.bcsv || 1 || Contains information on how the Demo actor gets initialized with a shadow. Only used by &#039;&#039;PowerStar&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| InitActorDummy.bcsv || 5 || Contains information on how the actor gets initialized in dummy form. Used by &#039;&#039;KinokoLifeUp&#039;&#039;, &#039;&#039;KinokoOneUp&#039;&#039;, &#039;&#039;Kuribo&#039;&#039;, &#039;&#039;PowerStar&#039;&#039;, and &#039;&#039;Tico&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| InitActorExit.bcsv || 1 || Contains information on how the exit actor gets initialized. Only used by &#039;&#039;PetitPorter&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| InitCollision.bcsv || 101 || Contains information on how the collision for this object is created&lt;br /&gt;
|-&lt;br /&gt;
| InitScale.bcsv || 6 || Contains a Vector3 that represents a size scale.&lt;br /&gt;
|-&lt;br /&gt;
| InitSensor.bcsv || 303 || Contains information on how to setup hitboxes for this object.&lt;br /&gt;
|-&lt;br /&gt;
| InitStageEffectCamera.bcsv || 11 || Contains information on how this object interacts with the camera.&lt;br /&gt;
|-&lt;br /&gt;
| InitStageEffectPad.bcsv || 12 || Contains information on pad. Unknown for sure, but it looks to be related to Wiimote Rumbling&lt;br /&gt;
|-&lt;br /&gt;
| InitSwitch.bcsv || 114 || Contains information on which switches are used and how&lt;br /&gt;
|-&lt;br /&gt;
| ItemGenerator.bcsv || 77 || Contains information on what objects to spawn when certain events are triggered (such as &amp;quot;Death by Spin Attack&amp;quot;)&lt;br /&gt;
|-&lt;br /&gt;
| PadAndCameraCtrl.bcsv || 105 ||&lt;br /&gt;
|-&lt;br /&gt;
| Reaction.bcsv || 3 ||&lt;br /&gt;
|-&lt;br /&gt;
| Sequence.bcsv || 2 || Used for the Chimp Ice skating minigames&lt;br /&gt;
|-&lt;br /&gt;
| Shadow.bcsv || 256 || Contains information on how to create shadows for this object. Useful for &#039;&#039;&#039;ProductMapObjDataTable&#039;&#039;&#039; classes such as &#039;&#039;SimpleMapObj&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| (ObjectName).banmt || 234 ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== InitActor.bcsv ==&lt;br /&gt;
InitActor.bcsv and it&#039;s variants (like InitActor2D.bcsv) are all structured the same way, and define certain values for the object during it&#039;s initialization.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Name !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| InitFunction || string || The name of the function that this entry corresponds to.&amp;lt;br&amp;gt;Functions:&amp;lt;br&amp;gt;&#039;&#039;&#039;Rail&#039;&#039;&#039;: Only uses &#039;&#039;Data&#039;&#039;. &amp;quot;&amp;quot; for &amp;quot;Doesn&#039;t use Rails&amp;quot;. &amp;quot;Use&amp;quot; for &amp;quot;Can use Rails&amp;quot;. &amp;quot;Needs&amp;quot; for &amp;quot;Requires a Rail&amp;quot;&amp;lt;br&amp;gt;&#039;&#039;&#039;DefaultPos&#039;&#039;&#039;: Only uses &#039;&#039;Data&#039;&#039;. &amp;quot;o&amp;quot; for Enabled, &amp;quot;x&amp;quot; for Disabled.&amp;lt;br&amp;gt;&#039;&#039;&#039;UseScaleForParam&#039;&#039;&#039;: Only uses &#039;&#039;Data&#039;&#039;. &amp;quot;o&amp;quot; for Enabled, &amp;quot;x&amp;quot; for Disabled.&amp;lt;br&amp;gt;&#039;&#039;&#039;Model&#039;&#039;&#039;: Only uses &#039;&#039;Data&#039;&#039;. The name of the model to use.&amp;lt;br&amp;gt;&#039;&#039;&#039;Executor&#039;&#039;&#039;: Only uses &#039;&#039;Data&#039;&#039;. Check the executor list below this table for more details.&amp;lt;br&amp;gt;&#039;&#039;&#039;Light&#039;&#039;&#039;: Only uses &#039;&#039;Data&#039;&#039;. The name of the Light Type to use.&amp;lt;br&amp;gt;&#039;&#039;&#039;Binder&#039;&#039;&#039;: &amp;quot;o&amp;quot; for Enabled, &amp;quot;x&amp;quot; for Disabled.&amp;lt;br&amp;gt;&#039;&#039;&#039;Effect&#039;&#039;&#039;: The name of the Effect group to use.&amp;lt;br&amp;gt;&#039;&#039;&#039;Sound&#039;&#039;&#039;:The name of the Sound group to use. You can offset the sound from the object position using the Param00VecX, Y, and Z.&amp;lt;br&amp;gt;&#039;&#039;&#039;Clipping&#039;&#039;&#039;: Only uses &#039;&#039;Param00F32&#039;&#039;. The distance that this object will clip out at.&amp;lt;br&amp;gt;&#039;&#039;&#039;GroupClipping&#039;&#039;&#039;:&amp;lt;br&amp;gt;&#039;&#039;&#039;DemoSimpleCastAll&#039;&#039;&#039;:&amp;lt;br&amp;gt;&#039;&#039;&#039;StarPointer&#039;&#039;&#039;:&amp;lt;br&amp;gt;&#039;&#039;&#039;DebugNode&#039;&#039;&#039;: Useless.&lt;br /&gt;
|-&lt;br /&gt;
| Data || string || The main data input. Most InitFunctions use this.&lt;br /&gt;
|-&lt;br /&gt;
| Param00Int || int || An integer parameter&lt;br /&gt;
|-&lt;br /&gt;
| Param00F32 || float || A float parameter&lt;br /&gt;
|-&lt;br /&gt;
| Param01F32 || float || A second float parameter&lt;br /&gt;
|-&lt;br /&gt;
| Param00Str || string || A string parameter, different from the Data parameter.&lt;br /&gt;
|-&lt;br /&gt;
| Param00VecX || float || The X Value of a Vector3 parameter.&lt;br /&gt;
|-&lt;br /&gt;
| Param00VecY || float || The Y Value of a Vector3 parameter.&lt;br /&gt;
|-&lt;br /&gt;
| Param00VecZ || float || The Z Value of a Vector3 parameter.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Executor !! Description&lt;br /&gt;
|-&lt;br /&gt;
| MapObj || &lt;br /&gt;
|-&lt;br /&gt;
| MapObjStrongLight || &lt;br /&gt;
|-&lt;br /&gt;
| MapObjNoShadow || This object does not get shadows applied to it&lt;br /&gt;
|-&lt;br /&gt;
| MapObjNoSilhouetted || &lt;br /&gt;
|-&lt;br /&gt;
| MapObjDecoration || &lt;br /&gt;
|-&lt;br /&gt;
| MapObjNoCalcAnim || &lt;br /&gt;
|-&lt;br /&gt;
| MapObjMovement || &lt;br /&gt;
|-&lt;br /&gt;
| MapObjNoMovement || &lt;br /&gt;
|-&lt;br /&gt;
| MapObjIndirect || &lt;br /&gt;
|-&lt;br /&gt;
| MapObjIndirectStrongLight || &lt;br /&gt;
|-&lt;br /&gt;
| MapObjNoMovementNoCalcAnimIndirectStrongLight || &lt;br /&gt;
|-&lt;br /&gt;
| ClippedMapParts || &lt;br /&gt;
|-&lt;br /&gt;
| CollisionMapObj || &lt;br /&gt;
|-&lt;br /&gt;
| CollisionMapObjWeakLight || &lt;br /&gt;
|-&lt;br /&gt;
| CollisionMapObjNoShadow || &lt;br /&gt;
|-&lt;br /&gt;
| CollisionMapObjNoShadowNoCalcAnim || &lt;br /&gt;
|-&lt;br /&gt;
| CollisionMapObjIndirectNoCalcAnim || &lt;br /&gt;
|-&lt;br /&gt;
| Enemy || &lt;br /&gt;
|-&lt;br /&gt;
| EnemyDecoration || &lt;br /&gt;
|-&lt;br /&gt;
| EnemyIndirect || &lt;br /&gt;
|-&lt;br /&gt;
| EnemySilhouette || &lt;br /&gt;
|-&lt;br /&gt;
| EnemyNoShadow || &lt;br /&gt;
|-&lt;br /&gt;
| EnemyNoMovement || &lt;br /&gt;
|-&lt;br /&gt;
| Boss || &lt;br /&gt;
|-&lt;br /&gt;
| NpcNoShadow || &lt;br /&gt;
|-&lt;br /&gt;
| NpcNoCalcAnim || &lt;br /&gt;
|-&lt;br /&gt;
| Ride || &lt;br /&gt;
|-&lt;br /&gt;
| RideSilhouette || &lt;br /&gt;
|-&lt;br /&gt;
| Planet || &lt;br /&gt;
|-&lt;br /&gt;
| PlanetIndirect || &lt;br /&gt;
|-&lt;br /&gt;
| DynamicMapObj || &lt;br /&gt;
|-&lt;br /&gt;
| PlayerDecoration || &lt;br /&gt;
|-&lt;br /&gt;
| Item || &lt;br /&gt;
|-&lt;br /&gt;
| Bloom || &lt;br /&gt;
|-&lt;br /&gt;
| BossBussun || &lt;br /&gt;
|-&lt;br /&gt;
| CrystalItem || &lt;br /&gt;
|-&lt;br /&gt;
| FireBarBall || &lt;br /&gt;
|-&lt;br /&gt;
| GliBird || &lt;br /&gt;
|-&lt;br /&gt;
| HipDropStarMove || &lt;br /&gt;
|-&lt;br /&gt;
| StoryBook || &lt;br /&gt;
|-&lt;br /&gt;
| StoryBookFilter || &lt;br /&gt;
|-&lt;br /&gt;
| WorldMapMiniObj || &lt;br /&gt;
|-&lt;br /&gt;
| GhostMazeMask || &lt;br /&gt;
|-&lt;br /&gt;
| Crystal || &lt;br /&gt;
|-&lt;br /&gt;
| Tamakoro || &lt;br /&gt;
|-&lt;br /&gt;
| SuperDreamer || &lt;br /&gt;
|-&lt;br /&gt;
| Ghost2DWater || &lt;br /&gt;
|-&lt;br /&gt;
| WoodLogBridge || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Shadow.bcsv ==&lt;br /&gt;
Shadow.bcsv is used to create shadows for objects.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field Name !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| Name || string || Shadow name&lt;br /&gt;
|-&lt;br /&gt;
| GroupName || string || &lt;br /&gt;
|-&lt;br /&gt;
| Joint || string || Name of the joint to attach to&lt;br /&gt;
|-&lt;br /&gt;
| DropStart || float || How far until the shadow starts to drop&lt;br /&gt;
|-&lt;br /&gt;
| DropLength || float || How far the shadow drops for&lt;br /&gt;
|-&lt;br /&gt;
| FollowScale || int || Set to 1 to make the shadow scale with the model (if scaled in an editor from the original size)&lt;br /&gt;
|-&lt;br /&gt;
| SyncShow || int || Set to 1 to make the shadow clip in and out with it&#039;s parent model&lt;br /&gt;
|-&lt;br /&gt;
| Gravity || int || &lt;br /&gt;
|-&lt;br /&gt;
| Collision || int || &lt;br /&gt;
|-&lt;br /&gt;
| DropOffsetX || float || X Offset to drop the shadow at.&lt;br /&gt;
|-&lt;br /&gt;
| DropOffsetY || float || Y Offset to drop the shadow at.&lt;br /&gt;
|-&lt;br /&gt;
| DropOffsetZ || float || Z Offset to drop the shadow at.&lt;br /&gt;
|-&lt;br /&gt;
| VolumeStart || float ||&lt;br /&gt;
|-&lt;br /&gt;
| VolumeEnd || float ||&lt;br /&gt;
|-&lt;br /&gt;
| VolumeCut || int || Set to 1&lt;br /&gt;
|-&lt;br /&gt;
| Type || string || &#039;&#039;&#039;VolumeBox&#039;&#039;&#039;: A Box where any shadow responsive object that enters it gets the shadow applied&amp;lt;br&amp;gt;&#039;&#039;&#039;VolumeSphere&#039;&#039;&#039;:&amp;lt;br&amp;gt;&#039;&#039;&#039;VolumeCylinder&#039;&#039;&#039;:&amp;lt;br&amp;gt;&#039;&#039;&#039;VolumeOval&#039;&#039;&#039;:&amp;lt;br&amp;gt;&#039;&#039;&#039;VolumeLine&#039;&#039;&#039;:&amp;lt;br&amp;gt;&#039;&#039;&#039;VolumeOvalPole&#039;&#039;&#039;:&amp;lt;br&amp;gt;&#039;&#039;&#039;VolumeFlatModel&#039;&#039;&#039;: Define the shadow using a shadow model&amp;lt;br&amp;gt;&#039;&#039;&#039;SurfaceCircle&#039;&#039;&#039;:&amp;lt;br&amp;gt;&#039;&#039;&#039;SurfaceOval&#039;&#039;&#039;:&lt;br /&gt;
|-&lt;br /&gt;
| SizeX || float || X Scale of the shadow&lt;br /&gt;
|-&lt;br /&gt;
| SizeY || float || Y Scale of the shadow&lt;br /&gt;
|-&lt;br /&gt;
| SizeZ || float || Z Scale of the shadow&lt;br /&gt;
|-&lt;br /&gt;
| Radius || float ||&lt;br /&gt;
|-&lt;br /&gt;
| LineStart || string || &lt;br /&gt;
|-&lt;br /&gt;
| LineEnd || string || &lt;br /&gt;
|-&lt;br /&gt;
| LineStartRadius || float ||&lt;br /&gt;
|-&lt;br /&gt;
| LineEndRadius || float ||&lt;br /&gt;
|-&lt;br /&gt;
| Model || string || Used to specify what model to use for the Shadow&lt;br /&gt;
|-&lt;br /&gt;
| LocalRotateX || float ||&lt;br /&gt;
|-&lt;br /&gt;
| LocalRotateY || float ||&lt;br /&gt;
|-&lt;br /&gt;
| LocalRotateZ || float ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== InitSensor.bcsv ==&lt;br /&gt;
InitSensor.bcsv defines all of the HitSensors that are applied to the actor.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| SensorName || string ||&lt;br /&gt;
|-&lt;br /&gt;
| SensorType || string || &lt;br /&gt;
|-&lt;br /&gt;
| Radius || float || The radius of the sensor.&lt;br /&gt;
|-&lt;br /&gt;
| HitSensorNumMax || int || The maximum amount of other sensors that can interact with this sensor.&lt;br /&gt;
|-&lt;br /&gt;
| JointName || string || The joint to attach this sensor to on the model. &lt;br /&gt;
|-&lt;br /&gt;
| Callback || string ||&lt;br /&gt;
|-&lt;br /&gt;
| OffsetX || float || Offset X of the sensor.&lt;br /&gt;
|-&lt;br /&gt;
| OffsetY || float || Offset Y of the sensor.&lt;br /&gt;
|-&lt;br /&gt;
| OffsetZ || float || Offset Z of the sensor.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== InitSwitch.bcsv ==&lt;br /&gt;
InitSwitch.bcsv defines all of the switches that can be used with the actor.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| SwitchName || string || The name of the switch.&lt;br /&gt;
|-&lt;br /&gt;
| Usage || string || The way that the switch is used.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Usage Types ===&lt;br /&gt;
Below is a table of the available options for the Usage field.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| UseRead || The switch type can be read from.&lt;br /&gt;
|-&lt;br /&gt;
| NeedRead || The switch type is &#039;&#039;&#039;required&#039;&#039;&#039; to read from.&lt;br /&gt;
|-&lt;br /&gt;
| UseWrite || The switch type can be written to.&lt;br /&gt;
|-&lt;br /&gt;
| NeedWrite || The switch type is &#039;&#039;&#039;required&#039;&#039;&#039; to write to.&lt;br /&gt;
|-&lt;br /&gt;
| UseWriteAuto || The switch type can be automatically triggered.&lt;br /&gt;
|-&lt;br /&gt;
| NeedWriteAuto || The switch type is &#039;&#039;&#039;required&#039;&#039;&#039; to automatically trigger.&lt;br /&gt;
|-&lt;br /&gt;
| x || Switch type is disabled.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Availability ===&lt;br /&gt;
Certain Switches only support specific Usage Types. This table details which switches can use which Usage Types.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Switch Name !! Available Usage Types&lt;br /&gt;
|-&lt;br /&gt;
| SW_APPEAR || &#039;&#039;&#039;UseRead&#039;&#039;&#039; (calls &#039;&#039;MR::useStageSwitchReadAppear&#039;&#039;)&amp;lt;br/&amp;gt;&#039;&#039;&#039;NeedRead&#039;&#039;&#039; (calls &#039;&#039;MR::needStageSwitchReadAppear&#039;&#039;)&lt;br /&gt;
|-&lt;br /&gt;
| SW_DEAD || &#039;&#039;&#039;UseWrite&#039;&#039;&#039; (calls &#039;&#039;MR::useStageSwitchWriteDead&#039;&#039;)&amp;lt;br/&amp;gt;&#039;&#039;&#039;NeedWrite&#039;&#039;&#039; (calls &#039;&#039;MR::needStageSwitchWriteDead&#039;&#039;)&amp;lt;br/&amp;gt;&#039;&#039;&#039;UseWriteAuto&#039;&#039;&#039; (calls &#039;&#039;MR::useStageSwitchWriteAutoDead&#039;&#039;)&amp;lt;br/&amp;gt;&#039;&#039;&#039;NeedWriteAuto&#039;&#039;&#039; (calls &#039;&#039;MR::needStageSwitchWriteAutoDead&#039;&#039;)&lt;br /&gt;
|-&lt;br /&gt;
| SW_A || &#039;&#039;&#039;UseRead&#039;&#039;&#039; (calls &#039;&#039;MR::initUseStageSwitchReadA&#039;&#039;)&amp;lt;br/&amp;gt;&#039;&#039;&#039;UseWrite&#039;&#039;&#039; (calls &#039;&#039;MR::initUseStageSwitchWriteA&#039;&#039;)&amp;lt;br/&amp;gt;&#039;&#039;&#039;NeedRead&#039;&#039;&#039; (calls &#039;&#039;MR::needStageSwitchReadA&#039;&#039;)&amp;lt;br/&amp;gt;&#039;&#039;&#039;NeedWrite&#039;&#039;&#039; (calls &#039;&#039;MR::needStageSwitchWriteA&#039;&#039;)&lt;br /&gt;
|-&lt;br /&gt;
| SW_B || &#039;&#039;&#039;UseRead&#039;&#039;&#039; (calls &#039;&#039;MR::useStageSwitchReadB&#039;&#039;)&amp;lt;br/&amp;gt;&#039;&#039;&#039;UseWrite&#039;&#039;&#039; (calls &#039;&#039;MR::initUseStageSwitchWriteB&#039;&#039;)&amp;lt;br/&amp;gt;&#039;&#039;&#039;NeedRead&#039;&#039;&#039; (calls &#039;&#039;MR::needStageSwitchReadB&#039;&#039;)&amp;lt;br/&amp;gt;&#039;&#039;&#039;NeedWrite&#039;&#039;&#039; (calls &#039;&#039;MR::needStageSwitchWriteB&#039;&#039;)&lt;br /&gt;
|-&lt;br /&gt;
| SW_AWAKE&amp;lt;br/&amp;gt;(Optional) || &#039;&#039;&#039;UseRead&#039;&#039;&#039; (calls &#039;&#039;MR::useStageSwitchAwake&#039;&#039;)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== ItemGenerator.bcsv ==&lt;br /&gt;
Relates on items that can be generated from the actor.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| ActionName || string || The action that has to be committed for the item to spawn. These actions are defined through code.&lt;br /&gt;
|-&lt;br /&gt;
| ItemInfoName || string || The item to spawn. See [[#Item_Info|Item Info]].&lt;br /&gt;
|-&lt;br /&gt;
| JointName || string || The joint where the item is spawned.&lt;br /&gt;
|-&lt;br /&gt;
| Count || int || The number of said item to spawn.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Item Info ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| Coinx1 || Spawns a single coin.&lt;br /&gt;
|-&lt;br /&gt;
| StarPiecex1 || Spawns a single star piece.&lt;br /&gt;
|-&lt;br /&gt;
| StarPiecex3 || Spawns three star pieces.&lt;br /&gt;
|-&lt;br /&gt;
| StarPiecex6 || Spawns six star pieces.&lt;br /&gt;
|-&lt;br /&gt;
| StarPiecex10 || Spawns ten star pieces.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=ProductMapObjDataTable&amp;diff=576</id>
		<title>ProductMapObjDataTable</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=ProductMapObjDataTable&amp;diff=576"/>
		<updated>2024-06-27T17:29:04Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: Fix BCSV Format link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Files]]&lt;br /&gt;
&#039;&#039;&#039;ProductMapObjDataTable&#039;&#039;&#039; is a [[BCSV (File format)|BCSV]] table that defines map objects and assigns them a class. The file can be found in &#039;&#039;SMG2&#039;&#039; in &#039;&#039;ObjectData/ProductMapObjDataTable.arc/root/ProductMapObjDataTable.bcsv&#039;&#039;. It contains the following fields:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| ModelName || string || The object name and model file in [[File system#ObjectData|ObjectData]].&lt;br /&gt;
|-&lt;br /&gt;
| ClassName || string || The name of the class that this object uses. A list of propery classes can be found below.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Classes ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Class !! Function&lt;br /&gt;
|-&lt;br /&gt;
| AutoMakeMapObj || Alias for SimpleMapObj.&lt;br /&gt;
|-&lt;br /&gt;
| SimpleMapObj || A basic object that can be used in any level.&amp;lt;br&amp;gt;Supports [[BCK]], [[BTK]], [[BTP]], [[BVA]], and [[BRK]]. [[BPK]] is not supported. Animations must take on the same name as the model in order to be played, and they start playing once the object loads.&amp;lt;br&amp;gt;&#039;&#039;&#039;obj_arg0&#039;&#039;&#039; allows for this model to change colours based on a file inside the archive called &amp;quot;ColorChange.brk&amp;quot;. The value put into &#039;&#039;&#039;obj_arg0&#039;&#039;&#039; corresponds to the frame to use.&amp;lt;br&amp;gt;&#039;&#039;&#039;obj_arg1&#039;&#039;&#039; allows for this model to change textures based on a file inside the archive called &amp;quot;TexChange.btp&amp;quot; (&amp;quot;TexChange.btk&amp;quot; is also supported. Both btk and btp may exist at the same time, both will be used). The value put into &#039;&#039;&#039;obj_arg1&#039;&#039;&#039; corresponds to the frame to use.&amp;lt;br&amp;gt;&#039;&#039;&#039;obj_arg2&#039;&#039;&#039; dictates how far the shadow of the object drops (Calculated with in-game units).&amp;lt;br&amp;gt;Shadows can be used if you setup a Shadow.bcsv inside the object&#039;s [[ActorInfo]].&lt;br /&gt;
|-&lt;br /&gt;
| SimpleMapObjFarMax || Basic object with a far viewing range&lt;br /&gt;
|-&lt;br /&gt;
| SimpleMapObjWithEffect || Basic object with particle effects&lt;br /&gt;
|-&lt;br /&gt;
| SimpleClipPartsObj || Basic object that can be clipped&lt;br /&gt;
|-&lt;br /&gt;
| SimpleSeesawObj || Basic seesaw MapParts object &amp;lt;br&amp;gt;&#039;&#039;&#039;MoveConditionType&#039;&#039;&#039;: Rotate back to initially rotation when jumped off? 1 = Yes, 0 = No &amp;lt;br&amp;gt;&#039;&#039;&#039;RotateSpeed&#039;&#039;&#039;: Rotation Speed; How fast the Seesaw rotates when jumped on &amp;lt;br&amp;gt;&#039;&#039;&#039;RotateAngle&#039;&#039;&#039;: Degree of rotation; How far the Seesaw can rotate on one side &amp;lt;br&amp;gt;&#039;&#039;&#039;RotateAxis&#039;&#039;&#039;: On which axis the object rotates; 0 = Z-Axis, 1 = ? (Doesn&#039;t rotate), 2 = Z- and X-Axis &amp;lt;br&amp;gt;&#039;&#039;&#039;RotateAccelType&#039;&#039;&#039;: ? &amp;lt;br&amp;gt;&#039;&#039;&#039;RotateStopTime&#039;&#039;&#039;: Back Swinging Speed; How fast it swings back when jumped off&lt;br /&gt;
|-&lt;br /&gt;
| SimpleFloaterObj || Basic floater MapParts object &amp;lt;br&amp;gt;&#039;&#039;&#039;MoveConditionType&#039;&#039;&#039;: Depth; How far it sinks (a negative value to make the object rising up will glitch, turning the object over instead will work) &amp;lt;br&amp;gt;&#039;&#039;&#039;RotateSpeed&#039;&#039;&#039;: Sinking Speed; How fast it sinks &amp;lt;br&amp;gt;&#039;&#039;&#039;RotateAngle&#039;&#039;&#039;: Pop-Up Speed; How fast it comes back to it&#039;s initially height&lt;br /&gt;
|-&lt;br /&gt;
| LavaFloater || Lava floating platform that requires effects&lt;br /&gt;
|-&lt;br /&gt;
| SimpleBreakableObj || Object that can be destroyed with a SW_B switch. Can spawn items when destroyed via &#039;&#039;&#039;obj_arg3&#039;&#039;&#039;:&amp;lt;br&amp;gt; &#039;&#039;&#039;-1:&#039;&#039;&#039; Coin &amp;lt;br&amp;gt;&#039;&#039;&#039;0:&#039;&#039;&#039; Nothing &amp;lt;br&amp;gt;&#039;&#039;&#039;1:&#039;&#039;&#039; 1-Up mushroom &amp;lt;br&amp;gt;&#039;&#039;&#039;2:&#039;&#039;&#039; Power Star &amp;lt;br&amp;gt;&#039;&#039;&#039;3:&#039;&#039;&#039; Starbits &amp;lt;br&amp;gt;The Power Star requires a properly set up AppearPowerStarObj parameter.&lt;br /&gt;
|-&lt;br /&gt;
| SimpleBreakableCollisionObj || &lt;br /&gt;
|-&lt;br /&gt;
| SimpleBreakableDeleteShadowObj || &lt;br /&gt;
|-&lt;br /&gt;
| SimpleBreakableStrongLightObj || &lt;br /&gt;
|-&lt;br /&gt;
| AnmModelSwitchMove || Object for which animations with the name &#039;&#039;Move&#039;&#039; are played as soon as its SW_A switch is activated. Supports any animation type except [[BPK]].&lt;br /&gt;
|-&lt;br /&gt;
| AnmModelSwitchMoveEndKill || Special object for [[cutscenes]] with action type 4.&lt;br /&gt;
Plays animations with the name &#039;&#039;Move&#039;&#039; when activated and then disappears.&lt;br /&gt;
|-&lt;br /&gt;
| AnmModelSwitchMoveEndKillAnyAnim || Same as AnmModelSwitchMoveEndKill but supports any animation type? More investigation needed.&lt;br /&gt;
Used by YoshiEggCapsuleCage.&lt;br /&gt;
|-&lt;br /&gt;
| AnmModelSwitchMoveValidateCollision || &lt;br /&gt;
|-&lt;br /&gt;
| AnmModelSwitchMoveInvalidateCollision || &lt;br /&gt;
|-&lt;br /&gt;
| AnmModelSwitchSyncBrk || An object for which the following animation names are played:&lt;br /&gt;
&#039;&#039;&#039;Move&#039;&#039;&#039; When its SW_A switch is activated&amp;lt;/br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Reverse&#039;&#039;&#039; When its SW_A switch is deactivated&lt;br /&gt;
|-&lt;br /&gt;
| RailMoveObj || Path-moving MapParts platform. Can play animations with the name &#039;&#039;Move&#039;&#039; when moving.&lt;br /&gt;
|-&lt;br /&gt;
| RailMoveWithReverseAnimObj || &lt;br /&gt;
|-&lt;br /&gt;
| RailMoveWithIndirectModelObj || &lt;br /&gt;
|-&lt;br /&gt;
| RailMoveShadowDropYObj || Path-moving MapParts platform that drops a shadow&lt;br /&gt;
|-&lt;br /&gt;
| RailMoveObjClipParts || Path-moving platform that can be clipped&lt;br /&gt;
|-&lt;br /&gt;
| RailMoveDemoActionObj || &lt;br /&gt;
|-&lt;br /&gt;
| RailMoveLavaProjmapObj || &lt;br /&gt;
|-&lt;br /&gt;
| RailRotateMoveObj || A MapParts platform that can move and rotate along a path.&amp;lt;br&amp;gt;&#039;&#039;&#039;point_arg0&#039;&#039;&#039;: Move speed/time (see point arg 7)&amp;lt;br&amp;gt;&#039;&#039;&#039;point_arg1&#039;&#039;&#039;: Acceleration speed/time (see point arg 7)&amp;lt;br&amp;gt;&#039;&#039;&#039;point_arg2&#039;&#039;&#039;: Rotate Speed/time (see point arg 7)&amp;lt;br&amp;gt;&#039;&#039;&#039;point_arg3&#039;&#039;&#039;: Rotation Angle. Relative (180 on two path points will rotate 360)&amp;lt;br&amp;gt;&#039;&#039;&#039;point_arg4&#039;&#039;&#039;: Rotation Axis. (0 = X, 1 = Y, 2 = Z)&amp;lt;br&amp;gt;&#039;&#039;&#039;point_arg5&#039;&#039;&#039;: Wait time. Stops movement at this path point for the provided time (in frames).&amp;lt;br&amp;gt;&#039;&#039;&#039;point_arg6&#039;&#039;&#039;: Rotation Type (-1 = Rotate at point, 1 = Rotate between this path point and next path point)&amp;lt;br&amp;gt;&#039;&#039;&#039;point_arg7&#039;&#039;&#039;: Calculation Type (-1 = Speed, 1 = Time. Time will define a fixed amount of time, while speed will set a value without care for how far away the next point is.)&lt;br /&gt;
|-&lt;br /&gt;
| RailAndRotateMoveObj || &lt;br /&gt;
|-&lt;br /&gt;
| RotateMoveObj || Rotating MapParts platform&amp;lt;br&amp;gt;&#039;&#039;&#039;MoveConditionType&#039;&#039;&#039;: 0 = Always moving, 1 = Wait for player to step on it.&amp;lt;br&amp;gt;&#039;&#039;&#039;RotateSpeed&#039;&#039;&#039;: Rotation Speed. How fast the object rotates. Negative numbers are allowed, and will rotate the object in the opposite direction.&amp;lt;br&amp;gt;&#039;&#039;&#039;RotateAngle&#039;&#039;&#039;: How much to rotate. For always spinning objects that just do 360, set this to 0.&amp;lt;br&amp;gt;&#039;&#039;&#039;RotateAxis&#039;&#039;&#039;: On which axis the object rotates. 0 = X, 1 = Y, 2 = Z.&amp;lt;br&amp;gt;&#039;&#039;&#039;RotateAccelType&#039;&#039;&#039;: ? &amp;lt;br&amp;gt;&#039;&#039;&#039;RotateStopTime&#039;&#039;&#039;: If applicable, how long to stop rotating for. In frames.&lt;br /&gt;
|-&lt;br /&gt;
| RotateMoveObjClipParts || Rotating MapParts platform that can be clipped.&lt;br /&gt;
|-&lt;br /&gt;
| EffectObjR500F50 || An effect object which can span with a radius of 500 and a Far Clip distance of 50.&lt;br /&gt;
|-&lt;br /&gt;
| EffectObjR1000F50 || An effect object which can span with a radius of 1000 and a Far Clip distance of 50.&lt;br /&gt;
|-&lt;br /&gt;
| EffectObjR1500F400 || An effect object which can span with a radius of 1500 and a Far Clip distance of 400.&lt;br /&gt;
|-&lt;br /&gt;
| EffectObj20x20x10SyncClipping || &lt;br /&gt;
|-&lt;br /&gt;
| EffectObj50x50x10SyncClipping || &lt;br /&gt;
|-&lt;br /&gt;
| EffectObj10x10x10SyncClipping || &lt;br /&gt;
|-&lt;br /&gt;
| Sky || A basic Sky that simply moves with the camera. Supports most animation formats with the same name as the model.&lt;br /&gt;
|-&lt;br /&gt;
| ProjectionMapSky || Also a Sky model, but the difference is unknown&lt;br /&gt;
|-&lt;br /&gt;
| SoundSyncSky || Sky model that plays a BRK animation to the beat&lt;br /&gt;
|-&lt;br /&gt;
| Air || Basic atmosphere object&lt;br /&gt;
|-&lt;br /&gt;
| ProjectionMapAir || &lt;br /&gt;
|-&lt;br /&gt;
| PriorDrawAir || &lt;br /&gt;
|-&lt;br /&gt;
| AfterMapObjDrawAir || &lt;br /&gt;
|-&lt;br /&gt;
| CloudStep || Cloud platform that can move on paths as well&lt;br /&gt;
|-&lt;br /&gt;
| CloudSea || Unknown; used by the bowl swamp planet in Cloudy Court Galaxy&lt;br /&gt;
|-&lt;br /&gt;
| HipDropMoveBlock || Moves when groundpounded on its Y-Axis; used by the blocks in Puzzle Plank Galaxy&amp;lt;br&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Obj_arg0&#039;&#039;&#039;: Units, how far the object may be pushed at most in one direction; a positive number lets you move the object from the bottom up, while a negative number lets you move it from the top down. &amp;lt;br&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Obj_arg1&#039;&#039;&#039;: How many times you have to stomp on it until it reaches the end point set above&amp;lt;br&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Obj_arg2&#039;&#039;&#039;: Rising Speed&amp;lt;br&amp;gt;&lt;br /&gt;
*&#039;&#039;&#039;Obj_arg3&#039;&#039;&#039;: Can be stomped only in one direction? -1 = No, 0 = Yes; allows stomping only in the direction set in arg_0&lt;br /&gt;
|-&lt;br /&gt;
| GorogoroCylinderRock || Rolling cylinder rocks that move on a path and respawn; see Clockwork Ruins Galaxy&lt;br /&gt;
|-&lt;br /&gt;
| SwitchingMoveBlock || Moves when a switch is activated. Used by the red and blue platforms in Flip-Out Galaxy&amp;lt;br&amp;gt;&#039;&#039;&#039;obj_arg0&#039;&#039;&#039;: How many units this object moves on its X Axis&amp;lt;br&amp;gt;&#039;&#039;&#039;obj_arg1&#039;&#039;&#039;: How many units this object moves on its Y Axis&amp;lt;br&amp;gt;&#039;&#039;&#039;obj_arg2&#039;&#039;&#039;: How many units this object moves on its Z Axis&amp;lt;br&amp;gt;&#039;&#039;&#039;obj_arg3&#039;&#039;&#039;: How many units this object rotates on its X Axis&amp;lt;br&amp;gt;&#039;&#039;&#039;obj_arg4&#039;&#039;&#039;: How many units this object rotates on its Y Axis&amp;lt;br&amp;gt;&#039;&#039;&#039;obj_arg5&#039;&#039;&#039;: How many units this object rotates on its Z Axis&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=SoundIdToInstList&amp;diff=575</id>
		<title>SoundIdToInstList</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=SoundIdToInstList&amp;diff=575"/>
		<updated>2024-06-26T19:18:37Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: Note about referencing missing instrument banks&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Files]]&lt;br /&gt;
&#039;&#039;&#039;SoundIdToInstList&#039;&#039;&#039; is a [[BCSV (File format)|BCSV]] table that pairs Sound IDs to Instrument Bank Program Numbers. This allows the game to actually load audio data, as simply referencing a sound label won&#039;t do the trick.&amp;lt;br/&amp;gt;The file can be found in &#039;&#039;SMG2&#039;&#039; in &#039;&#039;AudioRes/Info/SoundIdToInstList.arc/root/SoundIdToInstList.bcsv&#039;&#039;. It contains the following fields:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| SoundId || LONG || The JAudio Sound ID that will be used for Lookup&lt;br /&gt;
|-&lt;br /&gt;
| BankProgNoName || STRING_OFFSET || Holds the names of the instruments represented in BankProgNo.&amp;lt;br/&amp;gt;&#039;&#039;This is not used by the game.&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| BankProgNo || SHORT || The Instrument Bank Program Number.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This BCSV &#039;&#039;MUST&#039;&#039; be sorted by the SoundId column in proper numerical order!&#039;&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Referencing WSYS Entries that are not in the vanilla game will crash due to a hardcoded remap table.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Referencing Instrument Banks that do not exist will crash the game.&#039;&#039;&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=SoundIdToInstList&amp;diff=574</id>
		<title>SoundIdToInstList</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=SoundIdToInstList&amp;diff=574"/>
		<updated>2024-06-25T22:40:23Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: Created this page after so many years :)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Files]]&lt;br /&gt;
&#039;&#039;&#039;SoundIdToInstList&#039;&#039;&#039; is a [[BCSV (File format)|BCSV]] table that pairs Sound IDs to Instrument Bank Program Numbers. This allows the game to actually load audio data, as simply referencing a sound label won&#039;t do the trick.&amp;lt;br/&amp;gt;The file can be found in &#039;&#039;SMG2&#039;&#039; in &#039;&#039;AudioRes/Info/SoundIdToInstList.arc/root/SoundIdToInstList.bcsv&#039;&#039;. It contains the following fields:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| SoundId || LONG || The JAudio Sound ID that will be used for Lookup&lt;br /&gt;
|-&lt;br /&gt;
| BankProgNoName || STRING_OFFSET || Holds the names of the instruments represented in BankProgNo.&amp;lt;br/&amp;gt;&#039;&#039;This is not used by the game.&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| BankProgNo || SHORT || The Instrument Bank Program Number.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This BCSV &#039;&#039;MUST&#039;&#039; be sorted by the SoundId column in proper numerical order!&amp;lt;br/&amp;gt;Referencing WSYS Entries that are not in the vanilla game will crash due to a hardcoded remap table.&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=BgmParam&amp;diff=143</id>
		<title>BgmParam</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=BgmParam&amp;diff=143"/>
		<updated>2024-03-30T17:17:20Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: Created page with &amp;quot;Category:Files &amp;#039;&amp;#039;&amp;#039;BgmParam&amp;#039;&amp;#039;&amp;#039; is a BCSV table that defines override playback volumes for music. The file can be found in &amp;#039;&amp;#039;SMG2&amp;#039;&amp;#039; in &amp;#039;&amp;#039;AudioRes/Info/BgmParam.arc/root/BgmParam.bcsv&amp;#039;&amp;#039;. It contains the following fields:  {| class=&amp;quot;wikitable&amp;quot; ! Field !! Type !! Description |- | SoundIdName || STRING_OFFSET || The song name to affect the volume of. |- | Volume || LONG || The volume to use as an override. Default 100, lower values make the song quie...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Files]]&lt;br /&gt;
&#039;&#039;&#039;BgmParam&#039;&#039;&#039; is a [[BCSV (File format)|BCSV]] table that defines override playback volumes for music. The file can be found in &#039;&#039;SMG2&#039;&#039; in &#039;&#039;AudioRes/Info/BgmParam.arc/root/BgmParam.bcsv&#039;&#039;. It contains the following fields:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| SoundIdName || STRING_OFFSET || The song name to affect the volume of.&lt;br /&gt;
|-&lt;br /&gt;
| Volume || LONG || The volume to use as an override. Default 100, lower values make the song quieter, and larger values make the song louder. Max 128.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=List_of_Music&amp;diff=142</id>
		<title>List of Music</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=List_of_Music&amp;diff=142"/>
		<updated>2024-03-28T22:22:48Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: Missing ScenarioSelect information&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Lists]]&lt;br /&gt;
{{WIP}}&lt;br /&gt;
&lt;br /&gt;
This page lists all music that can be found in both &#039;&#039;Galaxy&#039;&#039; games along with their respective BGM, STM, MBGM and stream file names:&lt;br /&gt;
* &#039;&#039;&#039;BGM Name&#039;&#039;&#039;: The name of the sequenced track.&lt;br /&gt;
* &#039;&#039;&#039;Stream Name&#039;&#039;&#039;: The name of the streamed track.&lt;br /&gt;
* &#039;&#039;&#039;Combined Name&#039;&#039;&#039;: The Multi BGM name that combines the sequenced and streamed tracks.&lt;br /&gt;
* &#039;&#039;&#039;Stream File&#039;&#039;&#039;: The stream&#039;s file name in &#039;&#039;AudioRes/Streams&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==Super Mario Galaxy==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Description !! BGM Name !! Stream Name !! Combined Name !! Stream File&lt;br /&gt;
|-&lt;br /&gt;
| No music || BGM_CLEAR ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;5&amp;quot; | General Galaxy Music&lt;br /&gt;
|-&lt;br /&gt;
| Gateway Galaxy || BGM_GALAXY_24 || STM_GALAXY_24 || MBGM_GALAXY_24 || SMG_galaxy24_multi&lt;br /&gt;
|-&lt;br /&gt;
| Gateway Galaxy 2 || BGM_GALAXY_25 || STM_GALAXY_25 || MBGM_GALAXY_25 || SMG_galaxy25_strm&lt;br /&gt;
|-&lt;br /&gt;
| Gateway Galaxy 3 || BGM_GALAXY_26 || STM_GALAXY_26 || MBGM_GALAXY_26 || SMG_galaxy26_strm&lt;br /&gt;
|-&lt;br /&gt;
| Good Egg Galaxy || BGM_GALAXY_01 || STM_GALAXY_01 || MBGM_GALAXY_01 || SMG_galaxy01_strm&lt;br /&gt;
|-&lt;br /&gt;
| Honeyhive Galaxy || BGM_GALAXY_10 || STM_GALAXY_10 || MBGM_GALAXY_10 || SMG_galaxy10_strm&lt;br /&gt;
|-&lt;br /&gt;
| Big Bad Bugaboom || BGM_GALAXY_10_HURRY || STM_GALAXY_10_HURRY || MBGM_GALAXY_10_HURRY || SMG_galaxy10_hurry_strm&lt;br /&gt;
|-&lt;br /&gt;
| Space Junk Galaxy || BGM_GALAXY_08 || STM_GALAXY_08 || MBGM_GALAXY_08 || SMG_galaxy08_strm&lt;br /&gt;
|-&lt;br /&gt;
| Battlerock Galaxy || BGM_GALAXY_11 || STM_GALAXY_11 || MBGM_GALAXY_11 || SMG_galaxy11_multi&lt;br /&gt;
|-&lt;br /&gt;
| Bowser&#039;s Star Reactor || BGM_GALAXY_15 || STM_GALAXY_15 || MBGM_GALAXY_15 || SMG_galaxy15_strm&lt;br /&gt;
|-&lt;br /&gt;
| Bowser&#039;s Big Staircase || BGM_GALAXY_15_HURRY || STM_GALAXY_15_HURRY || MBGM_GALAXY_15_HURRY || SMG_galaxy15_hurry_strm&lt;br /&gt;
|-&lt;br /&gt;
| Beach Bowl Galaxy || BGM_GALAXY_03 || STM_GALAXY_03 || MBGM_GALAXY_03 || SMG_galaxy03_multi&lt;br /&gt;
|-&lt;br /&gt;
| Ghostly Galaxy || BGM_GALAXY_06 || STM_GALAXY_06 || MBGM_GALAXY_06 || SMG_galaxy06_strm&lt;br /&gt;
|-&lt;br /&gt;
| Buoy Base Galaxy || BGM_GALAXY_04 || STM_GALAXY_04 || MBGM_GALAXY_04 || SMG_galaxy04_multi&lt;br /&gt;
|-&lt;br /&gt;
| Bowser Jr.&#039;s Airship Armada || BGM_GALAXY_09 || STM_GALAXY_09 || MBGM_GALAXY_09 || SMG_galaxy09_strm&lt;br /&gt;
|-&lt;br /&gt;
| Drip Drop Galaxy || BGM_GALAXY_23 || STM_GALAXY_23 || MBGM_GALAXY_23 || SMG_galaxy23_strm&lt;br /&gt;
|-&lt;br /&gt;
| Gusty Garden Galaxy || BGM_GALAXY_14 || STM_GALAXY_14 || MBGM_GALAXY_14 || SMG_galaxy14_strm&lt;br /&gt;
|-&lt;br /&gt;
| Freezeflame Galaxy || BGM_GALAXY_16 || STM_GALAXY_16 || MBGM_GALAXY_16 || SMG_galaxy16_multi&lt;br /&gt;
|-&lt;br /&gt;
| Dusty Dune Galaxy || BGM_GALAXY_19 || STM_GALAXY_19 || MBGM_GALAXY_19 || SMG_galaxy19_strm&lt;br /&gt;
|-&lt;br /&gt;
| Toy Time Galaxy || BGM_GALAXY_22 || STM_GALAXY_22 || MBGM_GALAXY_22 || SMG_galaxy22_strm&lt;br /&gt;
|-&lt;br /&gt;
| Deep Dark Galaxy || BGM_GALAXY_05 || STM_GALAXY_05 || MBGM_GALAXY_05 || SMG_galaxy05_strm&lt;br /&gt;
|-&lt;br /&gt;
| Melty Molten Galaxy || BGM_GALAXY_02 || STM_GALAXY_02 || MBGM_GALAXY_02 || SMG_galaxy02_strm&lt;br /&gt;
|-&lt;br /&gt;
| Snow Cap Galaxy || BGM_GALAXY_27 || STM_GALAXY_27 || MBGM_GALAXY_27 || SMG_galaxy27_strm&lt;br /&gt;
|-&lt;br /&gt;
| Bowser&#039;s Galaxy Reactor || BGM_GALAXY_28 || STM_GALAXY_28 || MBGM_GALAXY_28 || SMG_galaxy28_strm&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;5&amp;quot; | Miscellaneous Stage Music&lt;br /&gt;
|-&lt;br /&gt;
| Interlude || BGM_GALAXY_INTER || STM_GALAXY_INTER || MBGM_GALAXY_INTER || SMG_galaxy_inter_strm&lt;br /&gt;
|-&lt;br /&gt;
| A Tense Moment || BGM_GALAXY_01_TOMB || STM_GALAXY_01_TOMB || MBGM_GALAXY_01_TOMB || SMG_galaxy01_tomb_strm&lt;br /&gt;
|-&lt;br /&gt;
| Space Fantasy || BGM_GALAXY_12 || STM_GALAXY_12 || MBGM_GALAXY_12 || SMG_galaxy12_strm&lt;br /&gt;
|-&lt;br /&gt;
| Space Athletic || BGM_GALAXY_13 || STM_GALAXY_13 || MBGM_GALAXY_13 || SMG_galaxy13_strm&lt;br /&gt;
|-&lt;br /&gt;
| Blue Sky Athletic || BGM_GALAXY_17 || STM_GALAXY_17 || MBGM_GALAXY_17 || SMG_galaxy17_strm&lt;br /&gt;
|-&lt;br /&gt;
| Speedy Comet || BGM_GALAXY_02_HURRY || STM_GALAXY_02_HURRY || MBGM_GALAXY_02_HURRY || SMG_galaxy02_hurry_strm&lt;br /&gt;
|-&lt;br /&gt;
| Cosmic Comet || BGM_GALAXY_20 || STM_GALAXY_20 || MBGM_GALAXY_20 || SMG_galaxy20_strm&lt;br /&gt;
|-&lt;br /&gt;
| Purple Comet || BGM_GALAXY_21 || STM_GALAXY_21 || MBGM_GALAXY_21 || SMG_galaxy21_strm&lt;br /&gt;
|-&lt;br /&gt;
| Pipe Interior || BGM_GALAXY_18 || STM_GALAXY_18 || MBGM_GALAXY_18 || SMG_galaxy18_strm&lt;br /&gt;
|-&lt;br /&gt;
| Captain Toad&#039;s Theme || BGM_KINOPIO_TANKEN || STM_KINOPIO_TANKEN || MBGM_KINOPIO_TANKEN || SMG_ev_kinotan_strm&lt;br /&gt;
|-&lt;br /&gt;
| Captain Toad&#039;s Theme (Duplicate) || BGM_KINOPIO_TANKEN_B || STM_KINOPIO_TANKEN_B || MBGM_KINOPIO_TANKEN_B || SMG_ev_kinotan_strm&lt;br /&gt;
|-&lt;br /&gt;
| Surfing Race || BGM_RACE_01 || STM_RACE_01 || MBGM_RACE_01 || SMG_ev_race_strm&lt;br /&gt;
|-&lt;br /&gt;
| Spooky Race || BGM_RACE_02 || STM_RACE_02 || MBGM_RACE_02 || SMG_ev_race02_multi&lt;br /&gt;
|-&lt;br /&gt;
| Star Ball (Rolling Greens) || BGM_TAMAKORO ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Star Ball (Melty Molten) || BGM_TAMAKORO_2 ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Star Bunny Theme || BGM_GALAXY_02_CHASE || STM_GALAXY_02_CHASE || MBGM_GALAXY_02_CHASE || SMG_ev_rabbit_strm&lt;br /&gt;
|-&lt;br /&gt;
| Bowser Appears ||  || STM_MEET_KOOPA ||  || SMG_ev_kuppabt01_strm&lt;br /&gt;
|-&lt;br /&gt;
| A Chance to Grab a Star! 1 || BGM_STAR_EXIST || STM_STAR_EXIST || MBGM_STAR_EXIST || SMG_ev_starchance_strm&lt;br /&gt;
|-&lt;br /&gt;
| A Chance to Grab a Star! 2 || BGM_STAR_EXIST_2 || STM_STAR_EXIST_2 || MBGM_STAR_EXIST_2 || SMG_ev_starchance02_strm&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;5&amp;quot; | Boss Music&lt;br /&gt;
|-&lt;br /&gt;
| Dino Piranha || BGM_BOSS_03_A || STM_BOSS_03_A || MBGM_BOSS_03_A || SMG_boss03a_strm&lt;br /&gt;
|-&lt;br /&gt;
| Dino Piranha (Fast) || BGM_BOSS_03_B || STM_BOSS_03_B || MBGM_BOSS_03_B || SMG_boss03b_strm&lt;br /&gt;
|-&lt;br /&gt;
| King Kaliente || BGM_BOSS_01_A || STM_BOSS_01_A || MBGM_BOSS_01_A || SMG_boss01a_strm&lt;br /&gt;
|-&lt;br /&gt;
| King Kaliente (Fast) || BGM_BOSS_01_B || STM_BOSS_01_B || MBGM_BOSS_01_B || SMG_boss01b_strm&lt;br /&gt;
|-&lt;br /&gt;
| Megaleg || BGM_BOSS_02_A || STM_BOSS_02_A || MBGM_BOSS_02_A || SMG_boss02a_strm&lt;br /&gt;
|-&lt;br /&gt;
| Megaleg (Fast) || BGM_BOSS_02_B || STM_BOSS_02_B || MBGM_BOSS_02_B || SMG_boss02b_strm&lt;br /&gt;
|-&lt;br /&gt;
| Kamella || BGM_BOSS_04 || STM_BOSS_04 || MBGM_BOSS_04 || SMG_boss04_strm&lt;br /&gt;
|-&lt;br /&gt;
| Bowser || BGM_BOSS_KOOPA || STM_BOSS_KOOPA || MBGM_BOSS_KOOPA || SMG_boss07_multi&lt;br /&gt;
|-&lt;br /&gt;
| Bouldergeist || BGM_BOSS_09_A || STM_BOSS_09_A || MBGM_BOSS_09_A || SMG_boss09a_multi&lt;br /&gt;
|-&lt;br /&gt;
| Bouldergeist (Fast) || BGM_BOSS_09_B || STM_BOSS_09_B || MBGM_BOSS_09_B || SMG_boss09b_multi&lt;br /&gt;
|-&lt;br /&gt;
| Bowser Jr. || BGM_BOSS_06_A || STM_BOSS_06_A || MBGM_BOSS_06_A || SMG_boss06a_strm&lt;br /&gt;
|-&lt;br /&gt;
| Bowser Jr. (Fast) || BGM_BOSS_06_B || STM_BOSS_06_B || MBGM_BOSS_06_B || SMG_boss06b_strm&lt;br /&gt;
|-&lt;br /&gt;
| Major Burrows Chases Star Bunny || BGM_PINCH_3 ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Major Burrows || BGM_BOSS_05_A || STM_BOSS_05_A || MBGM_BOSS_05_A || SMG_boss05a_strm&lt;br /&gt;
|-&lt;br /&gt;
| Major Burrows (Fast) || BGM_BOSS_05_B || STM_BOSS_05_B || MBGM_BOSS_05_B || SMG_boss05b_strm&lt;br /&gt;
|-&lt;br /&gt;
| Mecha-Bowser || BGM_BOSS_MECHA_KOOPA || STM_BOSS_MECHA_KOOPA || MBGM_BOSS_MECHA_KOOPA || SMG_boss08_strm&lt;br /&gt;
|-&lt;br /&gt;
| Final Bowser || BGM_BOSS_KOOPA_FINAL || STM_BOSS_KOOPA_FINAL || MBGM_BOSS_KOOPA_FINAL || SMG_boss10_strm&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;5&amp;quot; | Comet Observatory&lt;br /&gt;
|-&lt;br /&gt;
| Comet Observatory 1 ||  || STM_ASTRO_OUT ||  || SMG_astroout01_strm&lt;br /&gt;
|-&lt;br /&gt;
| Comet Observatory 2 ||  || STM_ASTRO_OUT_2 ||  || SMG_astroout02_strm&lt;br /&gt;
|-&lt;br /&gt;
| Comet Observatory 3 ||  || STM_ASTRO_OUT_3 ||  || SMG_astroout03_strm&lt;br /&gt;
|-&lt;br /&gt;
| Dome || BGM_ASTRO_DOME || STM_ASTRO_DOME || MBGM_ASTRO_DOME || SMG_astrodome_multi&lt;br /&gt;
|-&lt;br /&gt;
| Dome (Bowser) || BGM_ASTRO_DOME_2 || STM_ASTRO_DOME_2 || MBGM_ASTRO_DOME_2 || SMG_astrodome02_strm&lt;br /&gt;
|-&lt;br /&gt;
| Dome (Garden) || BGM_ASTRO_DOME_LOFT || STM_ASTRO_DOME_LOFT || MBGM_ASTRO_DOME_LOFT || SMG_astrodome03_strm&lt;br /&gt;
|-&lt;br /&gt;
| Library || BGM_LIBRARY || STM_LIBRARY || MBGM_LIBRARY || SMG_astrodome04_strm&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;5&amp;quot; | Power-Up Music&lt;br /&gt;
|-&lt;br /&gt;
| Rainbow Power-Up || BGM_MUTEKI_A ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Rainbow Power-Up (first time) || BGM_MUTEKI_B ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Fire Power-Up || BGM_FIRE_A ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Fire Power-Up (first time) || BGM_FIRE_B ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Ice Power-Up || BGM_ICE_A ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Ice Power-Up (first time) || BGM_ICE_B ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Flying Power-Up || BGM_FLYING_A ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Flying Power-Up (first time) || BGM_FLYING_B ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
|  || BGM_FIRST_MORPH_A ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
|  || BGM_FIRST_MORPH_B ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;5&amp;quot; | Other Music&lt;br /&gt;
|-&lt;br /&gt;
| Title Music ||  || STM_TITLE ||  || SMG_title_strm&lt;br /&gt;
|-&lt;br /&gt;
| File Select || BGM_FILE_SELECT || STM_FILE_SELECT || MBGM_FILE_SELECT || SMG_fileselect_strm&lt;br /&gt;
|-&lt;br /&gt;
| Credits ||  || STM_STAFF_ROLL ||  || SMG_staffroll_strm&lt;br /&gt;
|-&lt;br /&gt;
| Picture Book ||  || STM_PROLOGUE_01 ||  || SMG_ev_prolo01_strm&lt;br /&gt;
|-&lt;br /&gt;
| Picture Book (Sad) ||  || STM_PROLOGUE_01_B ||  || SMG_ev_prolo01_b_strm&lt;br /&gt;
|-&lt;br /&gt;
| Mushroom Kingdom || BGM_PROLOGUE_02 || STM_PROLOGUE_02 || MBGM_PROLOGUE_02 || SMG_ev_prolo02_strm&lt;br /&gt;
|-&lt;br /&gt;
| Attack of the Airships || BGM_PROLOGUE_03 || STM_PROLOGUE_03 || MBGM_PROLOGUE_03 || SMG_ev_prolo03_strm&lt;br /&gt;
|-&lt;br /&gt;
| Catastrophe ||  || STM_PROLOGUE_04 ||  || SMG_ev_prolo04_strm&lt;br /&gt;
|-&lt;br /&gt;
| Mushroom Kingdom (After Attack) ||  || STM_PROLOGUE_05 ||  || SMG_ev_prolo05_strm&lt;br /&gt;
|-&lt;br /&gt;
| Star Child ||  || STM_EPILOGUE_B ||  || SMG_ev_epilogue_b_strm&lt;br /&gt;
|-&lt;br /&gt;
| Star Select Screen (When entering from a Dome) || BGM_SENARIO_SEL ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Star Select Screen (When not entering from a Dome) || BGM_SENARIO_SEL_2 ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Preparing to go to the Center of the Universe || BGM_SENARIO_SEL_3 ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Galaxy Intro || BGM_START_DEMO ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Gateway Intro || BGM_MEET_TICO_ZOOM_OUT ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Bowser Jr. Intro || BGM_KOOPA_JR_APPEAR ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Final Bowser Intro || BGM_KOOPA_VS3_SUN ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| First Grand Star Collected ||  || STM_FIRST_ASTRO ||  || SMG_first_astro_strm&lt;br /&gt;
|-&lt;br /&gt;
| Another Grand Star Collected ||  || STM_SECOND_ASTRO ||  || SMG_second_astro_strm&lt;br /&gt;
|-&lt;br /&gt;
| E3 2006 Bubble || BGM_IN_BUBBLE ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;5&amp;quot; | Jingles&lt;br /&gt;
|-&lt;br /&gt;
| Death || BGM_MISS ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Game Over || BGM_GAMEOVER ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Got Power Star || BGM_STAR_POW_GET ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Got Grand Star || BGM_GRAND_STAR_GET ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Got Final Grand Star || BGM_GRAND_STAR_GET_2 ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Countdown || BGM_MINIGAME_START ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Won Race || BGM_RACE_WIN ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Lost Race || BGM_RACE_LOSE ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| New Galaxy || BGM_NEW_GALAXY ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Planet Appeared || BGM_APPEAR_PLANET ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Pedestal Appeared in Gateway || BGM_APPEAR_HD_TOWER ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| New High Score || BGM_HIGH_SCORE ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Galaxy Completed || BGM_GALAXY_COMPLETE ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;5&amp;quot; | Uncategorized&lt;br /&gt;
|-&lt;br /&gt;
|  || BGM_ASTRO_RETURN ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
|  || BGM_JINGLE_LIGHT_1 ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
|  || BGM_KOOPA_APPEAR ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
|  || BGM_KOOPA_GRAND_STAR_1 ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
|  || BGM_KOOPA_GRAND_STAR_3 ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
|  || BGM_PINCH_1 ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
|  || BGM_PINCH_2 ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
|  || BGM_RED_COMET_APPEAR ||  ||  || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Super Mario Galaxy 2==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Description !! BGM Name !! Stream Name !! Combined Name !! Stream File&lt;br /&gt;
|-&lt;br /&gt;
| No music || BGM_CLEAR ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;5&amp;quot; | General Galaxy Music&lt;br /&gt;
|-&lt;br /&gt;
| Sky Station Galaxy || BGM_SMG2_GALAXY_06 || STM_SMG2_GALAXY_06 || MBGM_SMG2_GALAXY_06 || SMG2_galaxy06_strm&lt;br /&gt;
|-&lt;br /&gt;
| Sky Station Galaxy 2 || BGM_SMG2_GALAXY_05 || STM_SMG2_GALAXY_05 || MBGM_SMG2_GALAXY_05 || SMG2_galaxy05_strm&lt;br /&gt;
|-&lt;br /&gt;
| Yoshi Star Galaxy || BGM_SMG2_GALAXY_32 || STM_SMG2_GALAXY_32 || MBGM_SMG2_GALAXY_32 || SMG2_galaxy32_strm&lt;br /&gt;
|-&lt;br /&gt;
| Spin-Dig Galaxy || BGM_SMG2_GALAXY_09 || STM_SMG2_GALAXY_09 || MBGM_SMG2_GALAXY_09 || SMG2_galaxy09_strm&lt;br /&gt;
|-&lt;br /&gt;
| Fluffy Bluff Galaxy || BGM_SMG2_GALAXY_07 || STM_SMG2_GALAXY_07 || MBGM_SMG2_GALAXY_07 || SMG2_galaxy07_strm&lt;br /&gt;
|-&lt;br /&gt;
| Rightside Down Galaxy || BGM_SMG2_GALAXY_03 || STM_SMG2_GALAXY_03 || MBGM_SMG2_GALAXY_03 || SMG2_galaxy03_multi&lt;br /&gt;
|-&lt;br /&gt;
| Flip-Swap Galaxy || BGM_SMG2_GALAXY_04 || STM_SMG2_GALAXY_04 || MBGM_SMG2_GALAXY_04 || SMG2_galaxy04_strm&lt;br /&gt;
|-&lt;br /&gt;
| Bowser Jr.&#039;s Fiery Flotilla || BGM_SMG2_GALAXY31 || STM_SMG2_GALAXY31 || MBGM_SMG2_GALAXY31 || SMG2_galaxy31_strm&lt;br /&gt;
|-&lt;br /&gt;
| Puzzle Plank Galaxy || BGM_SMG2_GALAXY_29 || STM_SMG2_GALAXY_29 || MBGM_SMG2_GALAXY_29 || SMG2_galaxy29_strm&lt;br /&gt;
|-&lt;br /&gt;
| Hightail Falls Galaxy || BGM_DASH_YOSHI ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Cosmic Cove Galaxy || BGM_SMG2_GALAXY_02 || STM_SMG2_GALAXY_02 || MBGM_SMG2_GALAXY_02 || SMG2_galaxy02_strm&lt;br /&gt;
|-&lt;br /&gt;
| Wild Glide Galaxy || BGM_GLIDER || STM_GLIDER || MBGM_GLIDER || SMG2_ev_glider_strm&lt;br /&gt;
|-&lt;br /&gt;
| Honeybloom Galaxy || BGM_SMG2_GALAXY_13 || STM_SMG2_GALAXY_13 || MBGM_SMG2_GALAXY_13 || SMG2_galaxy13_strm&lt;br /&gt;
|-&lt;br /&gt;
| Bowser&#039;s Lava Lair || BGM_SMG2_GALAXY_15 || STM_SMG2_GALAXY_15 || MBGM_SMG2_GALAXY_15 || SMG2_galaxy15_strm&lt;br /&gt;
|-&lt;br /&gt;
| Tall Trunk Galaxy Slide || BGM_SLIDER ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Haunty Halls Galaxy || BGM_SMG2_GALAXY_11 || STM_SMG2_GALAXY_11 || MBGM_SMG2_GALAXY_11 || SMG2_galaxy11_strm&lt;br /&gt;
|-&lt;br /&gt;
| Freezy Flake Galaxy || BGM_SMG2_GALAXY_19 || STM_SMG2_GALAXY_19 || MBGM_SMG2_GALAXY_19 || SMG2_galaxy19_strm&lt;br /&gt;
|-&lt;br /&gt;
| Beat Block Galaxy || BGM_REPEAT_TIMER ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Supermassive Galaxy || BGM_SMG2_GALAXY_23 || STM_SMG2_GALAXY_23 || MBGM_SMG2_GALAXY_23 || SMG2_galaxy23_strm&lt;br /&gt;
|-&lt;br /&gt;
| Flipsville Galaxy || BGM_SMG2_GALAXY_14 || STM_SMG2_GALAXY_14 || MBGM_SMG2_GALAXY_14 || SMG2_galaxy14_strm&lt;br /&gt;
|-&lt;br /&gt;
| Starshine Beach Galaxy || BGM_SMG2_GALAXY_27 || STM_SMG2_GALAXY_27 || MBGM_SMG2_GALAXY_27 || SMG2_galaxy27_multi&lt;br /&gt;
|-&lt;br /&gt;
| Sweet Mystery Galaxy || BGM_SMG2_GALAXY_10 || STM_SMG2_GALAXY_10 || MBGM_SMG2_GALAXY_10 || SMG2_galaxy10_strm&lt;br /&gt;
|-&lt;br /&gt;
| Space Storm Galaxy || BGM_SMG2_GALAXY_12 || STM_SMG2_GALAXY_12 || MBGM_SMG2_GALAXY_12 || SMG2_galaxy12_strm&lt;br /&gt;
|-&lt;br /&gt;
| Space Storm Galaxy 2 || BGM_SMG2_GALAXY_17 || STM_SMG2_GALAXY_17 || MBGM_SMG2_GALAXY_17 || SMG_galaxy17_multi&lt;br /&gt;
|-&lt;br /&gt;
| Slipsand Galaxy || BGM_SMG2_GALAXY_01 || STM_SMG2_GALAXY_01 || MBGM_SMG2_GALAXY_01 || SMG2_galaxy01_multi&lt;br /&gt;
|-&lt;br /&gt;
| Shiverburn Galaxy || BGM_SMG2_GALAXY_16 || STM_SMG2_GALAXY_16 || MBGM_SMG2_GALAXY_16 || SMG2_galaxy16_multi&lt;br /&gt;
|-&lt;br /&gt;
| Fleet Glide Galaxy || BGM_SMG2_GALAXY_28 || STM_SMG2_GALAXY_28 || MBGM_SMG2_GALAXY_28 || SMG2_galaxy28_strm&lt;br /&gt;
|-&lt;br /&gt;
| Melty Monster Galaxy || BGM_SMG2_GALAXY_30 || STM_SMG2_GALAXY_30 || MBGM_SMG2_GALAXY_30 || SMG2_galaxy30_strm&lt;br /&gt;
|-&lt;br /&gt;
| Throwback Galaxy || BGM_SMG2_GALAXY_21 || STM_SMG2_GALAXY_21 || MBGM_SMG2_GALAXY_21 || SMG2_galaxy21_strm&lt;br /&gt;
|-&lt;br /&gt;
| Slimy Spring Galaxy || BGM_SMG2_GALAXY_24 || STM_SMG2_GALAXY_24 || MBGM_SMG2_GALAXY_24 || SMG2_galaxy24_strm&lt;br /&gt;
|-&lt;br /&gt;
| Slimy Spring Galaxy (Ambience) || BGM_SMG2_GALAXY_24B || STM_SMG2_GALAXY_24B || MBGM_SMG2_GALAXY_24B || SMG2_galaxy24b_strm&lt;br /&gt;
|-&lt;br /&gt;
| Bowser&#039;s Galaxy Generator || BGM_SMG2_GALAXY_20 || STM_SMG2_GALAXY_20 || MBGM_SMG2_GALAXY_20 || SMG2_galaxy20_strm&lt;br /&gt;
|-&lt;br /&gt;
| Stone Cyclone Galaxy || BGM_SMG2_GALAXY_22 || STM_SMG2_GALAXY_22 || MBGM_SMG2_GALAXY_22 || SMG2_galaxy22_multi&lt;br /&gt;
|-&lt;br /&gt;
| Boss Blitz Galaxy || BGM_EV_BOSSRUSH ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Boss Blitz Galaxy (with fade-in) || BGM_EV_BOSSRUSH02 ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Unused Galaxy Theme || BGM_SMG2_GALAXY_08 || STM_SMG2_GALAXY_08 || MBGM_SMG2_GALAXY_08 || SMG2_galaxy08_strm&lt;br /&gt;
|-&lt;br /&gt;
| Gateway Galaxy || BGM_SMG2_GALAXY_25 || STM_SMG2_GALAXY_25 || MBGM_SMG2_GALAXY_25 || SMG2_galaxy25_strm&lt;br /&gt;
|-&lt;br /&gt;
| Good Egg Galaxy || BGM_SMG_GALAXY_01 || STM_SMG_GALAXY_01 || MBGM_SMG_GALAXY_01 || SMG_galaxy01_strm&lt;br /&gt;
|-&lt;br /&gt;
| Gusty Garden Galaxy || BGM_SMG_GALAXY_14 || STM_SMG_GALAXY_14 || MBGM_SMG_GALAXY_14 || SMG_galaxy14_strm&lt;br /&gt;
|-&lt;br /&gt;
| Bowser&#039;s Galaxy Reactor || BGM_SMG_GALAXY_28 || STM_SMG_GALAXY_28 || MBGM_SMG_GALAXY_28 || SMG_galaxy28_strm&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;5&amp;quot; | Miscellaneous Stage Music&lt;br /&gt;
|-&lt;br /&gt;
| Unknown Star || BGM_SMG2_GALAXY_INTER || STM_SMG2_GALAXY_INTER || MBGM_SMG2_GALAXY_INTER || SMG2_galaxy_inter_strm&lt;br /&gt;
|-&lt;br /&gt;
| Speedy Comet || BGM_SMG2_GALAXY_HURRY || STM_SMG2_GALAXY_HURRY || MBGM_SMG2_GALAXY_HURRY || SMG2_galaxy_hurry_strm&lt;br /&gt;
|-&lt;br /&gt;
| Daredevil Comet || BGM_SMG2_GALAXY_DANGER || STM_SMG2_GALAXY_DANGER || MBGM_SMG2_GALAXY_DANGER || SMG2_galaxy_danger_strm&lt;br /&gt;
|-&lt;br /&gt;
| Purple Comet || BGM_SMG2_GALAXY_26 || STM_SMG2_GALAXY_26 || MBGM_SMG2_GALAXY_26 || SMG2_galaxy26_strm&lt;br /&gt;
|-&lt;br /&gt;
| Pipe Interior || BGM_SMG2_GALAXY_18 || STM_SMG2_GALAXY_18 || MBGM_SMG2_GALAXY_18 || SMG2_galaxy18_strm&lt;br /&gt;
|-&lt;br /&gt;
| Bonus Room || BGM_GAMBLE ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Teleporter || BGM_SMG2_EV_PORTER ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Minigame || BGM_MINI_GAME || STM_MINI_GAME || MBGM_MINI_GAME || SMG2_ev_minigame_strm&lt;br /&gt;
|-&lt;br /&gt;
| Star Ball (Rolling Masterpiece) || BGM_TAMAKORO ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Star Ball (Rolling Coaster) || BGM_TAMAKORO_2 ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Tip Network || BGM_DREAM01 ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Captain Toad&#039;s Theme || BGM_EV_KINOTAN || STM_EV_KINOTAN || MBGM_EV_KINOTAN || SMG2_ev_kinotan_strm&lt;br /&gt;
|-&lt;br /&gt;
| Star Bunny Theme || BGM_EV_RABBIT || STM_EV_RABBIT || MBGM_EV_RABBIT || SMG2_ev_rabbit_strm&lt;br /&gt;
|-&lt;br /&gt;
| Whittle Theme || BGM_SMG2_EV_MOKKU || STM_SMG2_EV_MOKKU || MBGM_SMG2_EV_MOKKU || SMG2_ev_mokku_strm&lt;br /&gt;
|-&lt;br /&gt;
| Bowser Appears ||  || STM_SMG2_EV_KUPPABT01 ||  || SMG2_ev_kuppabt01_strm&lt;br /&gt;
|-&lt;br /&gt;
| A Chance to Grab a Star! 1 || BGM_STAR_CHANCE || STM_STAR_CHANCE || MBGM_STAR_CHANCE || SMG2_ev_starchance_strm&lt;br /&gt;
|-&lt;br /&gt;
| A Chance to Grab a Star! 2 || BGM_STAR_CHANCE_2 || STM_STAR_CHANCE_2 || MBGM_STAR_CHANCE_2 || SMG2_ev_starchance02_strm&lt;br /&gt;
|-&lt;br /&gt;
| A Chance to Grab a Star! 3 ||  || STM_STAR_CHANCE_3 ||  || SMG2_ev_starchance03_strm&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;5&amp;quot; | Boss Music&lt;br /&gt;
|-&lt;br /&gt;
| Peewee Piranha || BGM_SMG2_BOSS_05A || STM_SMG2_BOSS_05A || MBGM_SMG2_BOSS_05A || SMG2_boss05a_strm&lt;br /&gt;
|-&lt;br /&gt;
| Peewee Piranha (Fast) ||  || STM_SMG2_BOSS_05B ||  || SMG2_boss05b_strm&lt;br /&gt;
|-&lt;br /&gt;
| Giga-Lakitu || BGM_PINCH_01 ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Digga-Leg || BGM_SMG2_BOSS_08A || STM_SMG2_BOSS_08A || MBGM_SMG2_BOSS_08A || SMG2_boss08a_strm&lt;br /&gt;
|-&lt;br /&gt;
| Digga-Leg (Fast) ||  || STM_SMG2_BOSS08B ||  || SMG2_boss08b_strm&lt;br /&gt;
|-&lt;br /&gt;
| Gobblegut || BGM_SMG2_BOSS_01A || STM_SMG2_BOSS_01A || MBGM_SMG2_BOSS_01A || SMG2_boss01a_strm&lt;br /&gt;
|-&lt;br /&gt;
| Gobblegut (Fast) ||  || STM_SMG2_BOSS_01B ||  || SMG2_boss01b_strm&lt;br /&gt;
|-&lt;br /&gt;
| Bowser || BGM_SMG2_BOSS_07 || STM_SMG2_BOSS_07 || MBGM_SMG2_BOSS_07 || SMG2_boss07_multi&lt;br /&gt;
|-&lt;br /&gt;
| Bowser (Fast) || BGM_SMG2_BOSS_07B || STM_SMG2_BOSS_07B || MBGM_SMG2_BOSS_07B || SMG2_boss07b_multi&lt;br /&gt;
|-&lt;br /&gt;
| Megahammer || BGM_SMG2_BOSS_03A || STM_SMG2_BOSS_03A || MBGM_SMG2_BOSS_03A || SMG2_boss03a_multi&lt;br /&gt;
|-&lt;br /&gt;
| Megahammer (Fast) ||  || STM_SMG2_BOSS_03B ||  || SMG2_boss03b_strm&lt;br /&gt;
|-&lt;br /&gt;
| Glamdozer || BGM_SMG2_BOSS_02A || STM_SMG2_BOSS_02A || MBGM_SMG2_BOSS_02A || SMG2_boss02a_strm&lt;br /&gt;
|-&lt;br /&gt;
| Glamdozer (Fast) ||  || STM_SMG2_BOSS_02B ||  || SMG2_boss02b_strm&lt;br /&gt;
|-&lt;br /&gt;
| Squizzard || BGM_SMG2_BOSS_04A ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Boomsday Machine || BGM_SMG2_BOSS_06A || STM_SMG2_BOSS_06A || MBGM_SMG2_BOSS_06A || SMG2_boss06a_strm&lt;br /&gt;
|-&lt;br /&gt;
| Boomsday Machine (Fast) || BGM_SMG2_BOSS_06B || STM_SMG2_BOSS_06B || MBGM_SMG2_BOSS_06B || SMG2_boss06b_strm&lt;br /&gt;
|-&lt;br /&gt;
| Final Bowser || BGM_SMG2_BOSS_10 || STM_SMG2_BOSS_10 || MBGM_SMG2_BOSS_10 || SMG2_boss10_multi&lt;br /&gt;
|-&lt;br /&gt;
| Final Bowser (Without Ambience) ||  || STM_SMG2_BOSS10 ||  || SMG2_boss10_strm&lt;br /&gt;
|-&lt;br /&gt;
| Dino Piranha || BGM_SMG_BOSS_03A || STM_SMG_BOSS_03A || MBGM_SMG_BOSS_03A || SMG_boss03a_strm&lt;br /&gt;
|-&lt;br /&gt;
| Dino Piranha (Fast) || BGM_SMG_BOSS_03B || STM_SMG_BOSS_03B || MBGM_SMG_BOSS_03B || SMG_boss03b_strm&lt;br /&gt;
|-&lt;br /&gt;
| King Kaliente || BGM_SMG_BOSS_01A || STM_SMG_BOSS_01A || MBGM_SMG_BOSS_01A || SMG_boss01a_strm&lt;br /&gt;
|-&lt;br /&gt;
| King Kaliente (Fast) || BGM_SMG_BOSS_01B || STM_SMG_BOSS_01B || MBGM_SMG_BOSS_01B || SMG_boss01b_strm&lt;br /&gt;
|-&lt;br /&gt;
| Major Burrows || BGM_SMG_BOSS_05A || STM_SMG_BOSS_05A || MBGM_SMG_BOSS_05A || SMG_boss05a_strm&lt;br /&gt;
|-&lt;br /&gt;
| Major Burrows (Fast) || BGM_SMG_BOSS_05B || STM_SMG_BOSS_05B || MBGM_SMG_BOSS_05B || SMG_boss05b_strm&lt;br /&gt;
|-&lt;br /&gt;
| Bouldergeist || BGM_SMG_BOSS_09A || STM_SMG_BOSS_09A || MBGM_SMG_BOSS_09A || SMG_boss09a_multi&lt;br /&gt;
|-&lt;br /&gt;
| Bouldergeist (Fast) || BGM_SMG_BOSS_09B || STM_SMG_BOSS_09B || MBGM_SMG_BOSS_09B || SMG_boss09b_multi&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;5&amp;quot; | HUB &amp;amp; World Map Music&lt;br /&gt;
|-&lt;br /&gt;
| World 1 &amp;amp; 2 || BGM_SMG2_WORLDMAP_06 || STM_SMG2_WORLDMAP_06 || MBGM_SMG2_WORLDMAP_06 || SMG2_worldmap06_multi&lt;br /&gt;
|-&lt;br /&gt;
| World 3 || BGM_SMG2_WORLDMAP_00 || STM_SMG2_WORLDMAP_00 || MBGM_SMG2_WORLDMAP_00 || SMG2_worldmap00_multi&lt;br /&gt;
|-&lt;br /&gt;
| World 4 || BGM_SMG2_WORLDMAP_04 || STM_SMG2_WORLDMAP_04 || MBGM_SMG2_WORLDMAP_04 || SMG2_worldmap04_multi&lt;br /&gt;
|-&lt;br /&gt;
| World 5 || BGM_SMG2_WORLDMAP_08 || STM_SMG2_WORLDMAP_08 || MBGM_SMG2_WORLDMAP_08 || SMG2_worldmap08_multi&lt;br /&gt;
|-&lt;br /&gt;
| World 6 || BGM_SMG2_WORLDMAP_07 || STM_SMG2_WORLDMAP_07 || MBGM_SMG2_WORLDMAP_07 || SMG2_worldmap07_multi&lt;br /&gt;
|-&lt;br /&gt;
| World S || BGM_SMG2_WORLDMAP_03 || STM_SMG2_WORLDMAP_03 || MBGM_SMG2_WORLDMAP_03 || SMG2_worldmap03_multi&lt;br /&gt;
|-&lt;br /&gt;
| Green Star World || BGM_SMG2_WORLDMAP_05 || STM_SMG2_WORLDMAP_05 || MBGM_SMG2_WORLDMAP_05 || SMG2_worldmap05_multi&lt;br /&gt;
|-&lt;br /&gt;
| Starship Mario 1 || BGM_SMG2_MARIO_SHIP01 || STM_SMG2_MARIO_SHIP01 || MBGM_SMG2_MARIO_SHIP01 || SMG2_mario_ship01_strm&lt;br /&gt;
|-&lt;br /&gt;
| Starship Mario 2 || BGM_SMG2_MARIO_SHIP02 || STM_SMG2_MARIO_SHIP02 || MBGM_SMG2_MARIO_SHIP02 || SMG2_mario_ship02_strm&lt;br /&gt;
|-&lt;br /&gt;
| Starship Mario 3 || BGM_SMG2_MARIO_SHIP03 || STM_SMG2_MARIO_SHIP03 || MBGM_SMG2_MARIO_SHIP03 || SMG2_mario_ship03_strm&lt;br /&gt;
|-&lt;br /&gt;
| Comet Observatory 2 ||  || STM_SMG_ASTROOUT02 ||  || SMG_astroout02_strm&lt;br /&gt;
|-&lt;br /&gt;
| Comet Observatory 3 ||  || STM_SMG_ASTROOUT03 ||  || SMG_astroout03_strm&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;5&amp;quot; | Power-Up Music&lt;br /&gt;
|-&lt;br /&gt;
| Rainbow Power-Up || BGM_MUTEKI_A ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Rainbow Power-Up (first time) || BGM_MUTEKI_B ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Fire Power-Up || BGM_FIRE_A ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Fire Power-Up (first time) || BGM_FIRE_B ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Ice Power-Up || BGM_ICE_A ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Ice Power-Up (first time) || BGM_ICE_B ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Flying Power-Up || BGM_FLYING_A ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Flying Power-Up (first time) || BGM_FLYING_B ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
|  || BGM_FIRST_MORPH_A ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
|  || BGM_FIRST_MORPH_B ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;5&amp;quot; | Other Music&lt;br /&gt;
|-&lt;br /&gt;
| Title Music (Duplicate) || BGM_TITLE || STM_TITLE || MBGM_TITLE || SMG2_title_strm&lt;br /&gt;
|-&lt;br /&gt;
| Credits || BGM_SMG2_STAFFROLL || STM_SMG2_STAFFROLL || MBGM_SMG2_STAFFROLL || SMG2_staffroll_strm&lt;br /&gt;
|-&lt;br /&gt;
| Mushroom Kingdom ||  || STM_SMG2_EV_PROLOGUE_02 ||  || SMG2_ev_prolo02_strm&lt;br /&gt;
|-&lt;br /&gt;
| Master Luma&#039;s Theme || BGM_SMG2_EV_PROLO_03 ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Bowser Attacks ||  || STM_SMG2_EV_PROLOGUE_05 ||  || SMG2_ev_prolo05_strm&lt;br /&gt;
|-&lt;br /&gt;
| First Grand Star Collected ||  || STM_SMG2_FIRST_ASTRO ||  || SMG2_first_astro_strm&lt;br /&gt;
|-&lt;br /&gt;
| Entering World 1 ||  || STM_SMG2_FIRST_ASTRO2 ||  || SMG2_first_astro2_strm&lt;br /&gt;
|-&lt;br /&gt;
| Another Grand Star Collected ||  || STM_SMG2_SECOND_ASTRO ||  || SMG2_second_astro_strm&lt;br /&gt;
|-&lt;br /&gt;
| First Star Select || BGM_SMG2_EV_DEPART01 ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Star Select || BGM_SMG2_COURSESELECT02 ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| The Luma and the Hat ||  || STM_SMG2_EV_ENDING01 ||  || SMG2_ev_ending01_strm&lt;br /&gt;
|-&lt;br /&gt;
| Precious One ||  || STM_SMG2_EV_EPILOGUE_01 ||  || SMG2_ev_epilogue01_strm&lt;br /&gt;
|-&lt;br /&gt;
| E3 2006 Bubble || BGM_IN_BUBBLE ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
|  || BGM_KOOPA_JR_APPEAR ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
|  || BGM_PINCH_02 ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;5&amp;quot; | Jingles&lt;br /&gt;
|-&lt;br /&gt;
| Death || BGM_MISS ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Game Over || BGM_GAMEOVER ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Countdown || BGM_MINIGAME_START ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Won Race || BGM_RACE_WIN ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Lost Race || BGM_RACE_LOSE ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| New Galaxy || BGM_JG_NEW_GALAXY ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Planet Appeared || BGM_JG_APPEAR_PLANET ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Got Grand Star || BGM_JG_GRAND_STAR_GET ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| New High Score || BGM_JG_HIGH_SCORE ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
| Galaxy Completed || BGM_JG_GALAXY_COMPLETE ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
|  || BGM_JG_RETURN_HOME ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
|  || BGM_JG_START_CAMERA_DEMO ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
|  ||  || STM_SMG2_JG_COMETSE ||  || SMG2_jg_cometse_strm&lt;br /&gt;
|-&lt;br /&gt;
|  || BGM_SMG2_JG_COMET ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
|  || BGM_SMG2_JG_DECIDE ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
|  || BGM_SMG2_JG_GREENSTAR1 ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
|  || BGM_SMG2_JG_GSTAR1 ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
|  || BGM_SMG2_JG_GSTAR2 ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
|  || BGM_SMG2_JG_M_PLANET01 ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
|  || BGM_SMG2_JG_MEETCHIKO ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
|  || BGM_SMG2_JG_MEETYOSHI ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
|  || BGM_SMG2_JG_PAMATA ||  ||  || &lt;br /&gt;
|-&lt;br /&gt;
|  || BGM_SMG2_JG_TIME ||  ||  || &lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=Cutscenes&amp;diff=141</id>
		<title>Cutscenes</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=Cutscenes&amp;diff=141"/>
		<updated>2024-03-16T14:11:03Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: Add Action Types for SMG1 (apparently they are just shifted mostly...)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Files]]&lt;br /&gt;
[[Category:Lists]]&lt;br /&gt;
{{WIP}}&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;&#039;Todo:&#039;&#039;&#039;&lt;br /&gt;
*Finish the hardcoded cutscene names.&lt;br /&gt;
*More info and research on the use of canm and supported objects.&amp;lt;/small&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Cutscenes are flexible, complex scenes, which can execute more freedom in contrast to the SimpleDemoExecutor.&lt;br /&gt;
These scenes consist of individual sequences that are played in order. In each sequence, several actions can be executed from certain frames, such as changing the player&#039;s position, camera movements, sound effects, and more. To each sequence (and subsequence) different actions are linked, which are then executed at the time of this sequence.&lt;br /&gt;
&lt;br /&gt;
You can best visualize this in a kind of timeline. The timeline consists of the individual sequences, which consist of several actions. At the same time single subscequences can be executed together with the actual sequences.&lt;br /&gt;
&lt;br /&gt;
==Structure==&lt;br /&gt;
[[File:Cutscene_Visual-Representation.png|thumb|A visual representation of the first Yoshi Meets cutscene.]]&lt;br /&gt;
A cutscene is activated by a demo object via SW_APPEAR within the map and loads several sheet BCSV files located in the demo.arc archive of the respective galaxy/zone. The demo object loads the bcsv files using its defined sheet name and additional &amp;quot;Demo&amp;quot; in front of the file name of the BSCV attached and a respective sheet type at the end of the file name (e.g. &#039;&#039;&#039;Demo&#039;&#039;&#039;AfterGameOver&#039;&#039;&#039;Time&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
In addition, the demo object has its own cutscene name, which is only used in certain cases (e.g. to load certain sequences for [[Starship Mario]]) and also for camera codes. Certain names can be recognized by the game and then loads additional hardcoded settings such as behavior after scene completion. A list of these names [[Cutscenes#Hardcoded_Cutscene_Names|can be found below]].&lt;br /&gt;
&lt;br /&gt;
Objects other than the player object itself can be linked to the cutscene. These then use a cutscene group ID, which on the one hand must match the demo object ID and on the other hand must be entered in the action sheet together with the Japanese name of the object (defined in [[ObjNameTable]]).&lt;br /&gt;
&lt;br /&gt;
If there are several identical objects that are part of a cutscene, you can also define a cast group id for one specific object to distinguish it from the other identical objects for the scene.&lt;br /&gt;
&lt;br /&gt;
===Time===&lt;br /&gt;
Defines the individual sequences with their names and length. They are played in the order they are in the list.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Field Name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| PartName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Name of the sequence&lt;br /&gt;
|-&lt;br /&gt;
| TotalStep&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| Duration of the sequence in frames&lt;br /&gt;
|-&lt;br /&gt;
| SuspendFlag&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| If set to 1, pauses the cutscene and resumes gameplay. The cutscene will continue from here next time it is activated.&lt;br /&gt;
|-&lt;br /&gt;
| WaitUserInputFlag&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===SubPart===&lt;br /&gt;
Runs additional subsequences in parallel during a sequence.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Field Name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| SubPartName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Name of the sub sequence&lt;br /&gt;
|-&lt;br /&gt;
| SubPartTotalStep&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| The length of the sub sequence&lt;br /&gt;
|-&lt;br /&gt;
| MainPartName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Name of the main sequence this sub sequence belongs to&lt;br /&gt;
|-&lt;br /&gt;
| MainPartStep&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| The frame of the main sequence this sub sequence starts at&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Action===&lt;br /&gt;
Picks up objects and can position them to a given GeneralPos and play an animation.&lt;br /&gt;
&lt;br /&gt;
All animation types are supported. For more control you can use [[ActorInfo#ActorInfo|ActorAnimCtrl.bcsv]] for your objects to define multiple animation names of different animation types to the animation name defined in the cutscene. &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Field Name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| PartName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Sequence Name&lt;br /&gt;
|-&lt;br /&gt;
| CastName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Japanese Name of the object (defined in [[ObjNameTable]])&lt;br /&gt;
|-&lt;br /&gt;
| CastID&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| Cast ID of the object&lt;br /&gt;
|-&lt;br /&gt;
| ActionType&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| Pick an Action Type from the table below.&lt;br /&gt;
|-&lt;br /&gt;
| PosName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Name of the GeneralPos object for destination location&lt;br /&gt;
|-&lt;br /&gt;
| AnimName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Name of the animation, which can be loaded either from the ARC archive object or from a separate ARC archive with the additional name &amp;quot;Anim&amp;quot;.&lt;br /&gt;
|}&lt;br /&gt;
====Action Types====&lt;br /&gt;
Note that these action types are not available for any object that registers as a &amp;quot;Simple Demo Cast&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===== SMG1 =====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! ID !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Apppear || Makes the object Appear.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Kill || Makes the object Disappear (using it&#039;s Kill function).&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Special Function || Executes a function that the object specifically registered to the cutscene. This is object specific, and not every object has one.&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Special Nerve || Sets the objects Nerve to a nerve specifically registered to the cutscene. This is object specific, and not every object has one.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || On SW_A || The SW_A of this object will be activated.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || On SW_B || The SW_B of this object will be activated.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || Show Model || The model of the object will be unhidden.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || Hide Model || The model of the object will be hidden.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Start NPC Message || Start a conversation with an NPC. Effectively useless because NPC&#039;s do not register their text to cutscenes unless the cutscene has a specific name.&lt;br /&gt;
|-&lt;br /&gt;
| 9 || Start NPC Message (Alt) || Start a conversation with an NPC without stopping Mario&#039;s current animation. Effectively useless because NPC&#039;s do not register their text to cutscenes unless the cutscene has a specific name.&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Duplicate of 9 || Duplicate of 9.&lt;br /&gt;
|-&lt;br /&gt;
| 11 || Play Animation || Plays the animation that &amp;quot;AnimName&amp;quot; is set to. This happens for all Action Types.&lt;br /&gt;
|-&lt;br /&gt;
| 12 || Off SW_A || The SW_A of this object will be deactivated.&lt;br /&gt;
|-&lt;br /&gt;
| 13 || Off SW_B || The SW_B of this object will be deactivated.&lt;br /&gt;
|}&lt;br /&gt;
===== SMG2 =====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! ID !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Play Animation || Plays the animation that &amp;quot;AnimName&amp;quot; is set to. This happens for all Action Types.&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Apppear || Makes the object Appear.&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Kill || Makes the object Disappear (using it&#039;s Kill function).&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Special Function || Executes a function that the object specifically registered to the cutscene. This is object specific, and not every object has one.&lt;br /&gt;
|-&lt;br /&gt;
| 4 || Special Nerve || Sets the objects Nerve to a nerve specifically registered to the cutscene. This is object specific, and not every object has one.&lt;br /&gt;
|-&lt;br /&gt;
| 5 || On SW_A || The SW_A of this object will be activated.&lt;br /&gt;
|-&lt;br /&gt;
| 6 || On SW_B || The SW_B of this object will be activated.&lt;br /&gt;
|-&lt;br /&gt;
| 7 || Show Model || The model of the object will be unhidden.&lt;br /&gt;
|-&lt;br /&gt;
| 8 || Hide Model || The model of the object will be hidden.&lt;br /&gt;
|-&lt;br /&gt;
| 9 || Start NPC Message || Start a conversation with an NPC. Effectively useless because NPC&#039;s do not register their text to cutscenes unless the cutscene has a specific name.&lt;br /&gt;
|-&lt;br /&gt;
| 10 || Start NPC Message (Alt) || Start a conversation with an NPC without stopping Mario&#039;s current animation. Effectively useless because NPC&#039;s do not register their text to cutscenes unless the cutscene has a specific name.&lt;br /&gt;
|-&lt;br /&gt;
| 11 || Duplicate of 10 || Duplicate of 10.&lt;br /&gt;
|-&lt;br /&gt;
| 12 || Off SW_A || The SW_A of this object will be deactivated.&lt;br /&gt;
|-&lt;br /&gt;
| 13 || Off SW_B || The SW_B of this object will be deactivated.&lt;br /&gt;
|-&lt;br /&gt;
| 14 || Request Movement Off || Tries to pause execution of this object.&lt;br /&gt;
|-&lt;br /&gt;
| 15 || Request Movement On || Tries to resume execution of this object.&lt;br /&gt;
|-&lt;br /&gt;
| 16 || StoryBookWarpDemo || Unknown. Related to StoryBookWarpDemo. Uses 1 as arg.&lt;br /&gt;
|-&lt;br /&gt;
| 17 || StoryBookWarpDemo || Unknown. Related to StoryBookWarpDemo. Uses 0 as arg.&lt;br /&gt;
|-&lt;br /&gt;
| 18 || StoryBookWarpDemo || Unknown. Related to StoryBookWarpDemo.&lt;br /&gt;
|-&lt;br /&gt;
| 19 || StoryBookWarpDemo || Unknown. Related to StoryBookWarpDemo.&lt;br /&gt;
|-&lt;br /&gt;
| 20 || ? || Unknown. Used at the end of the cutscene where Mario meets Yoshi for the first time.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Player===&lt;br /&gt;
Can position Mario/Luigi to a specific GeneralPos and play an animation.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Field Name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| PartName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Name of the sequence&lt;br /&gt;
|-&lt;br /&gt;
| PosName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Name of the GeneralPos to teleport the player to&lt;br /&gt;
|-&lt;br /&gt;
| BckName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Name of the animation from MarioAnim.arc to play. (All other animationtypes than BCK are also supported)&lt;br /&gt;
|-&lt;br /&gt;
| Visible&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Camera===&lt;br /&gt;
Can play cameras, which can be played one after another. Can use either a camera code from the Map archive&#039;s [[Cameras|CameraParam.bcam]] file, or a key frame camera animation which are controlled via [[CANM]] files, which must be located in the object archive of the targeted object.&amp;lt;/br&amp;gt;&lt;br /&gt;
By default the camera is fixed on Mario/Luigi.&amp;lt;/br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For BCAM usage, the Camera ID name to be used is composed of the &#039;&#039;PartName&#039;&#039; and the &#039;&#039;Cutscenename&#039;&#039; (not the sheet name): &#039;&#039;&#039;e:&amp;lt;small&amp;gt;Cutscenename&amp;lt;/small&amp;gt;[&amp;lt;small&amp;gt;PartName&amp;lt;/small&amp;gt;]&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
For CANM usage, the name defined in &#039;&#039;AnimCameraName&#039;&#039; must match the CANM file&#039;s name and needs to be placed in the root of the targeted object&#039;s archive.&amp;lt;/br&amp;gt;&lt;br /&gt;
Seems to be supported only by certain objects. This has not yet been fully explored.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Field Name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| PartName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Name of the sequence&lt;br /&gt;
|-&lt;br /&gt;
| CameraTargetName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Japanese Name of the object the camera is focussed at.&lt;br /&gt;
|-&lt;br /&gt;
| CameraTargetCastID&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| Cast ID of the object&lt;br /&gt;
|-&lt;br /&gt;
| AnimCameraName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| CANM file name (with &amp;quot;.canm&amp;quot; extension) which must be placed in the root of the targeted object&#039;s archive.&lt;br /&gt;
|-&lt;br /&gt;
| AnimCameraStartFrame&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AnimCameraEndFrame&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| IsContinuous&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Sound===&lt;br /&gt;
Can change music and play sound effects.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Field Name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| PartName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Name of the sequence&lt;br /&gt;
|-&lt;br /&gt;
| Bgm&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| SystemSe&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| ActionSe&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| ReturnBgm&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| BgmWipeoutFrame&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| AllSoundStopFrame&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Wipe===&lt;br /&gt;
Can perform a fade out animation.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Field Name&lt;br /&gt;
! Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| PartName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| Name of the sequence&lt;br /&gt;
|-&lt;br /&gt;
| WipeName&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | STRING_OFFSET&lt;br /&gt;
| The wipe to use. See the [[#WipeName|WipeName]] table below.&lt;br /&gt;
|-&lt;br /&gt;
| WipeType&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| The function for the Wipe to perform. See the [[#WipeType|WipeType]] table below.&lt;br /&gt;
|-&lt;br /&gt;
| WipeFrame&lt;br /&gt;
| style=&amp;quot;font-size:12px;&amp;quot; | LONG&lt;br /&gt;
| The amount of frames that the wipe will move for. Higher values = Slower movement&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
====WipeName====&lt;br /&gt;
Below is a list of available WipeName values:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 円ワイプ || Circle Wipe&lt;br /&gt;
|-&lt;br /&gt;
| フェードワイプ || Black Fade&lt;br /&gt;
|-&lt;br /&gt;
| 白フェードワイプ || White Fade&lt;br /&gt;
|-&lt;br /&gt;
| ゲームオーバー || Game Over&lt;br /&gt;
|-&lt;br /&gt;
| クッパ || Bowser Face (Death wipe)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note: The Mario wipe is missing because the Mario wipe is a System Wipe and not a Scene Wipe. DemoWipes can only be Scene Wipes.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====WipeType====&lt;br /&gt;
Below is the list of Wipe functions. The table below uses the Black Fade as an example.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Value !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Open Wipe (Fade to Gameplay)&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Close Wipe (Fade to Black)&lt;br /&gt;
|-&lt;br /&gt;
| 2 || Force Open Wipe (Cut to Gameplay)&lt;br /&gt;
|-&lt;br /&gt;
| 3 || Force Close Wipe (Cut to Black)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Tip: If you need to change wipes while the wipe is closed, use Force Close before using Open for a smoother transition.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Hardcoded Cutscene Names===&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;&#039;Todo:&#039;&#039;&#039; Finish this.&amp;lt;/small&amp;gt;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
! Cutscene Name&lt;br /&gt;
! Meaning&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| ベビチコ出会い&lt;br /&gt;
| Master Luma Meeting&lt;br /&gt;
| -Uses hardcoded cameras&amp;lt;br /&amp;gt;-Activates spin after completion when the galaxy uses the StageType &amp;quot;Storybook&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Tools==&lt;br /&gt;
Up to now, there are no tools that allow the cutscenes to be edited directly in a clear interface. Since the cutscenes sheet consists of [[BCSV]] files, they can be edited with any other BCSV editor, like Whitehole. They can also be converted to CSV files and vice versa with Pyjmap.&lt;br /&gt;
&lt;br /&gt;
The tools can be found on the [[Tools_and_Resources|tools and ressources page]].&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=Stage_files&amp;diff=132</id>
		<title>Stage files</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=Stage_files&amp;diff=132"/>
		<updated>2024-02-27T17:14:27Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: Starting this page hooray&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Files]]&lt;br /&gt;
[[Category:Lists]]&lt;br /&gt;
{{WIP}}&lt;br /&gt;
&lt;br /&gt;
=Super Mario Galaxy=&lt;br /&gt;
&lt;br /&gt;
== Scenario.arc ==&lt;br /&gt;
&lt;br /&gt;
== Map.arc ==&lt;br /&gt;
&lt;br /&gt;
=Super Mario Galaxy 2=&lt;br /&gt;
&lt;br /&gt;
== Scenario.arc ==&lt;br /&gt;
&lt;br /&gt;
== Map.arc ==&lt;br /&gt;
&lt;br /&gt;
== Sound.arc ==&lt;br /&gt;
&lt;br /&gt;
== Design.arc ==&lt;br /&gt;
&lt;br /&gt;
== Demo.arc ==&lt;br /&gt;
&lt;br /&gt;
== Ghost.arc ==&lt;br /&gt;
&lt;br /&gt;
== UseResource.arc ==&lt;br /&gt;
&lt;br /&gt;
== ZoneInfo.arc ==&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=MSBF_(File_Format)&amp;diff=131</id>
		<title>MSBF (File Format)</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=MSBF_(File_Format)&amp;diff=131"/>
		<updated>2024-02-24T14:24:11Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: /* Condition Types */ Add notes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:File formats]]&lt;br /&gt;
&#039;&#039;&#039;MSBF&#039;&#039;&#039; stands for &#039;&#039;Message Binary Flow&#039;&#039;, it contains control for the order of textboxes in &#039;&#039;&#039;Super Mario Galaxy 2&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || &#039;&#039;MsgFlwBn&#039;&#039; in ASCII.&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || UInt16 || Endianess. 0xFEFF for Big Endian, 0xFFFE for Little Endian.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || UInt32 || Version.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E || UInt16 || Number of sections.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || UInt16 || Padding.&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || UInt32 || File length.&lt;br /&gt;
|-&lt;br /&gt;
| 0x16 || Byte[0xA] || Padding.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Sections =&lt;br /&gt;
After the header follows the sections. It is worth noting that these sections are padded to the nearest 0x10th byte with the value 0xAB.&lt;br /&gt;
&lt;br /&gt;
== FLW2 ==&lt;br /&gt;
&lt;br /&gt;
=== Header ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || &#039;&#039;FLW2&#039;&#039; in ASCII.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt32 || Section size. Does not account for this header or padding.&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Byte[0x8] || Padding.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flow Node Entries ===&lt;br /&gt;
&lt;br /&gt;
After the header come the flow node entries.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt16 || Node Entry Count.&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Uint16 || Label Count.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || byte[0x4] || Padding.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
A Node is defined by the following structure:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt16 || Node Type. See [[#Node_Types|Node Types]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || UInt16[0x5] || A collection of shorts. The shorts have varying uses depending on the Node Type.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
After the nodes, comes a list of UInt16&#039;s regarding Message Labels&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt16[Label Count] || Label Value&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Node Types ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || MESSAGE || This node will display a MSBT entry. Message Labels are ignored, and are indexed by ID&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || CONDITION || This node will branch to another node based on if a condition is met or not&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || EVENT || This node will trigger an event, such as activating a switch, or spawning a star&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || ENTRY || This node should come first. It acts as the starting point, and simply has one value to point to the actual first Node.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== MESSAGE Node Format ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt16 || Unused&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt16 || Unused&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt16 || Message ID&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || UInt16 || Next Flow Node ID&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || UInt16 || Unused&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== CONDITION Node Format ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt16 || Unused&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt16 || &#039;&#039;&#039;Unknown&#039;&#039;&#039;, always 0x0002&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt16 || [[#Condition_Types|Condition Type]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || UInt16 || Condition Parameter. What this does depends on the [[#Condition_Types|Condition Type]] defined above&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || UInt16 || Index into the condition list. Indexes are always 1 apart (0x00, 0x02, 0x04, etc.).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Condition Types =====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! ID !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || YesNo Result || Shows the YesNo Layout and displays one of the [[#YesNo_Results|YesNo Options]]&amp;lt;br/&amp;gt;&#039;&#039;&#039;Requires a Message Node to come before it, or else the game will crash&#039;&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || BranchFunc || Object dependent. See [[#Branch_Functions|Branch Functions]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Player Distance || Checks to see if the player is close enough to the NPC&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || SW_A || Checks to see if the NPC&#039;s SW_A has been activated&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || SW_B || Checks to see if the NPC&#039;s SW_B has been activated&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Player Mode: Normal || Checks to see if the Player has no powerup&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Player Mode: Bee || Checks to see if the Player has the Bee Mushroom&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Player Mode: Boo || Checks to see if the Player has the Boo Mushroom&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Power Star Appeared || Checks to see if the Power Star has spawned&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || Player || Checks to see if the Player is Luigi&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Cutscene || Checks to see if a cutscene is currently active or not&lt;br /&gt;
|-&lt;br /&gt;
| 0x0B || Message Read Flag || Checks to see if the Player has already read this message (needs verification)&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || 120 Star Ending || Checks to see if the 120 star ending has been Achieved&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || &#039;&#039;&#039;Unknown&#039;&#039;&#039; || &#039;&#039;&#039;Unknown&#039;&#039;&#039;&amp;lt;br/&amp;gt;Only known to be used by King Whomp.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E || Player Mode: Yoshi || Checks to see if the Player is riding Yoshi&lt;br /&gt;
|-&lt;br /&gt;
| 0x0F || Player Mode: Cloud || Checks to see if the Player has the Cloud Flower&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Player Mode: Rock || Checks to see if the Player has the Rock Mushroom&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== YesNo Results =====&lt;br /&gt;
Below is a complete list of YesNo Results, and their button text.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! ID !! Name !! Left Button Text (False) !! Right Button Text (True)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || PichanRace || Quit || Race&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || TicoShopExchange || No thanks || Buy&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || TicoShopWhich || 1-Up || Life&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Dreamer || No || Yes&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || SuperDreamer || No || Yes&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || MuimuiPlay || No thanks || OK&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || ScoreAttackPlay || No || Yes&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || ScoreAttackContinue || Start over || Continue&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || GliBirdRide || No thanks || Let&#039;s glide&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || TicoFatCoinGive || No || Yes&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || FireWoodBoxPlay || No thanks || Sure&lt;br /&gt;
|-&lt;br /&gt;
| 0x0B || GliBirdTutorial || No thanks || Tell me&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || LuigiTalkNPC || No thanks || OK&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || KinopioBank || No thanks || OK&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E || LuckeyRoom || Quit || OK&lt;br /&gt;
|-&lt;br /&gt;
| 0x0F || MeisterTrade || That&#039;s right || Yes&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || TamakoroTutorial || That&#039;s OK || Tell me&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || MeisterConfirm || That&#039;s right || Yes&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Branch Functions =====&lt;br /&gt;
Each branch function will take a single number as a parameter. if the table below lists the Parameter Name as &amp;quot;(none)&amp;quot; then you must pass in 0&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! Object Name !! Function Name !! Parameter Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| Caretaker (Gearmo) || Caretaker::branchFuncComet || Check ID || Uses the parameter to determine which of 7 checks is performed on your current Purple Coin count. Valid values are 0, 1, 2, 3, 4, 5, and 6.&lt;br /&gt;
|-&lt;br /&gt;
| Caretaker (Gearmo) || Caretaker::branchFuncStar || (none) || Checks to see if the Geamo&#039;s SW_A has been activated&lt;br /&gt;
|-&lt;br /&gt;
| CaretakerHunter (Gearmo Hunter) || CaretakerHunter::branchFunc || (none) || &#039;&#039;&#039;Unknown&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Kinopio (Toad) || Kinopio::branchFunc || Progress Check ID || See &#039;&#039;MR::branchFuncGameProgress&#039;&#039; at the bottom of the table&lt;br /&gt;
|-&lt;br /&gt;
| KinopioBank (Banktoad) || KinopioBank::branchFunc || Check ID || &#039;&#039;&#039;Unknown&#039;&#039;&#039;, valid values are 0, 1, 2, 3....and something over 10000&lt;br /&gt;
|-&lt;br /&gt;
| KinopioPostman (Mailtoad) || KinopioPostman::branchFunc || Check ID || &#039;&#039;&#039;Unknown&#039;&#039;&#039;, valid values are 0, and 1.&lt;br /&gt;
|-&lt;br /&gt;
| KinopioPostman (Mailtoad) || KinopioPostman::branchFuncLuigi || (none) || &#039;&#039;&#039;Unknown&#039;&#039;&#039;, only activates if the player is Luigi&lt;br /&gt;
|-&lt;br /&gt;
| LuigiIntrusively (The Luigi you can play as) || LuigiIntrusively::branchFunc || (none) || &#039;&#039;&#039;Unknown&#039;&#039;&#039;, checks to see if Luigi is in a specific state&lt;br /&gt;
|-&lt;br /&gt;
| LuigiTalkNPC (Luigi NPC) || LuigiTalkNPC::branchFunc || Progress Check ID || See &#039;&#039;MR::branchFuncGameProgress&#039;&#039; at the bottom of the table&lt;br /&gt;
|-&lt;br /&gt;
| MameMuimuiAttackMan&amp;lt;br/&amp;gt;(The Chimp [Ice Skating]) || MameMuimuiAttackMan::branchFunc || Check ID || 0 = Check the scorer object for &#039;&#039;&#039;Unknown1&#039;&#039;&#039;.&amp;lt;br/&amp;gt;1 = Check the scorer object for &#039;&#039;&#039;Unknown2&#039;&#039;&#039;.&amp;lt;br/&amp;gt;2 = Check the scorer object for a new high score.&lt;br /&gt;
|-&lt;br /&gt;
| Meister (Lubba) || Meister::branchFunc || &#039;&#039;&#039;Unknown&#039;&#039;&#039; || &#039;&#039;&#039;Unknown&#039;&#039;&#039;, for some reason, this function is registered twice.&lt;br /&gt;
|-&lt;br /&gt;
| Moc (Whittle) || Moc::branchFunc || Check ID || 0 = &#039;&#039;&#039;Unknown&#039;&#039;&#039;&amp;lt;br/&amp;gt;1 = &#039;&#039;&#039;Unknown&#039;&#039;&#039;, Something related to how many purple coins you have&lt;br /&gt;
|-&lt;br /&gt;
| Pichan (Jibberjay) || Pichan::branchFunc || Check ID || 0 = &#039;&#039;&#039;Unknown&#039;&#039;&#039;&amp;lt;br/&amp;gt;1 = Checks to see if you have completed the Glider Tutorial.&amp;lt;br/&amp;gt;2 = &#039;&#039;&#039;Unknown&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| PichanRacer (Jibberjay Racer) || PichanRacer::branchFunc || Check ID || 0 = &#039;&#039;&#039;Unknown&#039;&#039;&#039;&amp;lt;br/&amp;gt;1 = Checks to see if you have completed the Glider Tutorial.&amp;lt;br/&amp;gt;2 = &#039;&#039;&#039;Unknown&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| ScoreAttackMan&amp;lt;br/&amp;gt;(The Chimp [Score Attack]) || ScoreAttackMan::branchFunc || Check ID || 0 = Checks to see if time is up.&amp;lt;br/&amp;gt;1 = Checks to see if you have beaten the target score.&amp;lt;br/&amp;gt;2 = Checks to see if you beat the high score.&amp;lt;br/&amp;gt;3 = Checks to see if the stage is MokumokuValleyGalaxy (Fluffy Bluff).&amp;lt;br/&amp;gt;4 = Checks to see if the stage is HoneyBeeVillageGalaxy (Honeyhop Galaxy).&lt;br /&gt;
|-&lt;br /&gt;
| Tico (Luma) || Tico::branchFunc || Progress Check ID || See &#039;&#039;MR::branchFuncGameProgress&#039;&#039; at the bottom of the table&lt;br /&gt;
|-&lt;br /&gt;
| TicoFatCoin (Hungry Luma [Coins]) || TicoFatCoin::branchFunc || (none) || Checks to see if you have the required amount of coins&lt;br /&gt;
|-&lt;br /&gt;
| TicoShop (Luma Shop) || TicoShop::branchFunc || (none) || Checks to see if you have the required amount of starbits&lt;br /&gt;
|-&lt;br /&gt;
| TicoShopDice (Luma Shop [Chance Cubes]) || TicoShopDice::branchFunc || (none) || Checks to see if you have the required amount of Currency (based on the object&#039;s arguments)&lt;br /&gt;
|-&lt;br /&gt;
| TogepinAttackMan&amp;lt;br/&amp;gt;(The Chimp [Bowling]) || TogepinAttackMan::branchFunc || Check ID || 0 = Check the scorer object for &#039;&#039;&#039;Unknown1&#039;&#039;&#039;.&amp;lt;br/&amp;gt;1 = Check the scorer object for &#039;&#039;&#039;Unknown2&#039;&#039;&#039;.&amp;lt;br/&amp;gt;2 = Check the scorer object for a new high score.&lt;br /&gt;
|-&lt;br /&gt;
| (none) || MR::branchFuncGameProgress || Progress Check ID || Valid Values are 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== EVENT Node Format ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt16 || Unused&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt16 || [[#Event_Types|Event Type]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt16 || Next Flow Node ID&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || UInt16 || Unused&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || UInt16 || Event Parameter. What this is used for depends on the [[#Event_Types|Event Type]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Event Types =====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! ID !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || EventFunc&amp;lt;br/&amp;gt;(With Advance) || Object Dependent.&amp;lt;br/&amp;gt;Will automatically advance to the next flow when the event completes.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || EventFunc&amp;lt;br/&amp;gt;(No Advance) || Object Dependent.&amp;lt;br/&amp;gt;Will end the current talk session when the event completes.&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || (none) || There is no action mapped to 0x02, so it just goes to the next flow node&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Forward Flow || Advances to the next node&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || AnimeFunc || Object Dependent&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || SW_A || Activate the NPC&#039;s SW_A&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || SW_B || Activate the NPC&#039;s SW_B&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || KillFunc || Object Dependent&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || SW_A || Deactivate the NPC&#039;s SW_A&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || SW_B || Deactivate the NPC&#039;s SW_B&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Hide Talk Bubble Pointer || Hides the little triangle that indicates the position of the speaker&lt;br /&gt;
|-&lt;br /&gt;
| 0x0B || Show Talk Bubble Pointer || Shows the little triangle that indicates the position of the speaker&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== ENTRY Node Format ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt16 || Unused&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt16 || Next Flow Node ID&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt16 || Unused&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || UInt16 || Unused&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || UInt16 || Unused&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== FEN1 ==&lt;br /&gt;
&lt;br /&gt;
=== Header ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || &#039;&#039;FEN1&#039;&#039; in ASCII.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt32 || Section size. Does not account for this header or padding.&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Byte[0x8] || Padding.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Data ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt32 || Entry Count&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Byte[0x8] || Padding&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || UInt32[Entry Count] || Data Offsets. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
After the data is written, there is a collection of Message Label Strings. After each string is padding to the nearest 0x04.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || byte || String Length&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || String[String Length] || Text&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=MSBF_(File_Format)&amp;diff=129</id>
		<title>MSBF (File Format)</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=MSBF_(File_Format)&amp;diff=129"/>
		<updated>2024-02-08T02:01:21Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: /* Event Types */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:File formats]]&lt;br /&gt;
&#039;&#039;&#039;MSBF&#039;&#039;&#039; stands for &#039;&#039;Message Binary Flow&#039;&#039;, it contains control for the order of textboxes in &#039;&#039;&#039;Super Mario Galaxy 2&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || &#039;&#039;MsgFlwBn&#039;&#039; in ASCII.&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || UInt16 || Endianess. 0xFEFF for Big Endian, 0xFFFE for Little Endian.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || UInt32 || Version.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E || UInt16 || Number of sections.&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || UInt16 || Padding.&lt;br /&gt;
|-&lt;br /&gt;
| 0x12 || UInt32 || File length.&lt;br /&gt;
|-&lt;br /&gt;
| 0x16 || Byte[0xA] || Padding.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Sections =&lt;br /&gt;
After the header follows the sections. It is worth noting that these sections are padded to the nearest 0x10th byte with the value 0xAB.&lt;br /&gt;
&lt;br /&gt;
== FLW2 ==&lt;br /&gt;
&lt;br /&gt;
=== Header ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || &#039;&#039;FLW2&#039;&#039; in ASCII.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt32 || Section size. Does not account for this header or padding.&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Byte[0x8] || Padding.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Flow Node Entries ===&lt;br /&gt;
&lt;br /&gt;
After the header come the flow node entries.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt16 || Node Entry Count.&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Uint16 || Label Count.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || byte[0x4] || Padding.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
A Node is defined by the following structure:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt16 || Node Type. See [[#Node_Types|Node Types]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || UInt16[0x5] || A collection of shorts. The shorts have varying uses depending on the Node Type.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
After the nodes, comes a list of UInt16&#039;s regarding Message Labels&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt16[Label Count] || Label Value&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Node Types ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! Value !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || MESSAGE || This node will display a MSBT entry. Message Labels are ignored, and are indexed by ID&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || CONDITION || This node will branch to another node based on if a condition is met or not&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || EVENT || This node will trigger an event, such as activating a switch, or spawning a star&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || ENTRY || This node should come first. It acts as the starting point, and simply has one value to point to the actual first Node.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== MESSAGE Node Format ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt16 || Unused&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt16 || Unused&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt16 || Message ID&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || UInt16 || Next Flow Node ID&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || UInt16 || Unused&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== CONDITION Node Format ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt16 || Unused&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt16 || &#039;&#039;&#039;Unknown&#039;&#039;&#039;, always 0x0002&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt16 || [[#Condition_Types|Condition Type]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || UInt16 || Condition Parameter. What this does depends on the [[#Condition_Types|Condition Type]] defined above&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || UInt16 || Index into the condition list. Indexes are always 1 apart (0x00, 0x02, 0x04, etc.).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Condition Types =====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! ID !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || YesNo Result || Shows the YesNo Layout and displays one of the [[#YesNo_Results|YesNo Options]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || BranchFunc || Object dependent. See [[#Branch_Functions|Branch Functions]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || Player Distance || Checks to see if the player is close enough to the NPC&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || SW_A || Checks to see if the NPC&#039;s SW_A has been activated&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || SW_B || Checks to see if the NPC&#039;s SW_B has been activated&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || Player Mode: Normal || Checks to see if the Player has no powerup&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || Player Mode: Bee || Checks to see if the Player has the Bee Mushroom&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || Player Mode: Boo || Checks to see if the Player has the Boo Mushroom&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Power Star Appeared || Checks to see if the Power Star has spawned&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || Player || Checks to see if the Player is Luigi&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Cutscene || Checks to see if a cutscene is currently active or not&lt;br /&gt;
|-&lt;br /&gt;
| 0x0B || Message Read Flag || Checks to see if the Player has already read this message&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || 120 Star Ending || Checks to see if the 120 star ending has been Achieved&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || &#039;&#039;&#039;Unknown&#039;&#039;&#039; || &#039;&#039;&#039;Unknown&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E || Player Mode: Yoshi || Checks to see if the Player is riding Yoshi&lt;br /&gt;
|-&lt;br /&gt;
| 0x0F || Player Mode: Cloud || Checks to see if the Player has the Cloud Flower&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || Player Mode: Rock || Checks to see if the Player has the Rock Mushroom&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== YesNo Results =====&lt;br /&gt;
Below is a complete list of YesNo Results, and their button text.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! ID !! Name !! Left Button Text (False) !! Right Button Text (True)&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || PichanRace || Quit || Race&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || TicoShopExchange || No thanks || Buy&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || TicoShopWhich || 1-Up || Life&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Dreamer || No || Yes&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || SuperDreamer || No || Yes&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || MuimuiPlay || No thanks || OK&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || ScoreAttackPlay || No || Yes&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || ScoreAttackContinue || Start over || Continue&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || GliBirdRide || No thanks || Let&#039;s glide&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || TicoFatCoinGive || No || Yes&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || FireWoodBoxPlay || No thanks || Sure&lt;br /&gt;
|-&lt;br /&gt;
| 0x0B || GliBirdTutorial || No thanks || Tell me&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || LuigiTalkNPC || No thanks || OK&lt;br /&gt;
|-&lt;br /&gt;
| 0x0D || KinopioBank || No thanks || OK&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E || LuckeyRoom || Quit || OK&lt;br /&gt;
|-&lt;br /&gt;
| 0x0F || MeisterTrade || That&#039;s right || Yes&lt;br /&gt;
|-&lt;br /&gt;
| 0x10 || TamakoroTutorial || That&#039;s OK || Tell me&lt;br /&gt;
|-&lt;br /&gt;
| 0x11 || MeisterConfirm || That&#039;s right || Yes&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Branch Functions =====&lt;br /&gt;
Each branch function will take a single number as a parameter. if the table below lists the Parameter Name as &amp;quot;(none)&amp;quot; then you must pass in 0&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! Object Name !! Function Name !! Parameter Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| Caretaker (Gearmo) || Caretaker::branchFuncComet || Check ID || Uses the parameter to determine which of 7 checks is performed on your current Purple Coin count. Valid values are 0, 1, 2, 3, 4, 5, and 6.&lt;br /&gt;
|-&lt;br /&gt;
| Caretaker (Gearmo) || Caretaker::branchFuncStar || (none) || Checks to see if the Geamo&#039;s SW_A has been activated&lt;br /&gt;
|-&lt;br /&gt;
| CaretakerHunter (Gearmo Hunter) || CaretakerHunter::branchFunc || (none) || &#039;&#039;&#039;Unknown&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| Kinopio (Toad) || Kinopio::branchFunc || Progress Check ID || See &#039;&#039;MR::branchFuncGameProgress&#039;&#039; at the bottom of the table&lt;br /&gt;
|-&lt;br /&gt;
| KinopioBank (Banktoad) || KinopioBank::branchFunc || Check ID || &#039;&#039;&#039;Unknown&#039;&#039;&#039;, valid values are 0, 1, 2, 3....and something over 10000&lt;br /&gt;
|-&lt;br /&gt;
| KinopioPostman (Mailtoad) || KinopioPostman::branchFunc || Check ID || &#039;&#039;&#039;Unknown&#039;&#039;&#039;, valid values are 0, and 1.&lt;br /&gt;
|-&lt;br /&gt;
| KinopioPostman (Mailtoad) || KinopioPostman::branchFuncLuigi || (none) || &#039;&#039;&#039;Unknown&#039;&#039;&#039;, only activates if the player is Luigi&lt;br /&gt;
|-&lt;br /&gt;
| LuigiIntrusively (The Luigi you can play as) || LuigiIntrusively::branchFunc || (none) || &#039;&#039;&#039;Unknown&#039;&#039;&#039;, checks to see if Luigi is in a specific state&lt;br /&gt;
|-&lt;br /&gt;
| LuigiTalkNPC (Luigi NPC) || LuigiTalkNPC::branchFunc || Progress Check ID || See &#039;&#039;MR::branchFuncGameProgress&#039;&#039; at the bottom of the table&lt;br /&gt;
|-&lt;br /&gt;
| MameMuimuiAttackMan&amp;lt;br/&amp;gt;(The Chimp [Ice Skating]) || MameMuimuiAttackMan::branchFunc || Check ID || 0 = Check the scorer object for &#039;&#039;&#039;Unknown1&#039;&#039;&#039;.&amp;lt;br/&amp;gt;1 = Check the scorer object for &#039;&#039;&#039;Unknown2&#039;&#039;&#039;.&amp;lt;br/&amp;gt;2 = Check the scorer object for a new high score.&lt;br /&gt;
|-&lt;br /&gt;
| Meister (Lubba) || Meister::branchFunc || &#039;&#039;&#039;Unknown&#039;&#039;&#039; || &#039;&#039;&#039;Unknown&#039;&#039;&#039;, for some reason, this function is registered twice.&lt;br /&gt;
|-&lt;br /&gt;
| Moc (Whittle) || Moc::branchFunc || Check ID || 0 = &#039;&#039;&#039;Unknown&#039;&#039;&#039;&amp;lt;br/&amp;gt;1 = &#039;&#039;&#039;Unknown&#039;&#039;&#039;, Something related to how many purple coins you have&lt;br /&gt;
|-&lt;br /&gt;
| Pichan (Jibberjay) || Pichan::branchFunc || Check ID || 0 = &#039;&#039;&#039;Unknown&#039;&#039;&#039;&amp;lt;br/&amp;gt;1 = Checks to see if you have completed the Glider Tutorial.&amp;lt;br/&amp;gt;2 = &#039;&#039;&#039;Unknown&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| PichanRacer (Jibberjay Racer) || PichanRacer::branchFunc || Check ID || 0 = &#039;&#039;&#039;Unknown&#039;&#039;&#039;&amp;lt;br/&amp;gt;1 = Checks to see if you have completed the Glider Tutorial.&amp;lt;br/&amp;gt;2 = &#039;&#039;&#039;Unknown&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| ScoreAttackMan&amp;lt;br/&amp;gt;(The Chimp [Score Attack]) || ScoreAttackMan::branchFunc || Check ID || 0 = Checks to see if time is up.&amp;lt;br/&amp;gt;1 = Checks to see if you have beaten the target score.&amp;lt;br/&amp;gt;2 = Checks to see if you beat the high score.&amp;lt;br/&amp;gt;3 = Checks to see if the stage is MokumokuValleyGalaxy (Fluffy Bluff).&amp;lt;br/&amp;gt;4 = Checks to see if the stage is HoneyBeeVillageGalaxy (Honeyhop Galaxy).&lt;br /&gt;
|-&lt;br /&gt;
| Tico (Luma) || Tico::branchFunc || Progress Check ID || See &#039;&#039;MR::branchFuncGameProgress&#039;&#039; at the bottom of the table&lt;br /&gt;
|-&lt;br /&gt;
| TicoFatCoin (Hungry Luma [Coins]) || TicoFatCoin::branchFunc || (none) || Checks to see if you have the required amount of coins&lt;br /&gt;
|-&lt;br /&gt;
| TicoShop (Luma Shop) || TicoShop::branchFunc || (none) || Checks to see if you have the required amount of starbits&lt;br /&gt;
|-&lt;br /&gt;
| TicoShopDice (Luma Shop [Chance Cubes]) || TicoShopDice::branchFunc || (none) || Checks to see if you have the required amount of Currency (based on the object&#039;s arguments)&lt;br /&gt;
|-&lt;br /&gt;
| TogepinAttackMan&amp;lt;br/&amp;gt;(The Chimp [Bowling]) || TogepinAttackMan::branchFunc || Check ID || 0 = Check the scorer object for &#039;&#039;&#039;Unknown1&#039;&#039;&#039;.&amp;lt;br/&amp;gt;1 = Check the scorer object for &#039;&#039;&#039;Unknown2&#039;&#039;&#039;.&amp;lt;br/&amp;gt;2 = Check the scorer object for a new high score.&lt;br /&gt;
|-&lt;br /&gt;
| (none) || MR::branchFuncGameProgress || Progress Check ID || Valid Values are 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== EVENT Node Format ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt16 || Unused&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt16 || [[#Event_Types|Event Type]]&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt16 || Next Flow Node ID&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || UInt16 || Unused&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || UInt16 || Event Parameter. What this is used for depends on the [[#Event_Types|Event Type]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Event Types =====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! ID !! Name !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || EventFunc&amp;lt;br/&amp;gt;(With Advance) || Object Dependent.&amp;lt;br/&amp;gt;Will automatically advance to the next flow when the event completes.&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || EventFunc&amp;lt;br/&amp;gt;(No Advance) || Object Dependent.&amp;lt;br/&amp;gt;Will end the current talk session when the event completes.&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || (none) || There is no action mapped to 0x02, so it just goes to the next flow node&lt;br /&gt;
|-&lt;br /&gt;
| 0x03 || Forward Flow || Advances to the next node&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || AnimeFunc || Object Dependent&lt;br /&gt;
|-&lt;br /&gt;
| 0x05 || SW_A || Activate the NPC&#039;s SW_A&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || SW_B || Activate the NPC&#039;s SW_B&lt;br /&gt;
|-&lt;br /&gt;
| 0x07 || KillFunc || Object Dependent&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || SW_A || Deactivate the NPC&#039;s SW_A&lt;br /&gt;
|-&lt;br /&gt;
| 0x09 || SW_B || Deactivate the NPC&#039;s SW_B&lt;br /&gt;
|-&lt;br /&gt;
| 0x0A || Hide Talk Bubble Pointer || Hides the little triangle that indicates the position of the speaker&lt;br /&gt;
|-&lt;br /&gt;
| 0x0B || Show Talk Bubble Pointer || Shows the little triangle that indicates the position of the speaker&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== ENTRY Node Format ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt16 || Unused&lt;br /&gt;
|-&lt;br /&gt;
| 0x02 || UInt16 || Next Flow Node ID&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt16 || Unused&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || UInt16 || Unused&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || UInt16 || Unused&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== FEN1 ==&lt;br /&gt;
&lt;br /&gt;
=== Header ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || &#039;&#039;FEN1&#039;&#039; in ASCII.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt32 || Section size. Does not account for this header or padding.&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Byte[0x8] || Padding.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Data ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt32 || Entry Count&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || Byte[0x8] || Padding&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || UInt32[Entry Count] || Data Offsets. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
After the data is written, there is a collection of Message Label Strings. After each string is padding to the nearest 0x04.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; &lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || byte || String Length&lt;br /&gt;
|-&lt;br /&gt;
| 0x01 || String[String Length] || Text&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=Cameras&amp;diff=128</id>
		<title>Cameras</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=Cameras&amp;diff=128"/>
		<updated>2024-01-31T01:18:20Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: /* Contexts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Files]]&lt;br /&gt;
[[Category:Lists]]&lt;br /&gt;
{{WIP}}&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;Galaxy&#039;&#039; games use cameras to create a good view of the game&#039;s 3D scene. There are many different types to fulfill this purpose, all of which are detailed on this page. Each stage (galaxies, zones, ...) comes with a file that specifies all the camera setups to be used. The format of these files is specified [[#BCAM Format|below]].&lt;br /&gt;
&lt;br /&gt;
==Contexts==&lt;br /&gt;
Cameras are used in a lot of different contexts and may be triggered through various means, including:&lt;br /&gt;
* Camera areas (&#039;&#039;CameraArea&#039;&#039;, &#039;&#039;CubeCameraBox&#039;&#039;, etc.) once they are entered. More information [[#Cube|below]].&lt;br /&gt;
* Spawn points (&#039;&#039;Mario&#039;&#039; entries in a zone&#039;s &#039;&#039;StartInfo&#039;&#039; file) once the player respawns there. More information [[#Start|below]].&lt;br /&gt;
* Warp Pipes once they are being exited.&lt;br /&gt;
* When the player rides Launch Stars, Sling Stars, Vines and more.&lt;br /&gt;
* When the player swims underwater or on the water&#039;s surface.&lt;br /&gt;
* When the player uses the Flying Power-Up.&lt;br /&gt;
* While talking to an NPC.&lt;br /&gt;
* Various objects and enemies use special cameras, such as &#039;&#039;SimpleDemoExecutor&#039;&#039;, &#039;&#039;JumpBeamer&#039;&#039;, &#039;&#039;Poihana&#039;&#039; and &#039;&#039;BegomanSpring&#039;&#039;.&lt;br /&gt;
* Cutscenes use various cameras to change the view.&lt;br /&gt;
&lt;br /&gt;
==BCAM Format==&lt;br /&gt;
All camera parameters for a zone (and some objects) are stored in a special [[BCSV (File format)|BCSV]] file called &#039;&#039;CameraParam.bcam&#039;&#039;. For zones, the file is located in &#039;&#039;Stage/camera&#039;&#039; of a &#039;&#039;Map&#039;&#039; archive. Not all files will contain all known camera fields in order to save some space. These optional fields are only added when a camera wants to use a value other than the default one. The following table lists all fields, their default values, data type, camera type exclusivity, and whether they are always required or not.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field !! Type !! Default value !! Exclusivity !! Required?&lt;br /&gt;
|-&lt;br /&gt;
| version||LONG||196630 (SMG1)&amp;lt;br&amp;gt;196631 (SMG2)|| ||✓&lt;br /&gt;
|-&lt;br /&gt;
| camtype||STRING_OFFSET||&#039;&#039;(empty string)&#039;&#039;|| ||✓&lt;br /&gt;
|-&lt;br /&gt;
| id||STRING_OFFSET||&#039;&#039;(empty string)&#039;&#039;|| ||✓&lt;br /&gt;
|-&lt;br /&gt;
| angleB||FLOAT||0.3|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| angleA||FLOAT||1200.0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| dist||FLOAT||0.0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| vpanaxis.X||FLOAT||0.0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| vpanaxis.Y||FLOAT||1.0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| vpanaxis.Z||FLOAT||0.0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| vpanuse||LONG||1|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| udown||LONG||120|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| pushdelaylow||LONG||120|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| pushdelay||LONG||120|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| lplay||FLOAT||800.0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| uplay||FLOAT||300.0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| gndint||LONG||160|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| lower||FLOAT||0.1|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| upper||FLOAT||0.3|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| camint||LONG||120|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| fovy||FLOAT||45.0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| roll||FLOAT||0.0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| loffsetv||FLOAT||0.0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| loffset||FLOAT||0.0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| woffset.X||FLOAT||0.0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| woffset.Y||FLOAT||100.0 (SMG1)&amp;lt;br&amp;gt;0.0 (SMG2)|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| woffset.Z||FLOAT||0.0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| num1||LONG||0 (SMG1)&amp;lt;br&amp;gt;1 (SMG2)|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| num2||LONG||0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| string||STRING_OFFSET||&#039;&#039;(empty string)&#039;&#039;|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| axis.X||FLOAT||0.0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| axis.Y||FLOAT||1.0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| axis.Z||FLOAT||0.0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| up.X||FLOAT||0.0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| up.Y||FLOAT||0.0 (SMG1)&amp;lt;br&amp;gt;1.0 (SMG2)|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| up.Z||FLOAT||0.0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| wpoint.X||FLOAT||0.0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| wpoint.Y||FLOAT||0.0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| wpoint.Z||FLOAT||0.0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| flag.noreset||LONG||0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| flag.nofovy||LONG||0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| flag.lofserpoff||LONG||0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| flag.antibluroff||LONG||0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| flag.collisionoff||LONG||0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| flag.subjectiveoff||LONG||0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| gflag.thru||LONG||0||&#039;&#039;&#039;c:&#039;&#039;&#039;&amp;lt;br/&amp;gt;&#039;&#039;&#039;g:&#039;&#039;&#039;&amp;lt;br/&amp;gt;&#039;&#039;&#039;s:&#039;&#039;&#039;||✗&lt;br /&gt;
|-&lt;br /&gt;
| gflag.enableEndErpFrame||LONG||0||&#039;&#039;&#039;c:&#039;&#039;&#039;&amp;lt;br/&amp;gt;&#039;&#039;&#039;g:&#039;&#039;&#039;&amp;lt;br/&amp;gt;&#039;&#039;&#039;s:&#039;&#039;&#039;||✗&lt;br /&gt;
|-&lt;br /&gt;
| gflag.camendint||LONG||0||&#039;&#039;&#039;c:&#039;&#039;&#039;&amp;lt;br/&amp;gt;&#039;&#039;&#039;g:&#039;&#039;&#039;&amp;lt;br/&amp;gt;&#039;&#039;&#039;s:&#039;&#039;&#039;||✗&lt;br /&gt;
|-&lt;br /&gt;
| eflag.enableErpFrame||LONG||0||&#039;&#039;&#039;e:&#039;&#039;&#039;||✗&lt;br /&gt;
|-&lt;br /&gt;
| eflag.enableEndErpFrame||LONG||0||&#039;&#039;&#039;e:&#039;&#039;&#039;||✗&lt;br /&gt;
|-&lt;br /&gt;
| camendint||LONG||0||&#039;&#039;&#039;e:&#039;&#039;&#039;||✗&lt;br /&gt;
|-&lt;br /&gt;
| evfrm||LONG||0||&#039;&#039;&#039;e:&#039;&#039;&#039;||✗&lt;br /&gt;
|-&lt;br /&gt;
| evpriority||LONG||1||&#039;&#039;&#039;e:&#039;&#039;&#039;||✗&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Camera ID Names==&lt;br /&gt;
The &#039;&#039;id&#039;&#039; field of a camera parameter entry is a special ID name that specifies the camera&#039;s usage context. Every entry should have a unique ID name. The camera ID is categorized into five different categories which are described below.&lt;br /&gt;
&lt;br /&gt;
===Cube===&lt;br /&gt;
Cube cameras are cameras which are referenced from a camera area (&#039;&#039;CameraArea&#039;&#039; in Super Mario Galaxy 2, &#039;&#039;CubeCamera&#039;&#039;, &#039;&#039;CubeCameraBox&#039;&#039; etc in Super Mario Galaxy). When the player is inside a camera area, it activate the referenced camera. If multiple camera areas interesect, the area with the highest priority (&#039;&#039;Obj_arg2&#039;&#039;) will be selected. The camera area&#039;s &#039;&#039;Obj_arg0&#039;&#039; value specifies the ID number of the camera to be used. Using this value, the game generates an identifier string using the [https://en.wikipedia.org/wiki/Printf_format_string printf format string] &#039;&#039;&#039;c:%04x&#039;&#039;&#039;. For example, if your camera area has an &#039;&#039;Obj_arg0&#039;&#039; of 15, the corresponding camera ID name would be &#039;&#039;c:000f&#039;&#039;. Note that the hexadecimal digits must be lowercase.&lt;br /&gt;
&lt;br /&gt;
===Start===&lt;br /&gt;
Start cameras are used when a camera is referenced from a start point. Every player spawn point (&#039;&#039;Mario&#039;&#039; entries in a zone&#039;s &#039;&#039;StartInfo&#039;&#039;) can activate a camera once the player respawns there. Just like camera areas, the game constructs an identifier string from the spawn point&#039;s &#039;&#039;CameraSetId&#039;&#039; which will be used to locate the parameters for the camera. The [https://en.wikipedia.org/wiki/Printf_format_string printf format string] is &#039;&#039;&#039;s:%04x&#039;&#039;&#039;. For example, if your &#039;&#039;Mario&#039;&#039; entry has a &#039;&#039;CameraSetId&#039;&#039; of 60, the corresponding camera ID name would be &#039;&#039;s:003c&#039;&#039;. The hexadecimal digits must be lowercase. If the &#039;&#039;CameraSetId&#039;&#039; is negative, no camera will be used.&lt;br /&gt;
&lt;br /&gt;
===Event===&lt;br /&gt;
Event cameras are cameras which are used for different events. One example of an event camera is Mario&#039;s intro flying, which is shown when entering all galaxies. Event cameras have the format &amp;quot;e:S:XXX:YYY&amp;quot; where S is the event name, XXX is the camera set ID in lowercase hex and YY is the event index, also in lowercase hex. Most event consists of multiple cameras, which is what YY is used for. For example, the camera for the second Mario&#039;s intro flying, with the camera set ID 5 would be &amp;quot;e:シナリオスターター:005:01番目&amp;quot;. The following table shows known event cameras:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ID !! Description&lt;br /&gt;
|-&lt;br /&gt;
| e:シナリオスターター:XXX:YY番目 || Scenario start camera YY.&lt;br /&gt;
|-&lt;br /&gt;
| e:スーパースピンドライバー:XXX:YY番目 || Super spin driver camera YY. Camera 00 is used when Mario enters the launch star, and 01 and up are used for when Mario is flying.&lt;br /&gt;
|-&lt;br /&gt;
| e:スーパースピンドライバー固有出現イベント用XXX || Super spin driver appearance event camera for camera set ID XXX.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Group===&lt;br /&gt;
Group cameras have unknown usage, but has the format &amp;quot;g:S&amp;quot; where S is the group name.&lt;br /&gt;
&lt;br /&gt;
===Other===&lt;br /&gt;
Other cameras are used for various cameras which does not belong to any of the previously described categories. The ID follows the format &amp;quot;o:S&amp;quot; where S is the name. The following table shows known other cameras:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ID !! Description&lt;br /&gt;
|-&lt;br /&gt;
| o:デフォルトカメラ || Default camera to be used if no other camera is active or available.&lt;br /&gt;
|-&lt;br /&gt;
| o:デフォルト水中カメラ || Default camera to be used when the player is swimming underwater.&lt;br /&gt;
|-&lt;br /&gt;
| o:デフォルト水面カメラ || Default camera to be used when the player is swimming on water surface.&lt;br /&gt;
|-&lt;br /&gt;
| o:デフォルトフーファイターカメラ || Camera to be used when the player is using the Flying Power-Up.&lt;br /&gt;
|-&lt;br /&gt;
| o:ズームカメラ || The first person&#039;s view camera.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Camera Classes==&lt;br /&gt;
There are &#039;&#039;many&#039;&#039; fine-tuned camera classes to choose from. The &#039;&#039;camtype&#039;&#039; field of a camera entry specifies what class to use. The available classes in the &#039;&#039;Galaxy&#039;&#039; games are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Identifier !! Japanese Name !! Class Name !! Used in SMG1? !! Used in SMG2? !! Description !! Parameters&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_XZ_PARA||並行||CameraParallel||✓||✓|| This camera moves parallel to Mario&#039;s position using fixed angles and distance.&lt;br /&gt;
||&lt;br /&gt;
* &#039;&#039;&#039;dist&#039;&#039;&#039;: Distance from Mario&#039;s position.&lt;br /&gt;
* &#039;&#039;&#039;angleB&#039;&#039;&#039;: Horizontal angle in radians.&lt;br /&gt;
* &#039;&#039;&#039;angleA&#039;&#039;&#039;: Vertical angle in radians.&lt;br /&gt;
* &#039;&#039;&#039;num1&#039;&#039;&#039;: Enables resetting and rounding if non-zero.&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_WONDER_PLANET||プラネット||CameraWonderPlanet||✓||✓|| &lt;br /&gt;
||&lt;br /&gt;
* angleA&lt;br /&gt;
* axis.X&lt;br /&gt;
* axis.Y&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_TOWER||塔||CameraTower||✓||✓|| This camera is focused at a set coordinate and rotates around this point based on Mario&#039;s position.&lt;br /&gt;
||&lt;br /&gt;
* &#039;&#039;&#039;dist&#039;&#039;&#039;: Distance from fixpoint position.&lt;br /&gt;
* &#039;&#039;&#039;angleA&#039;&#039;&#039;: Vertical angle in radians.&lt;br /&gt;
* &#039;&#039;&#039;angleB&#039;&#039;&#039;: Size of the radius area at which the camera stops rotating. The higher the more restricted.&lt;br /&gt;
* &#039;&#039;&#039;wpoint&#039;&#039;&#039;: Fixed point coordinate&lt;br /&gt;
* &#039;&#039;&#039;axis&#039;&#039;&#039;:Which Axis to use for rotating&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_TOWER_POS||塔（サブターゲット付き）||CameraTowerPos||✓||✓|| &lt;br /&gt;
||&lt;br /&gt;
* angleB&lt;br /&gt;
* angleA&lt;br /&gt;
* up.X&lt;br /&gt;
* up.Y&lt;br /&gt;
* wpoint&lt;br /&gt;
* axis&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_INWARD_TOWER||塔内部||CameraInwardTower||✓||✗|| &lt;br /&gt;
||&lt;br /&gt;
* axis&lt;br /&gt;
* angleB&lt;br /&gt;
* angleA&lt;br /&gt;
* dist&lt;br /&gt;
* wpoint&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_INWARD_SPHERE||球内部||CameraInwardSphere||✓||✗|| &lt;br /&gt;
||&lt;br /&gt;
* angleA&lt;br /&gt;
* angleB&lt;br /&gt;
* dist&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_POINT_FIX||完全固定||CameraFix||✓||✓|| &lt;br /&gt;
||&lt;br /&gt;
* dist&lt;br /&gt;
* axis.X&lt;br /&gt;
* axis.Y&lt;br /&gt;
* wpoint&lt;br /&gt;
* up&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_EYEPOS_FIX||定点||CameraFixedPoint||✓||✓|| Fixed camera which looks at Mario.&lt;br /&gt;
||&lt;br /&gt;
* &#039;&#039;&#039;wpoint&#039;&#039;&#039;: Position of the camera.&lt;br /&gt;
* num1&lt;br /&gt;
* &#039;&#039;&#039;roll&#039;&#039;&#039;: Z rotation in radians.&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_EYEPOS_FIX_THERE||その場定点||CameraFixedThere||✓||✓|| Stops the camera in the position of the last camera used and focuses on Mario. Mostly used for the landing sequence of flying stars.&lt;br /&gt;
||&lt;br /&gt;
* num2&lt;br /&gt;
* num1&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_TRUNDLE||トランドル||CameraTrundle||✓||✓|| &lt;br /&gt;
||&lt;br /&gt;
* up.X&lt;br /&gt;
* angleA&lt;br /&gt;
* angleB&lt;br /&gt;
* dist&lt;br /&gt;
* wpoint&lt;br /&gt;
* axis&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_SPHERE_TRUNDLE||球トランドル||CameraSphereTrundle||n/a||✓|| &lt;br /&gt;
|| ?&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_INNER_CYLINDER||円筒内部||CameraInnerCylinder||✓||✗|| &lt;br /&gt;
||&lt;br /&gt;
* axis&lt;br /&gt;
* angleA&lt;br /&gt;
* angleB&lt;br /&gt;
* dist&lt;br /&gt;
* up.X&lt;br /&gt;
* wpoint&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_CUBE_PLANET||キューブ惑星||CameraCubePlanet||✓||✓|| Variant of camera type follow in which the camera rotates along based on Mario&#039;s current gravitational frame.&lt;br /&gt;
||&lt;br /&gt;
* dist&lt;br /&gt;
* angleA&lt;br /&gt;
* angleB&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_CHARMED_FIX||サンボ||CameraCharmedFix||✓||✓|| &lt;br /&gt;
||&lt;br /&gt;
* up&lt;br /&gt;
* axis&lt;br /&gt;
* wpoint&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_CHARMED_VECREG||ベクトルレジスタ注目||CameraCharmedVecReg||✓||✓|| &lt;br /&gt;
||&lt;br /&gt;
* angleA&lt;br /&gt;
* angleB&lt;br /&gt;
* axis&lt;br /&gt;
* dist&lt;br /&gt;
* string&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_CHARMED_VECREG_TOWER||VecReg角度補正塔カメラ||CameraCharmedVecRegTower||✓||✓|| &lt;br /&gt;
||&lt;br /&gt;
* axis&lt;br /&gt;
* dist&lt;br /&gt;
* angleA&lt;br /&gt;
* angleB&lt;br /&gt;
* string&lt;br /&gt;
* wpoint&lt;br /&gt;
* num1&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_MEDIAN_PLANET||中点注目プラネット||CameraMedianPlanet||✓||✓|| &lt;br /&gt;
||&lt;br /&gt;
* wpoint.X&lt;br /&gt;
* dist&lt;br /&gt;
* angleB&lt;br /&gt;
* angleA&lt;br /&gt;
* axis&lt;br /&gt;
* string&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_MEDIAN_TOWER||中点塔カメラ||CameraMedianTower||✓||✓|| &lt;br /&gt;
||&lt;br /&gt;
* string&lt;br /&gt;
* up&lt;br /&gt;
* angleA&lt;br /&gt;
* wpoint&lt;br /&gt;
* axis&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_FOLLOW||フォロー||CameraFollow||✓||✓|| &lt;br /&gt;
||&lt;br /&gt;
* axis.X&lt;br /&gt;
* axis.Y&lt;br /&gt;
* angleA&lt;br /&gt;
* angleB&lt;br /&gt;
* dist&lt;br /&gt;
* num1&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_RACE_FOLLOW||レース用フォロー||CameraRaceFollow||✓||✓|| &lt;br /&gt;
||&lt;br /&gt;
* angleA&lt;br /&gt;
* wpoint&lt;br /&gt;
* num1&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_WATER_FOLLOW||水中フォロー||CameraWaterFollow||✓||✓|| &lt;br /&gt;
||&lt;br /&gt;
* dist&lt;br /&gt;
* axis.Y&lt;br /&gt;
* axis.Y&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_WATER_PLANET||水中プラネット||CameraWaterPlanet||✓||✓|| &lt;br /&gt;
||&lt;br /&gt;
* angleA&lt;br /&gt;
* axis.X&lt;br /&gt;
* axis.Y&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_WATER_PLANET_BOSS||水中プラネットボス||CameraWaterPlanetBoss||✓||✗|| &lt;br /&gt;
||&lt;br /&gt;
* up&lt;br /&gt;
* num1&lt;br /&gt;
* wpoint&lt;br /&gt;
* axis&lt;br /&gt;
* dist&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_TRIPOD_PLANET||三脚惑星||CameraTripodPlanet||✓||✓|| &lt;br /&gt;
||&lt;br /&gt;
* up&lt;br /&gt;
* dist&lt;br /&gt;
* wpoint&lt;br /&gt;
* axis&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_TRIPOD_BOSS||三脚ボス||CameraTripodBoss||✗||n/a|| &lt;br /&gt;
||&lt;br /&gt;
* up&lt;br /&gt;
* dist&lt;br /&gt;
* axis&lt;br /&gt;
* wpoint&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_TRIPOD_BOSS_JOINT||三脚ボスジョイント||CameraTripodBossJoint||✓||n/a|| &lt;br /&gt;
||&lt;br /&gt;
* num1&lt;br /&gt;
* dist&lt;br /&gt;
* angleA&lt;br /&gt;
* angleB&lt;br /&gt;
* axis&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_CHARMED_TRIPOD_BOSS||三脚ボスジョイント注視||CameraCharmedTripodBoss||✓||n/a|| &lt;br /&gt;
||&lt;br /&gt;
* up&lt;br /&gt;
* axis.X&lt;br /&gt;
* axis.Y&lt;br /&gt;
* num1&lt;br /&gt;
* wpoint&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_FOO_FIGHTER||フーファイター||CameraFooFighter||✓||✗|| &lt;br /&gt;
||&lt;br /&gt;
* dist&lt;br /&gt;
* axis.X&lt;br /&gt;
* axis.Y&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_FOO_FIGHTER_PLANET||フーファイタープラネット||CameraFooFighterPlanet||✓||✗|| &lt;br /&gt;
||&lt;br /&gt;
* dist&lt;br /&gt;
* axis.X&lt;br /&gt;
* axis.Y&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_RAIL_WATCH||レール注目||CameraRailWatch||✓||✓|| &lt;br /&gt;
||&lt;br /&gt;
* num1&lt;br /&gt;
* num2&lt;br /&gt;
* axis.X&lt;br /&gt;
* dist&lt;br /&gt;
* angleA&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_RAIL_DEMO||レールデモ||CameraRailDemo||✗||✗|| &lt;br /&gt;
||&lt;br /&gt;
* num1&lt;br /&gt;
* num2&lt;br /&gt;
* dist&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_RAIL_FOLLOW||レールフォロー||CameraRailFollow||✓||✗|| &lt;br /&gt;
||&lt;br /&gt;
* num1&lt;br /&gt;
* num2&lt;br /&gt;
* dist&lt;br /&gt;
* wpoint.X&lt;br /&gt;
* wpoint.Y&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_OBJ_PARALLEL||オブジェ並行||CameraObjParallel||✓||✓|| &lt;br /&gt;
||&lt;br /&gt;
* dist&lt;br /&gt;
* &#039;&#039;&#039;angleA&#039;&#039;&#039;: Pitch in radians.&lt;br /&gt;
* angleB&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_MTXREG_PARALLEL||マトリクスレジスタ並行||CameraMtxRegParallel||✓||✓|| &lt;br /&gt;
||&lt;br /&gt;
* string&lt;br /&gt;
* angleA&lt;br /&gt;
* angleB&lt;br /&gt;
* dist&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_SLIDER||スライダー||CameraBehind||✗||✗|| &lt;br /&gt;
||&lt;br /&gt;
* angleA&lt;br /&gt;
* angleB&lt;br /&gt;
* dist&lt;br /&gt;
* axis.X&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_2D_SLIDE||２Ｄスライド||CameraSlide||✓||✓|| &lt;br /&gt;
||&lt;br /&gt;
* axis&lt;br /&gt;
* up&lt;br /&gt;
* dist&lt;br /&gt;
* angleA&lt;br /&gt;
* wpoint&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_GROUND||地面||CameraGround||✓||✗|| &lt;br /&gt;
||&lt;br /&gt;
* angleA&lt;br /&gt;
* angleB&lt;br /&gt;
* dist&lt;br /&gt;
* up&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_SPIRAL_DEMO||螺旋デモ||CameraSpiral||✓||✓|| &lt;br /&gt;
||&lt;br /&gt;
* num1&lt;br /&gt;
* num2&lt;br /&gt;
* axis&lt;br /&gt;
* wpoint&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_TWISTED_PASSAGE||ねじれ回廊||CameraTwistedPassage||✓||✗|| &lt;br /&gt;
||&lt;br /&gt;
* num1&lt;br /&gt;
* axis.X&lt;br /&gt;
* axis.Y&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_FRONT_AND_BACK||表裏カメラ||CameraFrontAndBack||✓||✓|| &lt;br /&gt;
||&lt;br /&gt;
* axis&lt;br /&gt;
* angleA&lt;br /&gt;
* angleB&lt;br /&gt;
* dist&lt;br /&gt;
* wpoint&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_FREEZE||その場完全固定||CameraFreeze||n/a||✓|| Stops and freezes the camera completely based on the last camera position and rotation.&lt;br /&gt;
|| ?&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_TALK||会話||CameraTalk||✗||✗|| &lt;br /&gt;
||&lt;br /&gt;
* wpoint&lt;br /&gt;
* up&lt;br /&gt;
* axis.X&lt;br /&gt;
* axis.Y&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_ANIM||アニメ||CameraAnim||✗||✗|| &lt;br /&gt;
||&lt;br /&gt;
* num1&lt;br /&gt;
* dist&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_DEAD||通常死亡||CameraDead||✗||✗|| &lt;br /&gt;
||&lt;br /&gt;
* num1&lt;br /&gt;
* num2&lt;br /&gt;
* dist&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_BLACK_HOLE||ブラックホール||CameraBlackHole||✗||✗|| &lt;br /&gt;
||&lt;br /&gt;
* axis&lt;br /&gt;
* wpoint&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_DPD||ＤＰＤ||CameraDPD||✗||✗|| &lt;br /&gt;
||&lt;br /&gt;
* num2&lt;br /&gt;
* up.X&lt;br /&gt;
* wpoint&lt;br /&gt;
* angleA&lt;br /&gt;
* angleB&lt;br /&gt;
* dist&lt;br /&gt;
* num1&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_SUBJECTIVE||主観||CameraSubjective||✗||✗||  ||n/a&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Aliases===&lt;br /&gt;
Likely for the purpose of preserving compatibility with test camera files, the developers added aliases for some camera classes. These exist in both &#039;&#039;Galaxy&#039;&#039; games. However, these aliases only apply if the camera version is greater or equal to the required version. Interestingly, it also contains an alias for &#039;&#039;CAM_TYPE_BOSS_DONKETSU&#039;&#039;, a camera class that has been removed from the actual game.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Alias Name !! Actual Name !! Required Version&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_DONKETSU_TEST || CAM_TYPE_BOSS_DONKETSU || 196612&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_BEHIND_DEBUG || CAM_TYPE_SLIDER || 196614&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_INWARD_TOWER_TEST || CAM_TYPE_INWARD_TOWER || 196614&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_EYE_FIXED_THERE_TEST || CAM_TYPE_EYEPOS_FIX_THERE || 196614&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_ICECUBE_PLANET || CAM_TYPE_CUBE_PLANET || 196617&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Common Properties==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Property !! Description&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | General&lt;br /&gt;
|-&lt;br /&gt;
| version || Camera engine version. Usually 196630 in &#039;&#039;Super Mario Galaxy 1&#039;&#039; and 196631 in &#039;&#039;Super Mario Galaxy 2&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| camtype || Class identifier name. See the tables above for possible values.&lt;br /&gt;
|-&lt;br /&gt;
| id || The camera&#039;s identifier name. See the [[#Camera ID Names|respective section]] for more details.&lt;br /&gt;
|-&lt;br /&gt;
| woffset.X&amp;lt;br&amp;gt;woffset.Y&amp;lt;br&amp;gt;woffset.Z ||A constant offset from the target relative to the Zone the camera belongs to.&lt;br /&gt;
|-&lt;br /&gt;
| loffset ||An offset from the target&#039;s forward vector. Higher values move the camera further in front of the target and lower values move it behind the target.&lt;br /&gt;
|-&lt;br /&gt;
| loffsetv ||An offset from the target&#039;s upward vector. Higher values move the camera further above the target and lower values move it below the target.&lt;br /&gt;
|-&lt;br /&gt;
| roll ||Rotates the camera. 180 will flip the camera upside down&lt;br /&gt;
|-&lt;br /&gt;
| fovy || The [https://en.wikipedia.org/wiki/Field_of_view field of view] angle in degrees. Huge numbers cause visual issues, so it&#039;s best to keep this between 0 and 179.9&lt;br /&gt;
|-&lt;br /&gt;
| camint || The amount of time in frames it takes for the camera to get into it&#039;s active position&lt;br /&gt;
|-&lt;br /&gt;
| upper || Upper screen bound relative to the center of the screen&lt;br /&gt;
|-&lt;br /&gt;
| lower || Lower screen bound relative to the cetner of the screen&lt;br /&gt;
|-&lt;br /&gt;
| gndint || &lt;br /&gt;
|-&lt;br /&gt;
| uplay || How high in the world the target needs to go before the camera physically starts moving upwards&lt;br /&gt;
|-&lt;br /&gt;
| lplay || How low in the world the target needs to go before the camera physically starts moving downwards&lt;br /&gt;
|-&lt;br /&gt;
| pushdelay || The activation time in frames for when the Upper bound activates&lt;br /&gt;
|-&lt;br /&gt;
| pushdelaylow || The activation time in frames for when the Lower bound activates&lt;br /&gt;
|-&lt;br /&gt;
| udown || &lt;br /&gt;
|-&lt;br /&gt;
| vpanuse || Enables the use of the Camera Height Arrangement&lt;br /&gt;
|-&lt;br /&gt;
| vpanaxis.X&amp;lt;br&amp;gt;vpanaxis.Y&amp;lt;br&amp;gt;vpanaxis.Z || &lt;br /&gt;
|-&lt;br /&gt;
| flag.noreset || &lt;br /&gt;
|-&lt;br /&gt;
| flag.nofovy || If enabled, the FoV can be changed&lt;br /&gt;
|-&lt;br /&gt;
| flag.lofserpoff || If enabled, the loffset and loffsetv will not interpolate into position and snap to where it needs to be.&lt;br /&gt;
|-&lt;br /&gt;
| flag.antibluroff || If enabled, rotating the camera will be not be smooth&lt;br /&gt;
|-&lt;br /&gt;
| flag.collisionoff || Disables collision with map geometry if enabled. This means that the camera will move through collision if necessary.&lt;br /&gt;
|-&lt;br /&gt;
| flag.subjectiveoff || Disables the first-person camera if enabled.&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | &#039;&#039;Game&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| gflag.thru || &lt;br /&gt;
|-&lt;br /&gt;
| gflag.enableEndErpFrame || If enabled, a &amp;quot;Camera deactivation time&amp;quot; (gflag.camendint) will be enabled, and deactivating this camera will have this time be used instead of the new camera&#039;s time&lt;br /&gt;
|-&lt;br /&gt;
| gflag.camendint || Determines the time in frames that this camera will need to deactivate&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | &#039;&#039;Event&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| eflag.enableErpFrame || &lt;br /&gt;
|-&lt;br /&gt;
| eflag.enableEndErpFrame || &lt;br /&gt;
|-&lt;br /&gt;
| camendint || &lt;br /&gt;
|-&lt;br /&gt;
| evfrm || The time in frames that this event camera is active for&lt;br /&gt;
|-&lt;br /&gt;
| evpriority || Always 1.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Trivia==&lt;br /&gt;
* The oldest available camera version is 196617 and can be found in &#039;&#039;HellLavaFloatingZone&#039;&#039;.&lt;br /&gt;
* The function &#039;&#039;CameraParamChunk::load&#039;&#039; references a removed camera class labeled as &#039;&#039;CAM_TYPE_PLANET&#039;&#039;.&lt;br /&gt;
* Intro cameras dynamically create a &#039;&#039;CAM_TYPE_ANIM&#039;&#039; camera with the ID &#039;&#039;o:スタートアニメカメラ&#039;&#039;. It is not possible to overwrite this in a BCAM file.&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=UseResource&amp;diff=127</id>
		<title>UseResource</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=UseResource&amp;diff=127"/>
		<updated>2024-01-27T17:14:28Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: Added basic information on UseResource&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Files]]&lt;br /&gt;
{{WIP}}&lt;br /&gt;
&lt;br /&gt;
This page only applies to &#039;&#039;Super Mario Galaxy 2&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
UseResource is an archive that only the main galaxy can have. It provides the game with a list of items from the disc that will be loaded into memory asynchronously, which makes loading faster.&lt;br /&gt;
&lt;br /&gt;
It is important to note that if a file that is inside UseResource doesn&#039;t exist, the game will hang while loading the scene.&lt;br /&gt;
&lt;br /&gt;
== Naming Convention ==&lt;br /&gt;
These UseResource files use the following naming convention:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Scenario Target !! Filename !! Examples&lt;br /&gt;
|-&lt;br /&gt;
| All Scenarios || common || common.bcsv, sound_common.bcsv&lt;br /&gt;
|-&lt;br /&gt;
| Scenario X || scenario_X || scenario_1.bcsv, sound_scenario_3.bcsv&amp;lt;br/&amp;gt;(basically just replace the &amp;quot;X&amp;quot; with the scenario number)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== File Lists ==&lt;br /&gt;
=== Standard Files ===&lt;br /&gt;
A UseResource BCSV to load files into memory.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| ResourceName || STRING || Put the game disc path to a file that you want to load here.&amp;lt;br/&amp;gt;Example: &#039;&#039;&#039;/ObjectData/Kuribo.arc&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
=== Sounds ===&lt;br /&gt;
A UseResource BCSV to load sounds by name into memory. Be aware that there is an unknown maximum to how many sounds that can be loaded at once.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| SoundName || STRING || Put the name of the sfx you want to load here.&amp;lt;br/&amp;gt;Example: &#039;&#039;&#039;SE_PM_SPIN_ATTACK&#039;&#039;&#039;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Unused Files ==&lt;br /&gt;
Inside a UseResource are files named &amp;quot;wave_arc_&amp;lt;Scenario&amp;gt;.bcsv&amp;quot;. These are not used by the game for anything, and can be deleted freely. It is assumed that they used to load specific .aw files during development.&amp;lt;br/&amp;gt;For completeness, the BCSV is documented below.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field !! Type&lt;br /&gt;
|-&lt;br /&gt;
| WaveArcName|| STRING&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
	<entry>
		<id>https://www.lumasworkshop.com/w/index.php?title=Cameras&amp;diff=126</id>
		<title>Cameras</title>
		<link rel="alternate" type="text/html" href="https://www.lumasworkshop.com/w/index.php?title=Cameras&amp;diff=126"/>
		<updated>2024-01-27T03:41:47Z</updated>

		<summary type="html">&lt;p&gt;Super Hackio: /* Common Properties */ Add descriptions for most properties&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Files]]&lt;br /&gt;
[[Category:Lists]]&lt;br /&gt;
{{WIP}}&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;Galaxy&#039;&#039; games use cameras to create a good view of the game&#039;s 3D scene. There are many different types to fulfill this purpose, all of which are detailed on this page. Each stage (galaxies, zones, ...) comes with a file that specifies all the camera setups to be used. The format of these files is specified [[#BCAM Format|below]].&lt;br /&gt;
&lt;br /&gt;
==Contexts==&lt;br /&gt;
Cameras are used in a lot of different contexts and may be triggered through various means, including:&lt;br /&gt;
* Camera areas (&#039;&#039;CameraArea&#039;&#039;, &#039;&#039;CubeCameraBox&#039;&#039;, etc.) once they are entered. More information [[#Cube|below]].&lt;br /&gt;
* Spawn points (&#039;&#039;Mario&#039;&#039; entries in a zone&#039;s &#039;&#039;StartInfo&#039;&#039; file) once the player respawns there. More information [[#Start|below]].&lt;br /&gt;
* Warp Pipes once they are entered or left.&lt;br /&gt;
* When the player rides Launch Stars or Sling Stars.&lt;br /&gt;
* When the player swims underwater or on the water&#039;s surface.&lt;br /&gt;
* When the player uses the Flying Power-Up.&lt;br /&gt;
* While talking to an NPC.&lt;br /&gt;
* Various objects and enemies use special cameras, such as &#039;&#039;SimpleDemoExecutor&#039;&#039;, &#039;&#039;JumpBeamer&#039;&#039;, &#039;&#039;Poihana&#039;&#039; and &#039;&#039;BegomanSpring&#039;&#039;.&lt;br /&gt;
* Cutscenes use various cameras to change the view.&lt;br /&gt;
&lt;br /&gt;
==BCAM Format==&lt;br /&gt;
All camera parameters for a zone (and some objects) are stored in a special [[BCSV (File format)|BCSV]] file called &#039;&#039;CameraParam.bcam&#039;&#039;. For zones, the file is located in &#039;&#039;Stage/camera&#039;&#039; of a &#039;&#039;Map&#039;&#039; archive. Not all files will contain all known camera fields in order to save some space. These optional fields are only added when a camera wants to use a value other than the default one. The following table lists all fields, their default values, data type, camera type exclusivity, and whether they are always required or not.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Field !! Type !! Default value !! Exclusivity !! Required?&lt;br /&gt;
|-&lt;br /&gt;
| version||LONG||196630 (SMG1)&amp;lt;br&amp;gt;196631 (SMG2)|| ||✓&lt;br /&gt;
|-&lt;br /&gt;
| camtype||STRING_OFFSET||&#039;&#039;(empty string)&#039;&#039;|| ||✓&lt;br /&gt;
|-&lt;br /&gt;
| id||STRING_OFFSET||&#039;&#039;(empty string)&#039;&#039;|| ||✓&lt;br /&gt;
|-&lt;br /&gt;
| angleB||FLOAT||0.3|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| angleA||FLOAT||1200.0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| dist||FLOAT||0.0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| vpanaxis.X||FLOAT||0.0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| vpanaxis.Y||FLOAT||1.0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| vpanaxis.Z||FLOAT||0.0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| vpanuse||LONG||1|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| udown||LONG||120|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| pushdelaylow||LONG||120|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| pushdelay||LONG||120|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| lplay||FLOAT||800.0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| uplay||FLOAT||300.0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| gndint||LONG||160|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| lower||FLOAT||0.1|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| upper||FLOAT||0.3|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| camint||LONG||120|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| fovy||FLOAT||45.0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| roll||FLOAT||0.0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| loffsetv||FLOAT||0.0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| loffset||FLOAT||0.0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| woffset.X||FLOAT||0.0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| woffset.Y||FLOAT||100.0 (SMG1)&amp;lt;br&amp;gt;0.0 (SMG2)|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| woffset.Z||FLOAT||0.0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| num1||LONG||0 (SMG1)&amp;lt;br&amp;gt;1 (SMG2)|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| num2||LONG||0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| string||STRING_OFFSET||&#039;&#039;(empty string)&#039;&#039;|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| axis.X||FLOAT||0.0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| axis.Y||FLOAT||1.0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| axis.Z||FLOAT||0.0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| up.X||FLOAT||0.0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| up.Y||FLOAT||0.0 (SMG1)&amp;lt;br&amp;gt;1.0 (SMG2)|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| up.Z||FLOAT||0.0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| wpoint.X||FLOAT||0.0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| wpoint.Y||FLOAT||0.0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| wpoint.Z||FLOAT||0.0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| flag.noreset||LONG||0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| flag.nofovy||LONG||0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| flag.lofserpoff||LONG||0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| flag.antibluroff||LONG||0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| flag.collisionoff||LONG||0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| flag.subjectiveoff||LONG||0|| ||✗&lt;br /&gt;
|-&lt;br /&gt;
| gflag.thru||LONG||0||&#039;&#039;&#039;c:&#039;&#039;&#039;&amp;lt;br/&amp;gt;&#039;&#039;&#039;g:&#039;&#039;&#039;&amp;lt;br/&amp;gt;&#039;&#039;&#039;s:&#039;&#039;&#039;||✗&lt;br /&gt;
|-&lt;br /&gt;
| gflag.enableEndErpFrame||LONG||0||&#039;&#039;&#039;c:&#039;&#039;&#039;&amp;lt;br/&amp;gt;&#039;&#039;&#039;g:&#039;&#039;&#039;&amp;lt;br/&amp;gt;&#039;&#039;&#039;s:&#039;&#039;&#039;||✗&lt;br /&gt;
|-&lt;br /&gt;
| gflag.camendint||LONG||0||&#039;&#039;&#039;c:&#039;&#039;&#039;&amp;lt;br/&amp;gt;&#039;&#039;&#039;g:&#039;&#039;&#039;&amp;lt;br/&amp;gt;&#039;&#039;&#039;s:&#039;&#039;&#039;||✗&lt;br /&gt;
|-&lt;br /&gt;
| eflag.enableErpFrame||LONG||0||&#039;&#039;&#039;e:&#039;&#039;&#039;||✗&lt;br /&gt;
|-&lt;br /&gt;
| eflag.enableEndErpFrame||LONG||0||&#039;&#039;&#039;e:&#039;&#039;&#039;||✗&lt;br /&gt;
|-&lt;br /&gt;
| camendint||LONG||0||&#039;&#039;&#039;e:&#039;&#039;&#039;||✗&lt;br /&gt;
|-&lt;br /&gt;
| evfrm||LONG||0||&#039;&#039;&#039;e:&#039;&#039;&#039;||✗&lt;br /&gt;
|-&lt;br /&gt;
| evpriority||LONG||1||&#039;&#039;&#039;e:&#039;&#039;&#039;||✗&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Camera ID Names==&lt;br /&gt;
The &#039;&#039;id&#039;&#039; field of a camera parameter entry is a special ID name that specifies the camera&#039;s usage context. Every entry should have a unique ID name. The camera ID is categorized into five different categories which are described below.&lt;br /&gt;
&lt;br /&gt;
===Cube===&lt;br /&gt;
Cube cameras are cameras which are referenced from a camera area (&#039;&#039;CameraArea&#039;&#039; in Super Mario Galaxy 2, &#039;&#039;CubeCamera&#039;&#039;, &#039;&#039;CubeCameraBox&#039;&#039; etc in Super Mario Galaxy). When the player is inside a camera area, it activate the referenced camera. If multiple camera areas interesect, the area with the highest priority (&#039;&#039;Obj_arg2&#039;&#039;) will be selected. The camera area&#039;s &#039;&#039;Obj_arg0&#039;&#039; value specifies the ID number of the camera to be used. Using this value, the game generates an identifier string using the [https://en.wikipedia.org/wiki/Printf_format_string printf format string] &#039;&#039;&#039;c:%04x&#039;&#039;&#039;. For example, if your camera area has an &#039;&#039;Obj_arg0&#039;&#039; of 15, the corresponding camera ID name would be &#039;&#039;c:000f&#039;&#039;. Note that the hexadecimal digits must be lowercase.&lt;br /&gt;
&lt;br /&gt;
===Start===&lt;br /&gt;
Start cameras are used when a camera is referenced from a start point. Every player spawn point (&#039;&#039;Mario&#039;&#039; entries in a zone&#039;s &#039;&#039;StartInfo&#039;&#039;) can activate a camera once the player respawns there. Just like camera areas, the game constructs an identifier string from the spawn point&#039;s &#039;&#039;CameraSetId&#039;&#039; which will be used to locate the parameters for the camera. The [https://en.wikipedia.org/wiki/Printf_format_string printf format string] is &#039;&#039;&#039;s:%04x&#039;&#039;&#039;. For example, if your &#039;&#039;Mario&#039;&#039; entry has a &#039;&#039;CameraSetId&#039;&#039; of 60, the corresponding camera ID name would be &#039;&#039;s:003c&#039;&#039;. The hexadecimal digits must be lowercase. If the &#039;&#039;CameraSetId&#039;&#039; is negative, no camera will be used.&lt;br /&gt;
&lt;br /&gt;
===Event===&lt;br /&gt;
Event cameras are cameras which are used for different events. One example of an event camera is Mario&#039;s intro flying, which is shown when entering all galaxies. Event cameras have the format &amp;quot;e:S:XXX:YYY&amp;quot; where S is the event name, XXX is the camera set ID in lowercase hex and YY is the event index, also in lowercase hex. Most event consists of multiple cameras, which is what YY is used for. For example, the camera for the second Mario&#039;s intro flying, with the camera set ID 5 would be &amp;quot;e:シナリオスターター:005:01番目&amp;quot;. The following table shows known event cameras:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ID !! Description&lt;br /&gt;
|-&lt;br /&gt;
| e:シナリオスターター:XXX:YY番目 || Scenario start camera YY.&lt;br /&gt;
|-&lt;br /&gt;
| e:スーパースピンドライバー:XXX:YY番目 || Super spin driver camera YY. Camera 00 is used when Mario enters the launch star, and 01 and up are used for when Mario is flying.&lt;br /&gt;
|-&lt;br /&gt;
| e:スーパースピンドライバー固有出現イベント用XXX || Super spin driver appearance event camera for camera set ID XXX.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Group===&lt;br /&gt;
Group cameras have unknown usage, but has the format &amp;quot;g:S&amp;quot; where S is the group name.&lt;br /&gt;
&lt;br /&gt;
===Other===&lt;br /&gt;
Other cameras are used for various cameras which does not belong to any of the previously described categories. The ID follows the format &amp;quot;o:S&amp;quot; where S is the name. The following table shows known other cameras:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ID !! Description&lt;br /&gt;
|-&lt;br /&gt;
| o:デフォルトカメラ || Default camera to be used if no other camera is active or available.&lt;br /&gt;
|-&lt;br /&gt;
| o:デフォルト水中カメラ || Default camera to be used when the player is swimming underwater.&lt;br /&gt;
|-&lt;br /&gt;
| o:デフォルト水面カメラ || Default camera to be used when the player is swimming on water surface.&lt;br /&gt;
|-&lt;br /&gt;
| o:デフォルトフーファイターカメラ || Camera to be used when the player is using the Flying Power-Up.&lt;br /&gt;
|-&lt;br /&gt;
| o:ズームカメラ || The first person&#039;s view camera.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Camera Classes==&lt;br /&gt;
There are &#039;&#039;many&#039;&#039; fine-tuned camera classes to choose from. The &#039;&#039;camtype&#039;&#039; field of a camera entry specifies what class to use. The available classes in the &#039;&#039;Galaxy&#039;&#039; games are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Identifier !! Japanese Name !! Class Name !! Used in SMG1? !! Used in SMG2? !! Description !! Parameters&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_XZ_PARA||並行||CameraParallel||✓||✓|| This camera moves parallel to Mario&#039;s position using fixed angles and distance.&lt;br /&gt;
||&lt;br /&gt;
* &#039;&#039;&#039;dist&#039;&#039;&#039;: Distance from Mario&#039;s position.&lt;br /&gt;
* &#039;&#039;&#039;angleB&#039;&#039;&#039;: Horizontal angle in radians.&lt;br /&gt;
* &#039;&#039;&#039;angleA&#039;&#039;&#039;: Vertical angle in radians.&lt;br /&gt;
* &#039;&#039;&#039;num1&#039;&#039;&#039;: Enables resetting and rounding if non-zero.&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_WONDER_PLANET||プラネット||CameraWonderPlanet||✓||✓|| &lt;br /&gt;
||&lt;br /&gt;
* angleA&lt;br /&gt;
* axis.X&lt;br /&gt;
* axis.Y&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_TOWER||塔||CameraTower||✓||✓|| This camera is focused at a set coordinate and rotates around this point based on Mario&#039;s position.&lt;br /&gt;
||&lt;br /&gt;
* &#039;&#039;&#039;dist&#039;&#039;&#039;: Distance from fixpoint position.&lt;br /&gt;
* &#039;&#039;&#039;angleA&#039;&#039;&#039;: Vertical angle in radians.&lt;br /&gt;
* &#039;&#039;&#039;angleB&#039;&#039;&#039;: Size of the radius area at which the camera stops rotating. The higher the more restricted.&lt;br /&gt;
* &#039;&#039;&#039;wpoint&#039;&#039;&#039;: Fixed point coordinate&lt;br /&gt;
* &#039;&#039;&#039;axis&#039;&#039;&#039;:Which Axis to use for rotating&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_TOWER_POS||塔（サブターゲット付き）||CameraTowerPos||✓||✓|| &lt;br /&gt;
||&lt;br /&gt;
* angleB&lt;br /&gt;
* angleA&lt;br /&gt;
* up.X&lt;br /&gt;
* up.Y&lt;br /&gt;
* wpoint&lt;br /&gt;
* axis&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_INWARD_TOWER||塔内部||CameraInwardTower||✓||✗|| &lt;br /&gt;
||&lt;br /&gt;
* axis&lt;br /&gt;
* angleB&lt;br /&gt;
* angleA&lt;br /&gt;
* dist&lt;br /&gt;
* wpoint&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_INWARD_SPHERE||球内部||CameraInwardSphere||✓||✗|| &lt;br /&gt;
||&lt;br /&gt;
* angleA&lt;br /&gt;
* angleB&lt;br /&gt;
* dist&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_POINT_FIX||完全固定||CameraFix||✓||✓|| &lt;br /&gt;
||&lt;br /&gt;
* dist&lt;br /&gt;
* axis.X&lt;br /&gt;
* axis.Y&lt;br /&gt;
* wpoint&lt;br /&gt;
* up&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_EYEPOS_FIX||定点||CameraFixedPoint||✓||✓|| Fixed camera which looks at Mario.&lt;br /&gt;
||&lt;br /&gt;
* &#039;&#039;&#039;wpoint&#039;&#039;&#039;: Position of the camera.&lt;br /&gt;
* num1&lt;br /&gt;
* &#039;&#039;&#039;roll&#039;&#039;&#039;: Z rotation in radians.&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_EYEPOS_FIX_THERE||その場定点||CameraFixedThere||✓||✓|| Stops the camera in the position of the last camera used and focuses on Mario. Mostly used for the landing sequence of flying stars.&lt;br /&gt;
||&lt;br /&gt;
* num2&lt;br /&gt;
* num1&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_TRUNDLE||トランドル||CameraTrundle||✓||✓|| &lt;br /&gt;
||&lt;br /&gt;
* up.X&lt;br /&gt;
* angleA&lt;br /&gt;
* angleB&lt;br /&gt;
* dist&lt;br /&gt;
* wpoint&lt;br /&gt;
* axis&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_SPHERE_TRUNDLE||球トランドル||CameraSphereTrundle||n/a||✓|| &lt;br /&gt;
|| ?&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_INNER_CYLINDER||円筒内部||CameraInnerCylinder||✓||✗|| &lt;br /&gt;
||&lt;br /&gt;
* axis&lt;br /&gt;
* angleA&lt;br /&gt;
* angleB&lt;br /&gt;
* dist&lt;br /&gt;
* up.X&lt;br /&gt;
* wpoint&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_CUBE_PLANET||キューブ惑星||CameraCubePlanet||✓||✓|| Variant of camera type follow in which the camera rotates along based on Mario&#039;s current gravitational frame.&lt;br /&gt;
||&lt;br /&gt;
* dist&lt;br /&gt;
* angleA&lt;br /&gt;
* angleB&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_CHARMED_FIX||サンボ||CameraCharmedFix||✓||✓|| &lt;br /&gt;
||&lt;br /&gt;
* up&lt;br /&gt;
* axis&lt;br /&gt;
* wpoint&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_CHARMED_VECREG||ベクトルレジスタ注目||CameraCharmedVecReg||✓||✓|| &lt;br /&gt;
||&lt;br /&gt;
* angleA&lt;br /&gt;
* angleB&lt;br /&gt;
* axis&lt;br /&gt;
* dist&lt;br /&gt;
* string&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_CHARMED_VECREG_TOWER||VecReg角度補正塔カメラ||CameraCharmedVecRegTower||✓||✓|| &lt;br /&gt;
||&lt;br /&gt;
* axis&lt;br /&gt;
* dist&lt;br /&gt;
* angleA&lt;br /&gt;
* angleB&lt;br /&gt;
* string&lt;br /&gt;
* wpoint&lt;br /&gt;
* num1&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_MEDIAN_PLANET||中点注目プラネット||CameraMedianPlanet||✓||✓|| &lt;br /&gt;
||&lt;br /&gt;
* wpoint.X&lt;br /&gt;
* dist&lt;br /&gt;
* angleB&lt;br /&gt;
* angleA&lt;br /&gt;
* axis&lt;br /&gt;
* string&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_MEDIAN_TOWER||中点塔カメラ||CameraMedianTower||✓||✓|| &lt;br /&gt;
||&lt;br /&gt;
* string&lt;br /&gt;
* up&lt;br /&gt;
* angleA&lt;br /&gt;
* wpoint&lt;br /&gt;
* axis&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_FOLLOW||フォロー||CameraFollow||✓||✓|| &lt;br /&gt;
||&lt;br /&gt;
* axis.X&lt;br /&gt;
* axis.Y&lt;br /&gt;
* angleA&lt;br /&gt;
* angleB&lt;br /&gt;
* dist&lt;br /&gt;
* num1&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_RACE_FOLLOW||レース用フォロー||CameraRaceFollow||✓||✓|| &lt;br /&gt;
||&lt;br /&gt;
* angleA&lt;br /&gt;
* wpoint&lt;br /&gt;
* num1&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_WATER_FOLLOW||水中フォロー||CameraWaterFollow||✓||✓|| &lt;br /&gt;
||&lt;br /&gt;
* dist&lt;br /&gt;
* axis.Y&lt;br /&gt;
* axis.Y&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_WATER_PLANET||水中プラネット||CameraWaterPlanet||✓||✓|| &lt;br /&gt;
||&lt;br /&gt;
* angleA&lt;br /&gt;
* axis.X&lt;br /&gt;
* axis.Y&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_WATER_PLANET_BOSS||水中プラネットボス||CameraWaterPlanetBoss||✓||✗|| &lt;br /&gt;
||&lt;br /&gt;
* up&lt;br /&gt;
* num1&lt;br /&gt;
* wpoint&lt;br /&gt;
* axis&lt;br /&gt;
* dist&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_TRIPOD_PLANET||三脚惑星||CameraTripodPlanet||✓||✓|| &lt;br /&gt;
||&lt;br /&gt;
* up&lt;br /&gt;
* dist&lt;br /&gt;
* wpoint&lt;br /&gt;
* axis&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_TRIPOD_BOSS||三脚ボス||CameraTripodBoss||✗||n/a|| &lt;br /&gt;
||&lt;br /&gt;
* up&lt;br /&gt;
* dist&lt;br /&gt;
* axis&lt;br /&gt;
* wpoint&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_TRIPOD_BOSS_JOINT||三脚ボスジョイント||CameraTripodBossJoint||✓||n/a|| &lt;br /&gt;
||&lt;br /&gt;
* num1&lt;br /&gt;
* dist&lt;br /&gt;
* angleA&lt;br /&gt;
* angleB&lt;br /&gt;
* axis&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_CHARMED_TRIPOD_BOSS||三脚ボスジョイント注視||CameraCharmedTripodBoss||✓||n/a|| &lt;br /&gt;
||&lt;br /&gt;
* up&lt;br /&gt;
* axis.X&lt;br /&gt;
* axis.Y&lt;br /&gt;
* num1&lt;br /&gt;
* wpoint&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_FOO_FIGHTER||フーファイター||CameraFooFighter||✓||✗|| &lt;br /&gt;
||&lt;br /&gt;
* dist&lt;br /&gt;
* axis.X&lt;br /&gt;
* axis.Y&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_FOO_FIGHTER_PLANET||フーファイタープラネット||CameraFooFighterPlanet||✓||✗|| &lt;br /&gt;
||&lt;br /&gt;
* dist&lt;br /&gt;
* axis.X&lt;br /&gt;
* axis.Y&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_RAIL_WATCH||レール注目||CameraRailWatch||✓||✓|| &lt;br /&gt;
||&lt;br /&gt;
* num1&lt;br /&gt;
* num2&lt;br /&gt;
* axis.X&lt;br /&gt;
* dist&lt;br /&gt;
* angleA&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_RAIL_DEMO||レールデモ||CameraRailDemo||✗||✗|| &lt;br /&gt;
||&lt;br /&gt;
* num1&lt;br /&gt;
* num2&lt;br /&gt;
* dist&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_RAIL_FOLLOW||レールフォロー||CameraRailFollow||✓||✗|| &lt;br /&gt;
||&lt;br /&gt;
* num1&lt;br /&gt;
* num2&lt;br /&gt;
* dist&lt;br /&gt;
* wpoint.X&lt;br /&gt;
* wpoint.Y&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_OBJ_PARALLEL||オブジェ並行||CameraObjParallel||✓||✓|| &lt;br /&gt;
||&lt;br /&gt;
* dist&lt;br /&gt;
* &#039;&#039;&#039;angleA&#039;&#039;&#039;: Pitch in radians.&lt;br /&gt;
* angleB&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_MTXREG_PARALLEL||マトリクスレジスタ並行||CameraMtxRegParallel||✓||✓|| &lt;br /&gt;
||&lt;br /&gt;
* string&lt;br /&gt;
* angleA&lt;br /&gt;
* angleB&lt;br /&gt;
* dist&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_SLIDER||スライダー||CameraBehind||✗||✗|| &lt;br /&gt;
||&lt;br /&gt;
* angleA&lt;br /&gt;
* angleB&lt;br /&gt;
* dist&lt;br /&gt;
* axis.X&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_2D_SLIDE||２Ｄスライド||CameraSlide||✓||✓|| &lt;br /&gt;
||&lt;br /&gt;
* axis&lt;br /&gt;
* up&lt;br /&gt;
* dist&lt;br /&gt;
* angleA&lt;br /&gt;
* wpoint&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_GROUND||地面||CameraGround||✓||✗|| &lt;br /&gt;
||&lt;br /&gt;
* angleA&lt;br /&gt;
* angleB&lt;br /&gt;
* dist&lt;br /&gt;
* up&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_SPIRAL_DEMO||螺旋デモ||CameraSpiral||✓||✓|| &lt;br /&gt;
||&lt;br /&gt;
* num1&lt;br /&gt;
* num2&lt;br /&gt;
* axis&lt;br /&gt;
* wpoint&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_TWISTED_PASSAGE||ねじれ回廊||CameraTwistedPassage||✓||✗|| &lt;br /&gt;
||&lt;br /&gt;
* num1&lt;br /&gt;
* axis.X&lt;br /&gt;
* axis.Y&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_FRONT_AND_BACK||表裏カメラ||CameraFrontAndBack||✓||✓|| &lt;br /&gt;
||&lt;br /&gt;
* axis&lt;br /&gt;
* angleA&lt;br /&gt;
* angleB&lt;br /&gt;
* dist&lt;br /&gt;
* wpoint&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_FREEZE||その場完全固定||CameraFreeze||n/a||✓|| Stops and freezes the camera completely based on the last camera position and rotation.&lt;br /&gt;
|| ?&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_TALK||会話||CameraTalk||✗||✗|| &lt;br /&gt;
||&lt;br /&gt;
* wpoint&lt;br /&gt;
* up&lt;br /&gt;
* axis.X&lt;br /&gt;
* axis.Y&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_ANIM||アニメ||CameraAnim||✗||✗|| &lt;br /&gt;
||&lt;br /&gt;
* num1&lt;br /&gt;
* dist&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_DEAD||通常死亡||CameraDead||✗||✗|| &lt;br /&gt;
||&lt;br /&gt;
* num1&lt;br /&gt;
* num2&lt;br /&gt;
* dist&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_BLACK_HOLE||ブラックホール||CameraBlackHole||✗||✗|| &lt;br /&gt;
||&lt;br /&gt;
* axis&lt;br /&gt;
* wpoint&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_DPD||ＤＰＤ||CameraDPD||✗||✗|| &lt;br /&gt;
||&lt;br /&gt;
* num2&lt;br /&gt;
* up.X&lt;br /&gt;
* wpoint&lt;br /&gt;
* angleA&lt;br /&gt;
* angleB&lt;br /&gt;
* dist&lt;br /&gt;
* num1&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_SUBJECTIVE||主観||CameraSubjective||✗||✗||  ||n/a&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Aliases===&lt;br /&gt;
Likely for the purpose of preserving compatibility with test camera files, the developers added aliases for some camera classes. These exist in both &#039;&#039;Galaxy&#039;&#039; games. However, these aliases only apply if the camera version is greater or equal to the required version. Interestingly, it also contains an alias for &#039;&#039;CAM_TYPE_BOSS_DONKETSU&#039;&#039;, a camera class that has been removed from the actual game.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Alias Name !! Actual Name !! Required Version&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_DONKETSU_TEST || CAM_TYPE_BOSS_DONKETSU || 196612&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_BEHIND_DEBUG || CAM_TYPE_SLIDER || 196614&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_INWARD_TOWER_TEST || CAM_TYPE_INWARD_TOWER || 196614&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_EYE_FIXED_THERE_TEST || CAM_TYPE_EYEPOS_FIX_THERE || 196614&lt;br /&gt;
|-&lt;br /&gt;
| CAM_TYPE_ICECUBE_PLANET || CAM_TYPE_CUBE_PLANET || 196617&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Common Properties==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Property !! Description&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | General&lt;br /&gt;
|-&lt;br /&gt;
| version || Camera engine version. Usually 196630 in &#039;&#039;Super Mario Galaxy 1&#039;&#039; and 196631 in &#039;&#039;Super Mario Galaxy 2&#039;&#039;.&lt;br /&gt;
|-&lt;br /&gt;
| camtype || Class identifier name. See the tables above for possible values.&lt;br /&gt;
|-&lt;br /&gt;
| id || The camera&#039;s identifier name. See the [[#Camera ID Names|respective section]] for more details.&lt;br /&gt;
|-&lt;br /&gt;
| woffset.X&amp;lt;br&amp;gt;woffset.Y&amp;lt;br&amp;gt;woffset.Z ||A constant offset from the target relative to the Zone the camera belongs to.&lt;br /&gt;
|-&lt;br /&gt;
| loffset ||An offset from the target&#039;s forward vector. Higher values move the camera further in front of the target and lower values move it behind the target.&lt;br /&gt;
|-&lt;br /&gt;
| loffsetv ||An offset from the target&#039;s upward vector. Higher values move the camera further above the target and lower values move it below the target.&lt;br /&gt;
|-&lt;br /&gt;
| roll ||Rotates the camera. 180 will flip the camera upside down&lt;br /&gt;
|-&lt;br /&gt;
| fovy || The [https://en.wikipedia.org/wiki/Field_of_view field of view] angle in degrees. Huge numbers cause visual issues, so it&#039;s best to keep this between 0 and 179.9&lt;br /&gt;
|-&lt;br /&gt;
| camint || The amount of time in frames it takes for the camera to get into it&#039;s active position&lt;br /&gt;
|-&lt;br /&gt;
| upper || Upper screen bound relative to the center of the screen&lt;br /&gt;
|-&lt;br /&gt;
| lower || Lower screen bound relative to the cetner of the screen&lt;br /&gt;
|-&lt;br /&gt;
| gndint || &lt;br /&gt;
|-&lt;br /&gt;
| uplay || How high in the world the target needs to go before the camera physically starts moving upwards&lt;br /&gt;
|-&lt;br /&gt;
| lplay || How low in the world the target needs to go before the camera physically starts moving downwards&lt;br /&gt;
|-&lt;br /&gt;
| pushdelay || The activation time in frames for when the Upper bound activates&lt;br /&gt;
|-&lt;br /&gt;
| pushdelaylow || The activation time in frames for when the Lower bound activates&lt;br /&gt;
|-&lt;br /&gt;
| udown || &lt;br /&gt;
|-&lt;br /&gt;
| vpanuse || Enables the use of the Camera Height Arrangement&lt;br /&gt;
|-&lt;br /&gt;
| vpanaxis.X&amp;lt;br&amp;gt;vpanaxis.Y&amp;lt;br&amp;gt;vpanaxis.Z || &lt;br /&gt;
|-&lt;br /&gt;
| flag.noreset || &lt;br /&gt;
|-&lt;br /&gt;
| flag.nofovy || If enabled, the FoV can be changed&lt;br /&gt;
|-&lt;br /&gt;
| flag.lofserpoff || If enabled, the loffset and loffsetv will not interpolate into position and snap to where it needs to be.&lt;br /&gt;
|-&lt;br /&gt;
| flag.antibluroff || If enabled, rotating the camera will be not be smooth&lt;br /&gt;
|-&lt;br /&gt;
| flag.collisionoff || Disables collision with map geometry if enabled. This means that the camera will move through collision if necessary.&lt;br /&gt;
|-&lt;br /&gt;
| flag.subjectiveoff || Disables the first-person camera if enabled.&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | &#039;&#039;Game&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| gflag.thru || &lt;br /&gt;
|-&lt;br /&gt;
| gflag.enableEndErpFrame || If enabled, a &amp;quot;Camera deactivation time&amp;quot; (gflag.camendint) will be enabled, and deactivating this camera will have this time be used instead of the new camera&#039;s time&lt;br /&gt;
|-&lt;br /&gt;
| gflag.camendint || Determines the time in frames that this camera will need to deactivate&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | &#039;&#039;Event&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| eflag.enableErpFrame || &lt;br /&gt;
|-&lt;br /&gt;
| eflag.enableEndErpFrame || &lt;br /&gt;
|-&lt;br /&gt;
| camendint || &lt;br /&gt;
|-&lt;br /&gt;
| evfrm || The time in frames that this event camera is active for&lt;br /&gt;
|-&lt;br /&gt;
| evpriority || Always 1.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Trivia==&lt;br /&gt;
* The oldest available camera version is 196617 and can be found in &#039;&#039;HellLavaFloatingZone&#039;&#039;.&lt;br /&gt;
* The function &#039;&#039;CameraParamChunk::load&#039;&#039; references a removed camera class labeled as &#039;&#039;CAM_TYPE_PLANET&#039;&#039;.&lt;br /&gt;
* Intro cameras dynamically create a &#039;&#039;CAM_TYPE_ANIM&#039;&#039; camera with the ID &#039;&#039;o:スタートアニメカメラ&#039;&#039;. It is not possible to overwrite this in a BCAM file.&lt;/div&gt;</summary>
		<author><name>Super Hackio</name></author>
	</entry>
</feed>