P3D Model Info

From Bohemia Interactive Community
Jump to navigation Jump to search

Template:unsupported-doc

The Model Info structure is last in file for ODOL7 (ofp) and at top of file for Arma 2 ODOL4x

ModelInfo
{
  float      LodTypes[Header.NoOfLods];// alias resolutions
  ulong      Index;                    // appears to be a bit flag, 512, 256 eg
  float      Sphere1;
  float      Sphere2;                  // mostly same as Sphere1
  ulong      PointFlags[3];            // typically 00 00 00 00  00 00 00 00 00 00 0C 00 eg (last is same as user point flags)
  XYZTriplet Offset;                   // model offset (unknown functionality),//mostly same as offset2
  ulong      mapIconColor;             // RGBA 32 color
  ulong      mapSelectedColor;         // RGBA 32 color
  ulong      UnknownColor;             // ODOLV7 
  float      ViewDensity;              // ODOL4x
  XYZTriplet bboxMinPosition;          // minimum coordinates of bounding box
  XYZTriplet bboxMaxPosition;          // maximum coordinates of bounding box. Generally the complement of the 1st
                                       // Resolution&GeometryBounds in Pew is bboxMinPosition-bboxMaxPosition for X and Z
  XYZTriplet WrpModelOffset;           // Resolution&GeometryAutoCenterPos in pew
  XYZTriplet Offset2;                  // mostly same as Offset often same as ModelCentreOfGravity
  XYZTriplet ModelCentreOfGravity;     //
  XYZTriplet ModelMassVectors[3];      // for ODOL7 this is a mixture of floats and index values
  ///////////// ODOLV4xONLY /////////////
  byte  AutoCenter,
        lockAutoCenter,
        canOcclude,
        canBeOccluded,
        allowAnimation;
  ///////////////////////////////////////
  bytes      UnknownFlags[6];          // typically 01 00 00 01 00 16
  ///////      ODOLV7 ONLY //////////////
  ulong      Count;
  float      Array[Count];             // potentially lzss compressed
  float      Mass;                     //
  XYZTriplet Unknown1;                 // almost consistently  F9 02 15 50 : 00 00 48 43 : 0A D7 A3 3B ... 1e14, 200.0, 0.005
  ulong      Unknown2[3];              // generally FF FF FF FF FF FF FF FF FF FF FF FF
  ///////////////////////////////////////
   byte      ThermalProfile[24];       //ODOLV43,47,48 & VBS2 
   ulong     UnknownLong;              //ODOLV48 only
  }
}

LodTypes

LodTypes are resolutions. Most of them have humanly readable context such as the 'memory' lod. And are selected as such in Oxygen. The are consequently referred to here as 'LodTypes', since the floating point values, although relevant to the engine, are not as immediately apparent to a human.

  • Lods in the file are highest to lowest. The lowest resolution (eg. Resolution 1.0) will be the last in the file.
  • Start and ending addresses are random (not sorted). The LodTypes array declares which Lod an address-pair is referring to.

Thus, if the first Lodtype entry(eg) specifies a resolution of 1.0e13 (a geometry lod), that lod is located via the 1st Starting address. It is NOT, necessarily, the 1st lod in the file.


Resolution Values

Hex Float Decimal Description
<1,000 Graphical Lod
Functional Lods
0x447a0000 1.0e3 1,000 View Gunner
0x44898000 1.1e3 1,100 View Pilot
0x44960000 1.2e3 1,200 View Cargo
"" "" Shadow Lods
0x461c4000 1.0e4 10,000 Stencil Shadow
0x461c6800 1.001e4 10,010 Stencil Shadow 2
0x462be000 1.1e4 11000 Shadow Volume
0x462c0800 1.101e4 11010 Shadow Volume 2
0x551184e7 1.0e13 10,000,000,000,000 Geometry
0x58635fa9 1.0e15 1,000,000,000,000,000 Memory
0x58e35fa9 2.0e15 2,000,000,000,000,000 Land Contact
0x592a87bf 3.0e15 3,000,000,000,000,000 Roadway
0x59635fa9 4.0e15 4,000,000,000,000,000 Paths
0x598e1bca 5.0e15 5,000,000,000,000,000 HitPoints
0x59aa87bf 6.0e15 6,000,000,000,000,000 View Geometry
0x59c6f3b4 7.0e15 7,000,000,000,000,000 Fire Geometry
0x59e35fa9 8.0e15 8,000,000,000,000,000 View Cargo Geometry
0x59ffcb9e 9.0e15 9,000,000,000,000,000 View Cargo Fire Geometry
0x5a0e1bca 1.0e16 10,000,000,000,000,000 View Commander
0x5a1c51c4 1.1e16 11,000,000,000,000,000 View Commander Geometry
0x5a2a87bf 1.2e16 12,000,000,000,000,000 View Commander Fire Geometry
0x5a38bdb9 1.3e16 13,000,000,000,000,000 View Pilot Geometry
0x5a46f3b4 1.4e16 14,000,000,000,000,000 View Pilot Fire Geometry
0x5a5529af 1.5e16 15,000,000,000,000,000 View Gunner Geometry
0x5a635fa9 1.6e16 16,000,000,000,000,000 View Gunner Fire Geometry
0x5a7195a4 1.7e16 17,000,000,000,000,000 Sub Parts


If the value is below 1000.0, then the LOD is supposed to be a graphical LOD. If the value equals or is above 10000.0 and is not one of the functional LODs, it is a shadow LOD.



Related Page(s)

Model File Formats