P3D File Format - ODOLV40 Obsolete: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
The following information has been provided by BxBx | The following information has been provided by BxBx | ||
''Legend'' | |||
int 4 bytes | |||
ulong 4 byte integer | |||
bool8 1 byte bool 0, or 1 | |||
Blocks in Odol V40 are quite similar to Odol v7 but placed in reverse order. | |||
Resolution table, | |||
LOD tables last to first | |||
The same LZ compression is used for LODs as ODOL v7 | |||
known data: | known data: | ||
Line 12: | Line 17: | ||
Beginning of file (Header signature) | Beginning of file (Header signature) | ||
struct OdolV40 | |||
{ | |||
char signature[4] //'ODOL' | char signature[4] //'ODOL' | ||
long format | long format // 40 | ||
long lod_count | long lod_count | ||
Line 22: | Line 29: | ||
} // unknown data, same data follows on end of ODOL v7 | } // unknown data, same data follows on end of ODOL v7 | ||
byte u5[139]; // unknown data , still same length as v7 | |||
Asciiz | Asciiz skeleton_name // float | ||
if ( | if (*skeleton_name) | ||
{ | { | ||
bool u6 // 8bit boolean // value 1 or 0 | |||
int bone_count | int bone_count | ||
struct bones[bone_count] | struct bones[bone_count] | ||
{ | { | ||
Asciiz bone1,bone2; | |||
} | } | ||
} | } | ||
char u7[0x26] // | char u7[0x26] // unknown data | ||
Asciiz modelclass, modelparent // I think purpose this data found values 'house''no' | |||
//house''building',.... | //house''building',.... | ||
char u8[5] // | char u8[5] // unknown data | ||
bool8 exist_anims | bool8 exist_anims | ||
if (exist_anims) | if (exist_anims) | ||
Line 45: | Line 52: | ||
struct anims[anims_count] | struct anims[anims_count] | ||
{ | { | ||
int type // 0,4,9 // rotation,move,.., i dont check it yet | int type // 0,4,9 // rotation,move,.., i dont check it yet | ||
Asciiz name,parent | |||
float tr[6]// transformations values | float tr[6] // transformations values | ||
if (type!=9) int u9 | |||
} | } | ||
} | } | ||
Line 54: | Line 61: | ||
unknowdata[unknowlength] // handle seek | unknowdata[unknowlength] // handle seek | ||
lod | struct lod[lod_count] | ||
{ | { | ||
int vertices count | int vertices count | ||
bool8 ub1 | bool8 ub1 | ||
if (ub1) char uch[11] // unknow data | if (ub1) char uch[11] // unknow data | ||
char uch[0x29] // unknow data | |||
int textures_count | int textures_count | ||
Asciiz texture[textures_count] | |||
int materials_count | int materials_count | ||
struct materials[materials_count] | struct materials[materials_count] | ||
{ | { | ||
Asciiz name | |||
char uch[0x85] // unknowdata // some float values | char uch[0x85] // unknowdata // some float values | ||
int | int textures_count | ||
struct textures_in_material[textres_count] | struct textures_in_material[textres_count] | ||
{ | { | ||
int u10 // value 3 still | int u10 // value 3 still | ||
Asciiz t_name | |||
int u11 // self increment value // 0,1,2,3,4,... | int u11 // self increment value // 0,1,2,3,4,... | ||
} | } | ||
char uch[0x34*textres_count] // some struct with same length | char uch[0x34*textres_count] // some struct with same length | ||
Line 93: | Line 100: | ||
char *name; | char *name; | ||
int selected_faces_count | int selected_faces_count | ||
ushort selected_faces[selected_faces_count] // if selected_faces_count > 0x100 | |||
// then compresed by LZ | // then compresed by LZ | ||
int u14; | int u14; | ||
ushort u15[u14] | |||
bool8 ub | bool8 ub | ||
if (ub) int u16 | if (ub) int u16 | ||
Line 102: | Line 109: | ||
bool8 ub2 | bool8 ub2 | ||
int selected_vertices_count | int selected_vertices_count | ||
ushort selected_vertices[selected_vertices_count] // if selected_vertices_count > 0x100 | |||
// then compresed by LZ | // then compresed by LZ | ||
int u17 | int u17 | ||
char uch[u17]; | char uch[u17]; | ||
} | } | ||
int named_properties_count | int named_properties_count | ||
Line 126: | Line 133: | ||
struct vertices_pos[verices_count]{float x,y,z} | struct vertices_pos[verices_count]{float x,y,z} | ||
normals and the other data follow ,but this is in progress | |||
I cannot find face.texture_index informations, in M16A4 are only 2 textures and I texture it handly by original UVsets. | I cannot find face.texture_index informations, in M16A4 are only 2 textures and I texture it handly by original UVsets. | ||
} | } |
Revision as of 08:02, 16 June 2007
The following information has been provided by BxBx
Legend int 4 bytes ulong 4 byte integer bool8 1 byte bool 0, or 1
Blocks in Odol V40 are quite similar to Odol v7 but placed in reverse order.
Resolution table, LOD tables last to first
The same LZ compression is used for LODs as ODOL v7
known data:
Beginning of file (Header signature)
struct OdolV40 {
char signature[4] //'ODOL' long format // 40 long lod_count
float resolutions[lod_count] { long u1; float u2,u3,u4 } // unknown data, same data follows on end of ODOL v7 byte u5[139]; // unknown data , still same length as v7 Asciiz skeleton_name // float
if (*skeleton_name) { bool u6 // 8bit boolean // value 1 or 0 int bone_count struct bones[bone_count] { Asciiz bone1,bone2; } }
char u7[0x26] // unknown data Asciiz modelclass, modelparent // I think purpose this data found values 'houseno' //housebuilding',.... char u8[5] // unknown data bool8 exist_anims if (exist_anims) { int anims_count struct anims[anims_count] { int type // 0,4,9 // rotation,move,.., i dont check it yet Asciiz name,parent float tr[6] // transformations values if (type!=9) int u9 } }
unknowdata[unknowlength] // handle seek
struct lod[lod_count] { int vertices count bool8 ub1 if (ub1) char uch[11] // unknow data char uch[0x29] // unknow data int textures_count Asciiz texture[textures_count] int materials_count struct materials[materials_count] { Asciiz name char uch[0x85] // unknowdata // some float values int textures_count struct textures_in_material[textres_count] { int u10 // value 3 still Asciiz t_name int u11 // self increment value // 0,1,2,3,4,... } char uch[0x34*textres_count] // some struct with same length //as textures_in_material // I dont work with material now, I skip it. } if ( textures_count>0 ) char uch[7]; bool8 ub // unknown value int faces_count char u12[6] struct faces[6] { char dot_count unsigned short dot_vertice_index[dot_count] } unknowdata[ubknowlength] int components_count struct components[components_count] { char *name; int selected_faces_count ushort selected_faces[selected_faces_count] // if selected_faces_count > 0x100 // then compresed by LZ int u14; ushort u15[u14] bool8 ub if (ub) int u16 char uch[3] bool8 ub2 int selected_vertices_count ushort selected_vertices[selected_vertices_count] // if selected_vertices_count > 0x100
// then compresed by LZ
int u17 char uch[u17]; } int named_properties_count struct named_properties[named_properties_count] { char * name,*value }
unknowdata[mostly 0x15 , but not every time]
int vertices_count // again same value bool8 ub if (ub) { struct UV[vertices_count] {float u,v} if count > 127 then LZ } else char uch[8] int u[18] int vertices_count struct vertices_pos[verices_count]{float x,y,z}
normals and the other data follow ,but this is in progress
I cannot find face.texture_index informations, in M16A4 are only 2 textures and I texture it handly by original UVsets. }