P3D Lod Frames: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
m (Text replacement - " (\=+)([a-zA-Z0-9][^ ]+[a-zA-Z0-9])(\=+) " to " $1 $2 $3 ")
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{unsupported-doc}}
{{Feature|UnsupportedDoc}}


Frames are Animation times. They are similar in nature to [[Rtm (Animation) File Format|RTM files]].
Frames are Animation times. They are similar in nature to [[Rtm (Animation) File Format|RTM files]].
Line 12: Line 12:
Very few models in the official addons for arma1 and arma2 have these frames. Only RacekT.p3d eg
Very few models in the official addons for arma1 and arma2 have these frames. Only RacekT.p3d eg


=ODOLFrames=
= ODOLFrames =
  struct
  struct
  {
  {
Line 18: Line 18:
   LodFrame  LodFrames[nFrames];
   LodFrame  LodFrames[nFrames];
  }
  }
==LodFrame==
== LodFrame ==
  struct
  struct
  {
  {
   float      FrameTime;
   float      FrameTime;
   ulong      nBones;  
   ulong      nBones;
   XYZTriplet BonePositions[nBones];
   XYZTriplet BonePositions[nBones];
  }
  }


==MLODTaggFrame==
== MLODTaggFrame ==
  struct
  struct
  {
  {
   ulong      nBytes;
   ulong      nBytes;
   float      FrameTime;
   float      FrameTime;
   XYZTriplet BonePositions[nBones];//nBones = (nBytes-sizeof(float)) / sizeof(XYZTriplet)
   XYZTriplet BonePositions[nBones];
  }
  }
*MLOD: nBones = (nBytes-sizeof(float)) / sizeof(XYZTriplet)
*MLOD: nFrames = as many #Animation#s as are in the TaggStruct
*MLOD: nFrames = as many #Animation#s as are in the TaggStruct
<hr>
For any lod that has them, there are a contiguous series of Frames making up the total. Each one has an identical number of bones (triplets).


For any lod that has them, there are a contiguous series of Frames making up the total. Each one has an identical number of bones (triplets).
For ODOL7 and both types of MLOD, the nLodPoints in the VertexTable is also the same as the nBones.


In the specific case of ODOL7 the nLodPoints in the VertexTable is also the same.
For Arma, there are no Vertexes in this lod, hence no LodPoints
For Arma, there are no Vertexes in this lod.


NB: There will be 1 'Animation' chunk per Frame. This can result in VERY large p3dm mlod models. A model with three thousand (3,000) odd frames (eg. ActsPercMstpSnonWnonDnon_DancingStefan.rtm) will be approx. 200 Megabytes on disk.
NB: There will be 1 'Animation' chunk per Frame. This can result in VERY large p3dm mlod models. A model with three thousand (3,000) odd frames (eg. ActsPercMstpSnonWnonDnon_DancingStefan.rtm) will be approx. 200 Megabytes on disk.

Latest revision as of 15:39, 17 November 2021

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.

Frames are Animation times. They are similar in nature to RTM files.

Only specific models have them, and, they are found only in certain Lod Types of that P3D.

  • In MLOD the structure is contained in the #Animation# TaggSet of the lod
  • In ODOL the structure is contained in the Lod itself.

Animated Frames are NOT to be confused with ODOLV4x (ARMA) Animation structures. Animation structures are used with skeletons.

Very few models in the official addons for arma1 and arma2 have these frames. Only RacekT.p3d eg

ODOLFrames

struct
{
  ulong      nFrames;
  LodFrame   LodFrames[nFrames];
}

LodFrame

struct
{
 float      FrameTime;
 ulong      nBones;
 XYZTriplet BonePositions[nBones];
}

MLODTaggFrame

struct
{
 ulong      nBytes;
 float      FrameTime;
 XYZTriplet BonePositions[nBones];
}
  • MLOD: nBones = (nBytes-sizeof(float)) / sizeof(XYZTriplet)
  • MLOD: nFrames = as many #Animation#s as are in the TaggStruct

For any lod that has them, there are a contiguous series of Frames making up the total. Each one has an identical number of bones (triplets).

For ODOL7 and both types of MLOD, the nLodPoints in the VertexTable is also the same as the nBones.

For Arma, there are no Vertexes in this lod, hence no LodPoints

NB: There will be 1 'Animation' chunk per Frame. This can result in VERY large p3dm mlod models. A model with three thousand (3,000) odd frames (eg. ActsPercMstpSnonWnonDnon_DancingStefan.rtm) will be approx. 200 Megabytes on disk.

This type of data format for Animation is commonly known as a 'Point Cache' or an 'MDD Point Cache'. It describes the exact location of every point in the LOD in 3D 'Model Space' for each frame.