Repository navigation
SKIN
struct Skin {
TransformationHeader tx; // subtype is always either 0 or 2
uint32_t num_meshes;
int32_t mesh_ids[num_meshes]; // May be SURFACE if subtype is 2
uint32_t zero; // always 0
uint32_t num_sections;
SkinSection sections[num_sections];
uint8_t has_anims;
// if has_anims is true:
uint32_t num_anim_entries;
AnimEntry anim_entries[num_anim_entries];
uint32_t zero2; // Always 0, might be default animation?
// end if
uint32_t num_unknown_entries;
UnknownEntry unknown_entries[num_unknown_entries];
}Note that Skin.tx.subtype is always either 0 or 2. Subtype 0 always contains MESH id's in Skin.mesh_ids, but subtype 2 make contain MESH or SURFACE ids in Skin.mesh_ids.
Skin.num_unknown_entries is always equivalent to Skin.num_sections
struct SkinSection {
int32_t vertexgroup_id;
uint32 num_subsections;
SkinSubsection subsections[num_subsections];
}SkinSection.vertexgroup_id is the CRC32 hash of the vertex group name. Note that the vertex group's name may not necessarily be defined in the NGC file, so you may not always be able to get a name out of it.
struct SkinSubsection {
uint16_t mesh_index;
uint32_t num_vertices;
SkinEntryVertex vertices[num_vertices];
uint32_t num_normals;
SkinEntryNormal normals[num_normals];
}SkinSubsection.mesh_index is an index into Skin.mesh_ids.
struct SkinEntryVertex {
uint32_t vertex_id;
float unknown_value;
}SkinEntryVertex.vertex_id is an index into MESH's vertices array. It is very likely that SkinEntryVertex.unknown_value is a weight value used for rigging.
struct SkinEntryNormal {
uint32_t normal_id;
float unknown_value;
}SkinEntryNormal.normal_id is an index into MESH's normals array. It is very likely that SkinEntryNormal.unknown_value is a weight value used for rigging.
struct AnimEntry {
uint32_t anim_symbol_enum;
int32_t anim_id; // reference to an ANIMATION file
}For more information on AnimEntry.anim_symbol_enum, see the Animation Symbol Enum page.
struct UnknownEntry {
uint32_t num_vertices;
uint32_t vertices[num_vertices];
uint32_t num_normals;
uint32_t normals[num_vertices];
}UnknownEntry.num_vertices is equivalent to the corresponding SkinSection.num_sections. The same applies to UnknownEntry.num_normals, which is also equivalent to SkinSection.num_sections.
Each value in UnknownEntry.vertices is less than or equal to the corresponding SkinSubsection.num_vertices. Each value in UnknownEntry.normals is less than or equal to the corresponding SkinSubsection.num_normals.