Fandom

武装突袭 Wiki

P3D File Format - ODOLV7

简体 | 繁體

4,827个页面创建
于此维基上
添加新页面
评论0 分享

您使用了广告屏蔽软件!


Wikia通过广告运营为用户提供免费的服务。我们对用户通过嵌入广告屏蔽软件访问网站进行了使用调整。

如果您使用了广告屏蔽软件,将无法使用我们的服务。请您移除广告屏蔽软件,以确保页面正常加载。

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.


General编辑

Legend编辑

see Generic FileFormat Data Types

CompressedStructures编辑

(potentially) compressed arrays are endemic to most blocks contained in a p3d.

CompressedStruct
{
  ulong  Count;
  <type> Array[Count];
};


if Count * sizeof(<type>) exceeds 1023 bytes the array is compressed. The resulting array will be expanded using lzh compression exactly as found in pbo's (for instance)

After de-compression, the Count remains the same because it is a count of the arraytype.

For uncompressed arrays (byte count < 1024) the Count and data are treated 'as is'.


Thus for various Array <types>

  • ulong Array: > 255 // 1024 / sizeof(ulong)
  • float thing[2]: > 127 // 1024 / 2*sizeof(float)
  • SomeStructure: > // count * sizeof (SomeStructure) > 1023


Note that potentially compressed arrays in these structures only have an known output length. the decompressor therefore must work on infinite input length.


Odol7Stuct编辑

ODOLV7
{
  StandardP3DHeader Header;
  LodStruct         Lods[Header.LodCount];
  ModelInfo         ModelInfo;
};

StandardP3DHeader编辑

StandardP3DHeader
{
  char      Signature[4];      //"ODOL" (vs MLOD eg)
  ulong     Version;           // 7
  ulong     LodCount;          // at least one
}

LodStruct编辑

LodStruct
{
 VertexTable    VertexTable;
 float          UnknownFloat1;
 float          UnknownFloat2;
 XYZTriplet     MinPos;
 XYZTriplet     MaxPos;
 XYZTriplet     AutoCenterPos;
 float          UnknownFloat3;
 Textures       Textures;
 LodEdges       LodEdges;         
 ulong          NoOfFaces;
 ulong          OffsetToLodSections;
 LodFace        LodFaces[NoOfFaces];               // ie polygons
 ulong          nSections;
 LODSection     LODSections[nSections];
 ulong          nNamedSelections;
 NamedSelection NamedSelections[nNamedSelections];
 ulong          nTokens;
 NamedProperty  NamedProperties[nTokens];
 ulong          nFrames;
 Frame          Frames[nFrames]; 
 ulong          IconColor;
 ulong          SelectedColor;
 ulong          Unknown;
 ulong          nProxies;
 LodProxy       LodProxies[nProxies];
};

VertexTable编辑

 struct
 { 
   ulong       Count;              
   ulong       PointFlags[Count];  // compressed. see P3D Point and Face Flags
   ulong       Count;             
   UVPair      UV1[Count];         // compressed 
   ulong       Count;              
   XYZTriplet  Points[Count];      // UNcompressed
   ulong       Count;             
   XYZTriplet  Normals[Count];     // UNcompressed
 }
  • Count is the same value for all four tables.

Textures编辑

 struct
 {
  ulong  Count;
  asciiz Textures[...];          // "data/1.paa\0data/2.paa\0"...
 }

Count corresponds to the number of concatenated strings. It is required, since, architecturally at least, one of more of the asciiz strings could be null.


NamedProperty编辑

 struct
 {
    Asciiz Property;// "noshadow" = "1" eg
    Asciiz Value;
 }


Related Page(s)编辑

LZ in ODOL编辑

see Compressed LZSS File Format

Model File Formats

更多维基

随机维基