Asura Engine RSCF (Model): Difference between revisions
Jump to navigation
Jump to search
imported>Trololp (→Notes) |
imported>Trololp |
||
| Line 188: | Line 188: | ||
* Rogue Warrior | * Rogue Warrior | ||
* Shellshock 2: Blood Trails | * Shellshock 2: Blood Trails | ||
* Sniper Elite Nazi Zombie Army | |||
* Sniper Elite Nazi Zombie Army 2 | |||
* Sniper Elite 3 | |||
* Sniper Elite V2 Remastered | |||
* Sniper Elite 4 | |||
[[Category:3D Model Formats]] | [[Category:3D Model Formats]] | ||
Revision as of 14:23, 15 May 2021
Format Specifications
RSCF - Model
uint32 Chunk Signature ('RSCF')
uint32 Chunk Length // from start of Header
uint32 Version (1 or 2, 3? , 4)
uint32 Subversion (0)
uint32 Resource Type (0)
uint32 Resource Type2 (0xF)
uint32 Resource Data Length
C_str_padded Model_name
if (Version == 1 or Version == 2){
struct model_header {
uint32 model_part_info_count
uint32 total_amount_vertexes
uint32 total_amount_indeces
uint32 unk
uint32 count_unk // some uint32 array at the end of file
bool vertex_layout; // 0 - TRIANGLESTRIP 1 - TRIANGLE LIST
} // packed to 1 bytes (sizeof(model_header) => 21)
}
if (Version == 4) {
struct model_header {
uint32 model_part_info_count
uint32 total_amount_vertexes
uint32 total_amount_indeces
uint32 unk
uint32 count_unk // some uint32 array at the end of file
}
}
model_header hdr
struct model_part_info {
uint32 mat_hash // hash of materials found in MARE chunk
uint32 unk
uint32 points_count
uint32 some_flags // 0 bit set is (meat part?) others is body part identification ?
uint32 unk2
uint32 unk3
}
model_part_info mpi[model_part_info_count] // array of model parts
struct model_vtx // this is only for Version == 1
{
float[3] Pos // x,y,z
uint8 BlendIndices[4] // bone ids
snorm16 BlendWeight[4] // bone weights
half Tangent[4]
half Binormal[4]
half Normal[4]
half TexCoord1[4] // x,y = u,v coords
float TextCoord2
};
struct model_vtx // this is only for Version == 2
{
float[4] Pos // x,y,z,0
uint8 BlendIndices[4] // bone ids
snorm16 BlendWeight[4] // bone weights
half Tangent[4]
half Binormal[4]
half Normal[4]
half TexCoord1[4] // x,y = u,v coords
float TextCoord2
};
// about vertex layout of Version 4 see notes
model_vtx vrtx[total_amount_vertexes] // vertices
uint16 indeces[total_amount_indeces] // indeces
uint32 unk_arr[count_unk] //unknown
HSKN - Skeleton
uint32 Chunk Signature ('HSKN')
uint32 Chunk Length // from start of Header
uint32 Version (9 or 10)
uint32 Subversion (different)
uint32 unk_amount
uint32 num_bones
C_str_padded Model_name
if (unk_amount && !(Subversion & 0x40))
{
72 bytes * unk_amount // Idk
}
uint32 bone_parent[num_bones] // 0 is root bone
struct skeleton_point
{
float rel_pos[3]
float rel_rot[4]
}
skeleton_point pts[num_bones]
if (Version >= 10)
{
uint8 unk
}
if (Subversion & 1)
{
C_str_padded bone_name
if (Version >= 10) uint8 unk
uint32 val
if (val != 0)
{
uint32 type // something like collision model
if (type >= 3)
{
uint32 amount_pts
uint32 amount2
uint32 unk_val1
uint32 unk_val2
if (type >= 9) uint32 unk_val3
uint16 w1
uint16 w2
if (type >= 9) uint32 unk_val4
float bbox[6] // x1,x2,y1,y2,z1,z2 format
float bbox_radius
float pts[3 * amount_pts]
uint16 indeces[4 * amount2] // some indeces ?
if(unk_val1) uint16 unk_val1_arr[amount2]
if(unk_val2) uint16 unk_val2_arr[amount2] // some sequence
if(unk_val3) uint32 unk_val3_arr[amount2] // some hashes
if(type >= 8) {
uint32 unk
uint32 val
if(val) uint32 unk_arr[amount2]
}
}
}
}
if (Version >= 5 && (Subversion & 2))
{
float bbox[6] // x1,x2,y1,y2,z1,z2 format
}
if (Version >= 6 && (Subversion & 4))
{
uint32 unk_dw
collision_structure // see '// something like collision model' above
}
if (Version >= 7) uint32 some_other_bone_ids[num_bones] // unknown
if (Version >= 8 && (Subversion & 0x10)) 28 bytes * unk_amount // idk
if (Version >= 9 && (Subversion & 0x20)) uint32 unknown_arr[unk_amount] // idk
Notes
half type is 16 bit float point IEEE-754 snorm16 type is 16 bit single point float value between -1.0 and 1.0
float val = (float)((WORD)snorm16/32768) - 1.0f
C_str_padded type is C string with padding to a multiple of 4 bytes.
Skeleton points all contains relative offset and rotation to parent point. 0 is root point.
For Version 4 RSCF model format, some games uses diffent vertex layouts. There some of them
Import Scripts
Supported Programs
- Noesis plugin (for aliens vs. predator 2010)
- model_viewer (for aliens vs. predator 2010)
Related Games
- Alien vs Predator (2010)
- Rogue Warrior
- Shellshock 2: Blood Trails
- Sniper Elite Nazi Zombie Army
- Sniper Elite Nazi Zombie Army 2
- Sniper Elite 3
- Sniper Elite V2 Remastered
- Sniper Elite 4