Difference between revisions of "DCLN (Metroid Prime)"

From Retro Modding Wiki
Jump to: navigation, search
(Created page with "''This article is for the DCLN format from the Metroid Prime series and Donkey Kong Country Returns. See DCLN (File Format) for other revisions of this format.'' The '''D...")
 
(Collision Mesh)
 
(3 intermediate revisions by 2 users not shown)
Line 69: Line 69:
 
| u32
 
| u32
 
| 1
 
| 1
| {{unknown|Unknown}}
+
| '''Internal Memory Allocation Size'''
| Seems like a size value of some sort but doesn't match anything in the file. Could possibly be a memory allocation size.
+
| Used to build CNode/CLeafData from the stored representation. Each node/leaf's size is aligned to the nearest 4-byte boundary.
 
| {{check}}
 
| {{check}}
 
| {{check}}
 
| {{check}}
 
|-
 
|-
 
| {{none}}
 
| {{none}}
| [[Collision Index Data (File Format)|Collision Index Data}}
+
| [[Collision Index Data (File Format)|Collision Index Data]]
 
| 1
 
| 1
 
| '''Collision Index Data'''
 
| '''Collision Index Data'''
 
| Index data for the collision mesh. This data section is what actually defines the collision mesh itself. This part of the format is shared with [[Area Collision (File Format)|MREA]].
 
| Index data for the collision mesh. This data section is what actually defines the collision mesh itself. This part of the format is shared with [[Area Collision (File Format)|MREA]].
 +
| {{check}}
 +
| {{check}}
 
|-
 
|-
 
| {{none}}
 
| {{none}}
Line 85: Line 87:
 
| '''Collision OBB Tree'''
 
| '''Collision OBB Tree'''
 
| OBB tree for the collision mesh. This is used to quickly locate triangles that an actor could potentially be colliding with.
 
| OBB tree for the collision mesh. This is used to quickly locate triangles that an actor could potentially be colliding with.
 +
| {{check}}
 +
| {{check}}
 
|-
 
|-
| colspan=5 {{unknown|End of Collision Mesh}}
+
| colspan=7 {{unknown|End of Collision Mesh}}
 
|}
 
|}
 +
 +
==== OBB Tree ====
 +
 +
{{todo|OBB tree format documentation}}
  
 
[[Category:File Formats]]
 
[[Category:File Formats]]

Latest revision as of 19:24, 16 August 2018

This article is for the DCLN format from the Metroid Prime series and Donkey Kong Country Returns. See DCLN (File Format) for other revisions of this format.

The DCLN format stores one or more collision meshes, each partitioned via an OBB tree. These are used as dynamic collision data for actors and platforms. Most of the format is shared with the MREA format, but there are some sections that are unique to DCLN.

Format

The file can store multiple collision meshes; each one has its own chunk in the file.

Type Count Name Notes
u32 1 Collision Mesh Count Number of collision meshes in the file.
Collision Mesh Collision Mesh Count Collision Mesh Array Array of collision meshes.
End of File

Collision Mesh

Offset Type Count Name Notes MP1/2/3 DKCR
0x0 u32 1 Magic Always 0xDEAFBABE
0x4 u32 1 Version Possible values:
  • 0x2: Metroid Prime
  • 0x4: Metroid Prime 2/3
  • 0x5: Donkey Kong Country Returns
0x8 AABox 1 Mesh Bounding Box Bounding box of the collision mesh.
u32 1 Internal Memory Allocation Size Used to build CNode/CLeafData from the stored representation. Each node/leaf's size is aligned to the nearest 4-byte boundary.
Collision Index Data 1 Collision Index Data Index data for the collision mesh. This data section is what actually defines the collision mesh itself. This part of the format is shared with MREA.
OBB Tree 1 Collision OBB Tree OBB tree for the collision mesh. This is used to quickly locate triangles that an actor could potentially be colliding with.
End of Collision Mesh

OBB Tree

GravitySuitIcon.png To do:
OBB tree format documentation