CMDL (Donkey Kong Country Returns): Difference between revisions
Jump to navigation
Jump to search
no edit summary
>Aruki No edit summary |
>Aruki No edit summary |
||
Line 3: | Line 3: | ||
The '''CMDL format''' is DKCR's model format. It's similar to the CMDL format found in the Metroid Prime trilogy, but with a lot of additions and changes, and some layout changes. | The '''CMDL format''' is DKCR's model format. It's similar to the CMDL format found in the Metroid Prime trilogy, but with a lot of additions and changes, and some layout changes. | ||
{{research|moderate|The visibility group data in the header has a lot of unknown values.}} | {{research|moderate|The visibility group data in the header has a lot of unknown values.}} | ||
Line 17: | Line 16: | ||
! Offset | ! Offset | ||
! Type | ! Type | ||
! | ! Count | ||
! | ! Name | ||
! Notes | |||
|- | |- | ||
| 0x0 | | 0x0 | ||
| u16 | | u16 | ||
| | | 1 | ||
| | | '''Magic''' | ||
| Always <code>0x9381</code> | |||
|- | |||
| 0x2 | |||
| u16 | |||
| 1 | |||
| '''Version''' | |||
| Always 0xA. See [[CMDL (File Format)|hub article]] for a list of possible version numbers. | |||
|- | |- | ||
| 0x4 | | 0x4 | ||
| u32 | | u32 | ||
| | | 1 | ||
| '''Flags''' | | '''Flags''' | ||
| [[#Flags|See below]] | |||
|- | |- | ||
| 0x8 | | 0x8 | ||
| float | | float | ||
| | | 6 | ||
| '''Model Bounding Box''' | | '''Model Bounding Box''' | ||
| | |||
|- | |- | ||
| 0x20 | | 0x20 | ||
| u32 | | u32 | ||
| | | 1 | ||
| '''Section | | '''Section Count''' | ||
| Count of data sections in the file. | |||
|- | |- | ||
| 0x24 | | 0x24 | ||
| u32 | | u32 | ||
| | | 1 | ||
| '''Material | | '''Material Set Count''' | ||
| Count of material sets in the model. | |||
|- | |- | ||
| 0x28 | | 0x28 | ||
| | | [[#Visibility Groups|Visibility Groups]] | ||
| | | 1 | ||
| '''Visibility | | '''Visibility Group Data''' | ||
| Only present if flag 0x10 is set. | |||
|- | |- | ||
| | | {{none}} | ||
| u32 | | u32 | ||
| | | ''Section Count'' | ||
| '''Section | | '''Section Sizes''' | ||
| | |||
|- | |- | ||
| colspan= | | colspan=5 {{unknown|End of header; pad to multiple of 32 before first section starts}} | ||
|} | |} | ||
Line 94: | Line 107: | ||
==== Visibility Groups ==== | ==== Visibility Groups ==== | ||
Visibility group data is present in the header if bit 0x10 is set, after the material set count and before the section sizes. Visibility groups are used to toggle the visibility of certain | Visibility group data is present in the header if bit 0x10 is set, after the material set count and before the section sizes. Visibility groups are used to toggle the visibility of certain surfaces on or off during animations; for instance, Diddy's jetpack is part of his model but doesn't render in most of his animations. | ||
{| class="wikitable" | {| class="wikitable" |