P3D Lod Frames: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
 
(whoops)
Line 11: Line 11:


===LodFrame===
===LodFrame===
     Frame
     Frame
     {
     {
       float      FrameTime;
       float      FrameTime;
       /////// SP3X ONLY///////////
       /////// SP3X ONLY///////////
       ulong      nBones;        //// Must be the same as the LOD's NoOfPoints. same as any  VertexTable.Count, in particular the Points Count
       ulong      nBones;        // Must be the same as the LOD's NoOfPoints
       ////////////////////////////
       ////////////////////////////
       XYZTriplet BonePos[nBones];
       XYZTriplet BonePos[nBones];
     }[nFrames];
     }[nFrames];


*ODOL7: nFrames = Lod.nFrames (== Lod.NoOfPoints anyway)
*ODOL7:nFrames = Lod.nFrames
*MLOD: nFrames = Lod.NoOfPoints
*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.


Equivalently, the nBytes in a Taggstruct (MLOD) must be
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)
*P3DM: nbytes=sizeof(float)+Lod.NoOfPoints*sizeof(XYZTriplet)
*SP3X: nbytes=sizeof(float)+sizeof(ulong)+Lod.NoOfPoints*sizeof(XYZTriplet)
*SP3X: nbytes=sizeof(float)+sizeof(ulong)+Lod.NoOfPoints*sizeof(XYZTriplet)


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.


AnynFramesInLod == AnyOthernFramesInLod == lod.NoOfPoints


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 08:04, 19 May 2010

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.