P3D Lod Frames: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(whoops)
No edit summary
Line 1: Line 1:
{{unsupported-doc}}
{{unsupported-doc}}


Frames are Animation times. They are associated with [[Rtm (Animation) File Format|RTM files]] and contain condensed information from them.
Frames are Animation times. They are similar in nature to [[Rtm (Animation) File Format|RTM files]].


Only specific models have them, and, they are found only in certain [[P3D Model Info#LodTypes|Lod Types]] of that P3D.
Only specific models have them, and, they are found only in certain [[P3D Model Info#LodTypes|Lod Types]] of that P3D.


*In MLOD the structure is contained in the [[P3D File Format - MLOD#Animation#| #Animation# TaggSet]] of the lod
*In MLOD the structure is contained in the [[P3D File Format - MLOD#Animation#| #Animation# TaggSet]] of the lod
*In ODOL7 the structure is contained in the [[P3D File Format - ODOLV7#LodStruct|Lod]] itself.
*In ODOL the structure is contained in the [[P3D File Format - ODOLV7#LodStruct|Lod]] itself.


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


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


    Frame
=ODOLFrames=
    {
struct
      float      FrameTime;
{
      /////// SP3X ONLY///////////
  ulong      nFrames;
      ulong      nBones;       // Must be the same as the LOD's NoOfPoints
  LodFrame  LodFrames[nFrames];
      ////////////////////////////
}
      XYZTriplet BonePos[nBones];
==LodFrame==
    }[nFrames];
struct
{
  float      FrameTime;
  ulong      nBones;  
  XYZTriplet BonePositions[nBones];
}


*ODOL7:nFrames = Lod.nFrames
==MLODTaggFrame==
struct
{
  ulong      nBytes;
  float      FrameTime;
  XYZTriplet BonePositions[nBones];//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


nBones is always = the Lod's NoOfPoints
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 triplets, any of which are same count as the lod's NoOfPoints.
 
Any.nBones.Any.Frame == lod.NoOfPoints
 
nBones either supplied directly for SP3X (and is redundant), or,
 
nBones in any Mlod TaggStuct can additionally be calculated as:
 
*P3DM: nbytes=sizeof(float)+Lod.NoOfPoints*sizeof(XYZTriplet)
*SP3X: nbytes=sizeof(float)+sizeof(ulong)+Lod.NoOfPoints*sizeof(XYZTriplet)
 


In the specific case of ODOL7 the nLodPoints in the VertexTable is also the same.
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.

Revision as of 17:57, 19 May 2010

Template:unsupported-doc

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];//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).

In the specific case of ODOL7 the nLodPoints in the VertexTable is also the same. 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.

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.