PL mesh file format (binary, Little-Endian)
PixelLight mesh format description:
MESHFILE
|
+--PLCore::uint32 nMagic
|
+--PLCore::uint32 nVersion
|
+--MATERIALS
| |
| +--PLCore::uint32 nMaterials
| |
| +--char szName[256][nMaterials]
|
+--MESH
| |
| +--PLCore::uint32 nLODLevels
| |
| +--PLCore::uint32 nMorphTargets
| |
| +--PLCore::uint32 nWeights
| |
| +--PLCore::uint32 nVertexWeights
| |
| +--LODLEVEL (*)
| | |
| | +--float fDistance
| | |
| | +--PLCore::uint32 nGeometries
| | |
| | +--PLCore::uint32 nOctreeSubdivide
| | |
| | +--PLCore::uint32 nOctreeMinGeometries
| | |
| | +--INDEXBUFFER
| | | |
| | | +--PLCore::uint32 nElementType
| | | |
| | | +--PLCore::uint32 nElements
| | | |
| | | +--PLCore::uint32 nSize;
| | | |
| | | +--... 'nElements' indices of type 'nElementType'
| | |
| | +--GEOMETRY (*)
| | | |
| | | +--char szName[64]
| | | |
| | | +--PLCore::uint32 nFlags
| | | |
| | | +--bool bActive
| | | |
| | | +--int nPrimitiveType
| | | |
| | | +--int nMaterial
| | | |
| | | +--int nStartIndex
| | | |
| | | +--int nIndexSize
| | |
| | +--... 'nGeometries' geometries
| |
| +--... 'nLODLevels' LOD levels
| |
| +--MORPHTARGET (*)
| | |
| | +--char szName
| | |
| | +--bool bRelative
| | |
| | +--PLCore::uint32 nVertexIDs
| | |
| | +--PLCore::uint32 nVertexBuffers
| | |
| | +--'nVertexIDs' vertex ID's
| | |
| | +--VERTEXBUFFER (*)
| | | |
| | | +--PLCore::uint32 nVertexAttributes
| | | |
| | | +--PLCore::uint32 nVertices
| | | |
| | | +--PLCore::uint32 nSize;
| | | |
| | | +--VERTEXATTRIBUTE (*)
| | | | |
| | | | +--int nSemantic;
| | | | |
| | | | +--int nChannel;
| | | | |
| | | | +--int nType;
| | | |
| | | +--... 'nVertexAttributes' vertex attributes
| | | |
| | | +--... 'nVertices' vertices, a vertex consists of 'nVertexAttributes' attributes
| | |
| | +--... 'nVertexBuffers' vertex buffers
| |
| +--... 'nMorphTargets' morph targets
| |
| +--WEIGHT (*)
| | |
| | +--int nJoint
| | |
| | +--float fBias
| |
| +--... 'nWeights' weights
| |
| +--VERTEXWEIGHTS (*)
| | |
| | +--PLCore::uint32 nWeights
| | |
| | +-- 'nWeights' weight indices for the vertex
| |
| +--... one vertex weight for each LOD level vertex
|
+--MORPHTARGETANIMATION (*)
| |
| +--char szName
| |
| +--PLCore::uint32 nMorphTargets
| |
| +--PLCore::uint32 nFrames
| |
| +--MORPHTARGETANIMATIONTARGET (*)
| | |
| | +-- char szName[64]
| |
| +--... 'nMorphTargets' animation morph targets
| |
| +--FRAMEKEYS (*)
| | |
| | +-- FRAMEKEY (*)
| | | |
| | | +-- float fKey
| | |
| | +--... for each animation morph target
| |
| +-... 'nFrames' frame keys
|
+--SKELETON
| |
| +--char szName
| |
| +--PLCore::uint32 nJoints
| |
| +--PLCore::uint32 nFrames
| |
| +--JOINT (*)
| | |
| | +-- char szName[64]
| | |
| | +-- int nParent
| | |
| | +-- PLCore::uint8 nAnimatedComponents
| |
| +--... 'nJoints' joints
| |
| +--BASEFRAME
| | |
| | +--JOINTSTATE (*)
| | | |
| | | +-- float fTranslation[3]
| | | |
| | | +-- float fRotation[4]
| | | |
| | | +-- float fTranslationJointSpace[3]
| | | |
| | | +-- float fRotationJointSpace[4]
| | |
| | +--... 'nJoints' joint states
| |
| +--FRAMEKEYS (*)
| | |
| | +-- FRAMEKEY (*)
| | | |
| | | +-- float fKey
| | |
| | +--... for each animated component
| |
| +-... 'nFrames' frame keys
|
+--ANCHORPOINTS
| |
| +--PLCore::uint32 nAnchorPoints
| |
| +--ANCHORPOINT (*)
| | |
| | +-- char szName[64]
| | |
| | +-- bool bType
| | |
| | +-- int nID
| |
| +--... 'nAnchorPoints' anchor points
|
+--ANIMATIONS
| |
| +--PLCore::uint32 nAnimations
| |
| +--ANIMATION (*)
| | |
| | +--char szName[64]
| | |
| | +--int nType
| | |
| | +--int nStart
| | |
| | +--int nEnd
| | |
| | +--float fSpeed
| | |
| | +--PLCore::uint32 nFlags
| | |
| | +--int nEvents
| | |
| | +--ANIMATION_FRAMES
| | | |
| | | +--ANIMATION_FRAME (*)
| | | | |
| | | | +--float fSpeed
| | | |
| | | +--... |nEnd-nStart| animation frames
| | |
| | +--ANIMATION_EVENTS
| | |
| | +--ANIMATION_EVENT (*)
| | | |
| | | +--int nID
| | | |
| | | +--int nFrame
| | |
| | +--... 'nEvents' animation events
| |
| +--MESHBOUNDINGBOX (*)
| | |
| | +--float fMin[3]
| | |
| | +--float fMax[3]
| |
| +--...
|