CINF (File Format): Difference between revisions

From Retro Modding Wiki
Jump to navigation Jump to search
>Aruki
No edit summary
>Aruki
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The '''CINF format''' is for skeletons. Skeletons are associated with models and skins through [[ANCS (File Format)|ANCS]] files.
The '''CINF format''' is for character layouts (i.e. skeletons/armatures).
Character layouts are associated with models and skins through [[ANCS (File Format)|ANCS]] files.


{{research|1|What is the purpose of the bone ID section?}}
{{todo|MP3/DKCR differences}}
{{todo|MP2/3/DKCR differences}}


== Format ==
== Format ==
Line 19: Line 19:
| [[#Bone|Bone]]
| [[#Bone|Bone]]
| ''Bone Count''
| ''Bone Count''
| '''Bone Array'''
| '''Bone Table'''
|  
|  
|-
|-
| u32
| u32
| 1
| 1
| '''Bone ID Count'''
| '''Build Order ID Count'''
|  
|  
|-
|-
| u32
| u32
| ''Bone ID Count''
| ''Build Order ID Count''
| '''Bone ID Array'''
| '''Build Order ID Table'''
| The first element of the ID array is the root bone, followed by the rest of the bone IDs in reverse numerical order.
| The first element of the ID table is the root bone, followed by the rest of the bone IDs in reverse numerical order. This table is enumerated in-order to construct a singly-linked hierarchy of bones using [[wikipedia:Left-child right-sibling binary tree|child/sibling convention]].
|-
|-
| u32
| u32
Line 39: Line 39:
| [[#Bone Name|Bone Name]]
| [[#Bone Name|Bone Name]]
| ''Bone Name Count''
| ''Bone Name Count''
| '''Bone Name Array'''
| '''Bone Name Table'''
|  
|  
|-
|-
Line 53: Line 53:
! Name
! Name
! Notes
! Notes
! MP1
! MP2
|-
|-
| 0x0
| 0x0
Line 59: Line 61:
| '''Bone ID'''
| '''Bone ID'''
|  
|  
| {{check}}
| {{check}}
|-
|-
| 0x4
| 0x4
Line 65: Line 69:
| '''Parent Bone ID'''
| '''Parent Bone ID'''
|  
|  
| {{check}}
| {{check}}
|-
|-
| 0x8
| 0x8
| float
| {{Vector3f}}
| 3
| 1
| '''Position'''
| '''Position'''
| The position is in the skeleton's local space, not in the parent's bone space.
| The position is in the skeleton's local space, not in the parent's bone space.
| {{check}}
| {{check}}
|-
|-
| 0x14
| 0x14
| {{Quaternion}}
| 1
| '''Rotation'''
| Initial rotation of the bone, also in the skeleton's local space.
| {{nocheck}}
| {{check}}
|-
| 0x24
| {{Quaternion}}
| 1
| '''Local Rotation'''
| Initial local rotation of the bone in this bone's local space (parent-relative).
| {{nocheck}}
| {{check}}
|-
| 0x34
| u32
| u32
| 1
| 1
| '''Linked Bone Count'''
| '''Linked Bone Count'''
|  
|  
| {{check}}
| {{check}}
|-
|-
| 0x18
| 0x38
| u32
| u32
| ''Linked Bone Count''
| ''Linked Bone Count''
| '''Linked Bone ID Array'''
| '''Linked Bone ID Array'''
| This array includes both the parent bone ID as well as all children.
| This array includes both the parent bone ID as well as all children.
| {{check}}
| {{check}}
|-
|-
| colspan=5 {{unknown|End of bone}}
| colspan=7 {{unknown|End of bone}}
|}
|}



Latest revision as of 18:52, 22 April 2017

The CINF format is for character layouts (i.e. skeletons/armatures). Character layouts are associated with models and skins through ANCS files.


To do:
MP3/DKCR differences

Format

Type Count Name Notes
u32 1 Bone Count
Bone Bone Count Bone Table
u32 1 Build Order ID Count
u32 Build Order ID Count Build Order ID Table The first element of the ID table is the root bone, followed by the rest of the bone IDs in reverse numerical order. This table is enumerated in-order to construct a singly-linked hierarchy of bones using child/sibling convention.
u32 1 Bone Name Count
Bone Name Bone Name Count Bone Name Table
End of file

Bone

Offset Type Count Name Notes MP1 MP2
0x0 u32 1 Bone ID
0x4 u32 1 Parent Bone ID
0x8 Vector3f 1 Position The position is in the skeleton's local space, not in the parent's bone space.
0x14 Quaternion 1 Rotation Initial rotation of the bone, also in the skeleton's local space.
0x24 Quaternion 1 Local Rotation Initial local rotation of the bone in this bone's local space (parent-relative).
0x34 u32 1 Linked Bone Count
0x38 u32 Linked Bone Count Linked Bone ID Array This array includes both the parent bone ID as well as all children.
End of bone

Bone Name

Type Count Name Notes
string 1 Bone Name
u32 1 Bone ID
End of bone name