P3D File Format - ODOLV40 Obsolete: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(1st raw save)
 
mNo edit summary
Line 1: Line 1:
The following information has been provided by BxBx
The following information has been provided by BxBx


blocks in odol v4 are quite similar to odol v7 but placed in back direction , (first is relolution table, LOD are placed from last to first ),there is same LZ compresion as ODOL v7
Blocks in Odol v4 are quite similar to Odol v7 but placed in reverse order.
 
relolution table,  
  LOD last to first
For the Lods there is same LZ compresion as ODOL v7


known data:
known data:


char signature[4]  //'ODOL'
Beginning of file (Header signature)
int format  // 40
 
int lod_count
char signature[4]  //'ODOL'
float resolutions[lod_count]
long format  // 40
{
long lod_count
int u1;
 
float u2,u3,u4
float resolutions[lod_count]
} // unknow data, same data follows on end of ODOL v7
{
  long  u1;
  float u2,u3,u4
} // unknown data, same data follows on end of ODOL v7
char u5[139] // unknown data , still same length
Asciiz *sceletonname // float zeroendded char array


char u5[139] // unknow data , still same length
if (char[0]!=0)
char *sceletonname // float zeroendded char array
{
if (char[0]!=0)
  bool8 u6 // 8bit boolean // value 1 or 0
{
  int bone_count
bool8 u6 // 8bit boolean // value 1 or 0
  struct bones[bone_count]
int bone_count
struct bones[bone_count]
   {
   {
     char * bone1,bone2 //strings
     char * bone1,bone2 //strings
   }   
   }   
}
}
char u7[0x26] // unknow data
 
char *modelclass, *modelparent // I think of purpose this data found values 'house''no' or 'house''building',....   
char u7[0x26] // unknow data
char u8[5] // unknowd data
char *modelclass, *modelparent // I think of purpose this data found values 'house''no'  
bool8 exist_anims
                              //house''building',....   
if (exist_anims)
char u8[5] // unknowd data
bool8 exist_anims
if (exist_anims)
  {
  {
int anims_count
  int anims_count
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
     char *name,*parent
     char *name,*parent
     float tr[6]// transformations values
     float tr[6]// transformations values
     if (type!=9) int u9
     if (type!=9) int u9
  }
  }
  }
  }


unknowdata[unknowlength] // handle seek
unknowdata[unknowlength] // handle seek


lod
lod
{
int vertices count
bool8 ub1
if (ub1) char uch[11]  // unknow data
cha uch[0x29]  // unknow data
int textures_count
char * texture[textures_count]
int materials_count
struct materials[materials_count]
  {
  {
   char * name
   int vertices count
  char uch[0x85] // unknowdata // some float values
  bool8 ub1
  int textres_count
  if (ub1) char uch[11]  // unknow data
  struct textures_in_material[textres_count]
  cha uch[0x29]  // unknow data
  int textures_count
  char * texture[textures_count]
  int materials_count
  struct materials[materials_count]
  {
  char * name
  char uch[0x85] // unknowdata // some float values
  int textres_count
  struct textures_in_material[textres_count]
   {
   {
     int u10 // value 3 still
     int u10 // value 3 still
Line 63: Line 74:
     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 as textures_in_material // I dont work with material now, I skip it.
  char uch[0x34*textres_count] // some struct with same length  
}
        //as textures_in_material  
if ( textures_count>0 ) char uch[7];
        // I dont work with material now, I skip it.
bool8 ub // unknown value
  }
int faces_count
  if ( textures_count>0 ) char uch[7];
char u12[6]
  bool8 ub // unknown value
struct faces[6]
  int faces_count
{
  char u12[6]
  char dot_count
  struct faces[6]
  unsigned short dot_vertice_index[dot_count]
  {
  }
  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
  unsign short selected_faces[selected_faces_count] // if selected_faces_count > 0x100
          // then compresed by LZ
  int u14;
  unsign short u15[u14]
  bool8 ub
  if (ub) int u16
  char uch[3]
  bool8 ub2
  int selected_vertices_count
  unsign short 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]


unknowdata[ubknowlength]
   int vertices_count // again same value
int components_count
struct components[components_count]
{
  char *name;
   int selected_faces_count
  unsign short selected_faces[selected_faces_count] // if selected_faces_count > 0x100  then compresed by LZ
  int u14;
  unsign short u15[u14]
   bool8 ub
   bool8 ub
   if (ub) int u16
   if (ub)
  char uch[3]
   {
  bool8 ub2
    struct UV[vertices_count] {float u,v} if count > 127 then LZ
  int selected_vertices_count
  }
  unsign short selected_vertices[selected_vertices_count] // if selected_vertices_count > 0x100  then compresed by LZ
  else char uch[8]
  int u17
  int u[18]
   char uch[u17];
  int vertices_count
}
  struct vertices_pos[verices_count]{float x,y,z}
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}


follows normals and the other data ,but this is in progress
follows normals and the other data ,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 00:31, 16 June 2007

The following information has been provided by BxBx

Blocks in Odol v4 are quite similar to Odol v7 but placed in reverse order.

relolution table, 
 LOD last to first

For the Lods there is same LZ compresion as ODOL v7

known data:

Beginning of file (Header signature)

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

char u5[139] // unknown data , still same length
Asciiz *sceletonname // float zeroendded char array
if (char[0]!=0)
{
 bool8 u6 // 8bit boolean // value 1 or 0
 int bone_count
 struct bones[bone_count]
 {
   char * bone1,bone2 //strings
 }  
}
char u7[0x26] // unknow data
char *modelclass, *modelparent // I think of purpose this data found values 'houseno' 
                              //housebuilding',....  
char u8[5] // unknowd 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
   char *name,*parent
   float tr[6]// transformations values
    if (type!=9) int u9
 }
}
unknowdata[unknowlength] // handle seek
lod
{
 int vertices count 
 bool8 ub1
 if (ub1) char uch[11]  // unknow data
 cha uch[0x29]   // unknow data
 int textures_count
 char * texture[textures_count]
 int materials_count
 struct materials[materials_count]
 {
  char * name
  char uch[0x85] // unknowdata // some float values
  int textres_count
  struct textures_in_material[textres_count]
  {
   int u10 // value 3 still
   char* 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
  unsign short selected_faces[selected_faces_count] // if selected_faces_count > 0x100 
          // then compresed by LZ
  int u14;
  unsign short u15[u14]
  bool8 ub
  if (ub) int u16
  char uch[3]
  bool8 ub2
  int selected_vertices_count
  unsign short 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}

follows normals and the other data ,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. }