P3D File Format - ODOLV40 Obsolete: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(1st raw save)
 
m (Text replacement - "{{ExternalLink|" to "{{Link|")
 
(18 intermediate revisions by 6 users not shown)
Line 1: Line 1:
The following information has been provided by BxBx
{{Feature|UnsupportedDoc}}


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
The following information has been provided by BxBx and included by Mikero


known data:
== Legend ==
''//Legend
''//byte = 1 char = 8 bits
''//int = 4 byte = 32 bits; signed integer
''//ulong = unsigned long, 4 bytes
''//ushort = unsigned short 2 bytes
''//asciiz = variable length zero terminated string.
''//float = 4 bytes (single precision)
''//bool8 = 1 byte = 8 bits; boolean; 0 or 1


char signature[4]  //'ODOL'
int format  // 40
int lod_count
float resolutions[lod_count]
{
int u1;
float u2,u3,u4
} // unknow data, same data follows on end of ODOL v7


char u5[139] // unknow data , still same length
== basics ==
char *sceletonname // float zeroendded char array
 
if (char[0]!=0)
{
Blocks in Odol V40 are quite similar to Odol v7 but placed in reverse order.
  bool8 u6 // 8bit boolean // value 1 or 0
   
  int bone_count
  Resolution table,
  struct bones[bone_count]
  LOD tables last to first
   {
    
    char * bone1,bone2 //strings
The same LZ compression is used for LODs as ODOL v7
  }  
   
}
known data:
char u7[0x26] // unknow data
char *modelclass, *modelparent // I think of purpose this data found values 'house''no' or 'house''building',....  
Beginning of file (Header signature)
char u8[5] // unknowd data
   
bool8 exist_anims
 
if (exist_anims)
== HeaderTop ==
 
struct OdolV40
  {
  {
  int anims_count
  char signature[4] ''//''ODOL''
struct anims[anims_count]
long Version        ''//0x28, 40 dec
  {
  long lod_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
== other ==
{
int vertices count
float resolutions[lod_count]
bool8 ub1
{
if (ub1) char uch[11] // unknow data
  long  u1;
cha uch[0x29]   // unknow data
  float u2,u3,u4
int textures_count
  } ''// unknown data, same data follows on end of ODOL v7
char * texture[textures_count]
int materials_count
byte  u5[139];      ''// unknown data , still same length as v7
struct materials[materials_count]
Asciiz skeleton_name ''// Note: A Skeleton may not exist
if (*skeleton_name)
  {
  {
   char * name
   bool    u6 // 8bit boolean // value 1 or 0
  char uch[0x85] // unknowdata // some float values
   int     bone_count
   int textres_count
   struct bones[bone_count]
   struct textures_in_material[textres_count]
  {
  {
     Asciiz bone1,bone2;
     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
char u7[0x26]     ''// unknown data
int faces_count
Asciiz modelclass, modelparent ''// I think purpose this data found values 'house''no'
char u12[6]
                                ''//house''building',.... 
struct faces[6]
char u8[5]       ''// unknown data
bool8 exist_anims
if (exist_anims)
  {
  {
   char dot_count
   int anims_count
   unsigned short dot_vertice_index[dot_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[ubknowlength]
unknowdata[unknowlength] ''// handle seek
int components_count
struct components[components_count]
struct lod[lod_count]
  {
  {
   char *name;
   int    vertices count
   int selected_faces_count
  bool8  ub1
   unsign short selected_faces[selected_faces_count] // if selected_faces_count > 0x100 then compresed by LZ
  if (ub1) char uch[11]  // unknow data
  int u14;
  char    uch[0x29]  // unknow data
  unsign short u15[u14]
  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
   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}
normals and the other data follow ,but this is in progress
  }
  }
int named_properties_count
I cannot find face.texture_index information, in M16A4 are only 2 textures and I texture it handly by original UVsets.
struct named_properties[named_properties_count]
 
  {
==== links ====
char * name,*value
  1st ARMA MLOD {{Link|link= http://www.flashpoint1985.com/cgi-bin/ikonboard311/ikonboard.cgi?s=33da82892e475977188fcee7f913b54f;act=ST;f=76;t=64271|text= M16A4 on BIForum}}
}
  OFP [[ODOL|ODOLv7]]  
unknowdata[mostly 0x15 , but not every time]
  More about LZ compresion [[ODOL|ODOLv7]]
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
[[Category:BIS_File_Formats]]
I cannot find face.texture_index informations, in M16A4 are only 2 textures and I texture it handly by original UVsets.
{{GameCategory|arma1|File Formats}}
}

Latest revision as of 17:24, 4 January 2023

bi symbol white.png
Disclaimer: This page describes internal undocumented structures of Bohemia Interactive software.

This page contains unofficial information.

Some usage of this information may constitute a violation of the rights of Bohemia Interactive and is in no way endorsed or recommended by Bohemia Interactive.
Bohemia Interactive is not willing to tolerate use of such tools if it contravenes any general licenses granted to end users of this community wiki or BI products.

The following information has been provided by BxBx and included by Mikero

Legend

//Legend 
//byte = 1 char = 8 bits 
//int = 4 byte = 32 bits; signed integer
//ulong = unsigned long, 4 bytes 
//ushort = unsigned short 2 bytes 
//asciiz = variable length zero terminated string. 
//float = 4 bytes (single precision)
//bool8 = 1 byte = 8 bits; boolean; 0 or 1


basics

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)

HeaderTop

struct OdolV40
{
char signature[4]  //ODOL
long Version        //0x28, 40 dec
long lod_count


other

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 // Note: A Skeleton may not exist 
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 information, in M16A4 are only 2 textures and I texture it handly by original UVsets.

links

1st ARMA MLOD M16A4 on BIForum (dead link)
OFP ODOLv7 
More about LZ compresion ODOLv7