Difference between revisions of "Skin PLG (RW Section)"

From GTAMods Wiki
Jump to navigation Jump to search
m (Structure)
m (Updated outdated information.)
Line 3: Line 3:
 
Skin is an additional RenderWare plugin for [[Geometry (RW Section)|geometry]] section. It is used to hold information about skinned model.
 
Skin is an additional RenderWare plugin for [[Geometry (RW Section)|geometry]] section. It is used to hold information about skinned model.
 
==Structure==
 
==Structure==
  BYTE            numBones
+
  BYTE            numBones (numMatrices)
  BYTE            numBoneIds
+
  BYTE            numUsedBones
  WORD            maxNumWeightsPerVertex
+
  WORD            maxWeightsPerVertex
  BYTE            boneIds[numBoneIds]
+
  BYTE            bonesUsed[numUsedBones]
  BYTE            vertexBoneIndices[numGeometryVertices][4]
+
  BYTE            vertexBoneIndices[numVertices][4]
  FLOAT          vertexBoneWeights[numGeometryVertices][4]
+
  FLOAT          vertexBoneWeights[numVertices][4]
  FLOAT          skinToBoneMatrices[numBones][4][4]
+
  FLOAT          skinToBoneMatrices[numMatrices][4][4]
 
  // Split Data
 
  // Split Data
 
  DWORD          boneLimit
 
  DWORD          boneLimit
Line 15: Line 15:
 
  DWORD          numRLE  
 
  DWORD          numRLE  
 
  // if numMeshes > 0
 
  // if numMeshes > 0
  BYTE            meshBoneRemapIndices[numBones + 2 * (numRLE + numMeshes)]
+
  BYTE            meshBoneRemapIndices[numBones]
'''numBones'''
+
WORD            meshBoneRLECount[numMeshes]
 +
WORD            meshBoneRLE[numRLE]
 +
'''numBones (numMatrices)'''
  
'''numBoneIds'''
+
Number of bones attached to the skin, also the number of inverse matrices (see '''skinToBoneMatrices''').
  
'''maxNumWeightsPerVertex'''
+
'''numUsedBones'''
  
'''boneIds'''
+
Number of bones which influence vertices, that is those bones which have at least a non-zero weight.
 +
 
 +
'''maxWeightsPerVertex'''
 +
 
 +
Overall number of maximum non-zero weights per vertex.
 +
 
 +
'''bonesUsed'''
 +
 
 +
Indices list of the significant bones connected to the skin (see '''numUsedBones''').
  
 
'''vertexBoneIndices'''
 
'''vertexBoneIndices'''
Line 34: Line 44:
 
'''skinToBoneMatrices'''
 
'''skinToBoneMatrices'''
  
These are inverted matrices represented with RwMatrix structure.
+
These are inverse matrices represented with RwMatrix structure.
  
 
'''boneLimit'''
 
'''boneLimit'''
Line 43: Line 53:
  
 
'''meshBoneRemapIndices'''
 
'''meshBoneRemapIndices'''
 +
 +
'''meshBoneRLECount'''
 +
 +
'''meshBoneRLE'''

Revision as of 14:06, 20 June 2015

{{{NAME}}}
RenderWare Stream Section
Vendor {{{VENDORNAME}}}
Module {{{MODULENAME}}}
Module ID 0x{{{MODULEID}}}
Identifier 0x{{{IDENTIFIER}}}
Chunk ID 0x{{{MODULEID}}}{{{IDENTIFIER}}}
Versions All
Hierarchy
Parents:
None
Children:
None
Extensions:
None
File Format

Skin is an additional RenderWare plugin for geometry section. It is used to hold information about skinned model.

Structure

BYTE            numBones (numMatrices)
BYTE            numUsedBones
WORD            maxWeightsPerVertex
BYTE            bonesUsed[numUsedBones]
BYTE            vertexBoneIndices[numVertices][4]
FLOAT           vertexBoneWeights[numVertices][4]
FLOAT           skinToBoneMatrices[numMatrices][4][4]
// Split Data
DWORD           boneLimit
DWORD           numMeshes
DWORD           numRLE 
// if numMeshes > 0
BYTE            meshBoneRemapIndices[numBones]
WORD            meshBoneRLECount[numMeshes]
WORD            meshBoneRLE[numRLE]

numBones (numMatrices)

Number of bones attached to the skin, also the number of inverse matrices (see skinToBoneMatrices).

numUsedBones

Number of bones which influence vertices, that is those bones which have at least a non-zero weight.

maxWeightsPerVertex

Overall number of maximum non-zero weights per vertex.

bonesUsed

Indices list of the significant bones connected to the skin (see numUsedBones).

vertexBoneIndices

Vertex bone indices are represented with 4 bone indices per each vertex.

vertexBoneWeights

Vertex bone weights are represented with RwMatrixWeights structure per each vertex.

skinToBoneMatrices

These are inverse matrices represented with RwMatrix structure.

boneLimit

numMeshes

numRLE

meshBoneRemapIndices

meshBoneRLECount

meshBoneRLE