CLSN (File Format): Difference between revisions
Jump to navigation
Jump to search
>Aruki |
>Aruki |
||
(One intermediate revision by the same user not shown) | |||
Line 59: | Line 59: | ||
| ''Triangle Count'' | | ''Triangle Count'' | ||
| '''Triangles Array''' | | '''Triangles Array''' | ||
| | |||
|- | |||
| [[Chunk Descriptor (Tropical Freeze)|Chunk Descriptor]] | |||
| 1 | |||
| '''Tree Chunk Descriptor''' | |||
| Data type is <code>TREE</code> | |||
|- | |||
| u32 | |||
| 1 | |||
| '''Leaf Node Count''' | |||
| | |||
|- | |||
| [[#Tree Leaf Node|Tree Leaf Node]] | |||
| ''Leaf Node Count'' | |||
| '''Leaf Node Array''' | |||
| | | | ||
|- | |- | ||
Line 67: | Line 82: | ||
{| class="wikitable" | {| class="wikitable" | ||
! Offset | |||
! Type | ! Type | ||
! Count | ! Count | ||
Line 72: | Line 88: | ||
! Description | ! Description | ||
|- | |- | ||
| 0x0 | |||
| u32 | | u32 | ||
| 1 | | 1 | ||
Line 77: | Line 94: | ||
| | | | ||
|- | |- | ||
| 0x4 | |||
| u32 | | u32 | ||
| 1 | | 1 | ||
Line 82: | Line 100: | ||
| | | | ||
|- | |- | ||
| 0x8 | |||
| u32 | | u32 | ||
| 1 | | 1 | ||
Line 87: | Line 106: | ||
| | | | ||
|- | |- | ||
| 0xC | |||
| u32 | | u32 | ||
| 1 | | 1 | ||
Line 92: | Line 112: | ||
| | | | ||
|- | |- | ||
| 0x10 | |||
| u32 | | u32 | ||
| 1 | | 1 | ||
Line 97: | Line 118: | ||
| | | | ||
|- | |- | ||
| 0x14 | |||
| colspan=4 {{unknown|End of collision material}} | | colspan=4 {{unknown|End of collision material}} | ||
|} | |} | ||
Line 103: | Line 125: | ||
{| class="wikitable" | {| class="wikitable" | ||
! Offset | |||
! Type | ! Type | ||
! Count | ! Count | ||
Line 108: | Line 131: | ||
! Description | ! Description | ||
|- | |- | ||
| 0x0 | |||
| u32 | | u32 | ||
| 3 | | 3 | ||
Line 113: | Line 137: | ||
| | | | ||
|- | |- | ||
| 0xC | |||
| u16 | | u16 | ||
| 1 | | 1 | ||
Line 118: | Line 143: | ||
| | | | ||
|- | |- | ||
| 0xE | |||
| u16 | | u16 | ||
| 1 | | 1 | ||
| {{unknown|'''Unknown'''}} | | {{unknown|'''Unknown'''}} | ||
| | | Always 0? The game actually does read and store it, so it may not just be padding. | ||
|- | |- | ||
| 0x10 | |||
| colspan=4 {{unknown|End of triangle}} | | colspan=4 {{unknown|End of triangle}} | ||
|} | |||
=== Tree Leaf Node === | |||
{| class="wikitable" | |||
! Offset | |||
! Type | |||
! Count | |||
! Name | |||
! Description | |||
|- | |||
| 0x0 | |||
| vector3 | |||
| 2 | |||
| '''Axis-Aligned Bounding Box''' | |||
| Represented by a pair of points where point 1 is min and point 2 is max. | |||
|- | |||
| 0x18 | |||
| u32 | |||
| 1 | |||
| {{unknown|'''Unknown'''}} | |||
| | |||
|- | |||
| 0x1C | |||
| u32 | |||
| 1 | |||
| {{unknown|'''Unknown'''}} | |||
| | |||
|- | |||
| 0x20 | |||
| u32 | |||
| 1 | |||
| {{unknown|'''Unknown'''}} | |||
| | |||
|- | |||
| 0x24 | |||
| colspan=4 {{unknown|End of leaf node}} | |||
|} | |} | ||
[[Category:File Formats]] | [[Category:File Formats]] | ||
[[Category:Donkey Kong Country: Tropical Freeze]] | [[Category:Donkey Kong Country: Tropical Freeze]] |
Latest revision as of 11:13, 17 May 2016
The CLSN format in Donkey Kong Country: Tropical Freeze is for static collision, usually used by world geometry.
This file format is almost completely documented Collision materials need experimentation to verify structure + figure out what the different flags do |
Format
Type | Count | Name | Description |
---|---|---|---|
Form Descriptor | 1 | Collision Form Descriptor | Data type is CLSN
|
Chunk Descriptor | 1 | Vertices Chunk Descriptor | Data type is VERT
|
u32 | 1 | Vertex Count | |
vector3 | Vertex Count | Vertex Data | |
Chunk Descriptor | 1 | Collision Materials Chunk Descriptor | Data type is MTRL
|
u32 | 1 | Collision Material Count | |
Collision Material | Collision Material Count | Collision Materials | Collision materials define collision properties. |
Chunk Descriptor | 1 | Triangles Chunk Descriptor | Data type is TRIS
|
u32 | 1 | Triangle Count | |
Collision Triangle | Triangle Count | Triangles Array | |
Chunk Descriptor | 1 | Tree Chunk Descriptor | Data type is TREE
|
u32 | 1 | Leaf Node Count | |
Tree Leaf Node | Leaf Node Count | Leaf Node Array | |
End of file |
Collision Material
Offset | Type | Count | Name | Description |
---|---|---|---|---|
0x0 | u32 | 1 | Unknown | |
0x4 | u32 | 1 | Unknown | |
0x8 | u32 | 1 | Unknown | |
0xC | u32 | 1 | Unknown | |
0x10 | u32 | 1 | Unknown | |
0x14 | End of collision material |
Collision Triangle
Offset | Type | Count | Name | Description |
---|---|---|---|---|
0x0 | u32 | 3 | Vertex Indices | |
0xC | u16 | 1 | Collision Material Index | |
0xE | u16 | 1 | Unknown | Always 0? The game actually does read and store it, so it may not just be padding. |
0x10 | End of triangle |
Tree Leaf Node
Offset | Type | Count | Name | Description |
---|---|---|---|---|
0x0 | vector3 | 2 | Axis-Aligned Bounding Box | Represented by a pair of points where point 1 is min and point 2 is max. |
0x18 | u32 | 1 | Unknown | |
0x1C | u32 | 1 | Unknown | |
0x20 | u32 | 1 | Unknown | |
0x24 | End of leaf node |