CSKR (File Format): Difference between revisions

Jump to navigation Jump to search
no edit summary
>Aruki
(Created page with "The '''CSKR format''' contains skin bindings for rigged models. {{todo|Write article.}} Category:File Formats Category:Metroid Prime Category:Metroid Prime 2: Echo...")
 
>Aruki
No edit summary
Line 1: Line 1:
The '''CSKR format''' contains skin bindings for rigged models.
The '''CSKR format''' contains skin bindings for rigged models. It attaches groups of vertices to bones. Note that any model being skinned needs to be exported at the same time as the skin; you can't skin a pre-existing model without modifying it. The reason is because the way the skin format works, the vertices with the same weights need to be grouped together in the model file.


{{todo|Write article.}}
{{researchminor|reason=The only thing that isn't understood about this format is, why do some CSKR files contain all the vertex coordinates and normals? Also, what's the max number of bones that can be weighted to one vertex?}}
 
== Format ==
 
CSKR is a very simple format. It begins with a 32-bit weight count, followed by a set of vertex groups. Each vertex group assigns a set of weights to a specified number of vertices; these vertices are specified simply through a count value, and are implied to begin after the end of the previous group. The total value of all the weights on all bones in a given vertex group should be 1.0.
 
=== Vertex Group ===
 
{| class="wikitable"
! Type
! Count
! Description
|-
| long
| 1
| '''Weight count''' (WC)
|-
| Weight
| WC
| '''Weights'''
|-
| long
| 1
| '''Vertex count'''
|}
 
=== Weight ===
 
{| class="wikitable"
! Type
! Count
! Description
|-
| long
| 1
| Bone ID
|-
| float
| 1
| Weight
|}
 
=== Footer ===
 
CSKR files contain a footer after all the weights are assigned. The structure is a little strange; it lists the vertex coordinate and vertex normal counts (which are often the same value). Usually each of these counts will be preceded by a value of 0xFFFFFFFF; however, if they're not, then the entire vertex coordinate/normal array from the model file will be inserted into the skin file. It's a byte-for-byte match with the data from the model. The purpose of this section is unknown.


[[Category:File Formats]]
[[Category:File Formats]]
Anonymous user

Navigation menu