P3D Lod Frames

From Bohemia Interactive Community
Revision as of 08:04, 19 May 2010 by Mikero (talk | contribs) (whoops)
Jump to navigation Jump to search

Template:unsupported-doc

Frames are Animation times. They are associated with RTM files and contain condensed information from them.

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 ODOL7 the structure is contained in the Lod itself.

Lod Frames

LodFrame

   Frame
   {
     float      FrameTime;
     /////// SP3X ONLY///////////
     ulong      nBones;        // Must be the same as the LOD's NoOfPoints
     ////////////////////////////
     XYZTriplet BonePos[nBones];
   }[nFrames];
  • ODOL7:nFrames = Lod.nFrames
  • 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 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)


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.