Difference between revisions of "HAnim PLG (RW Section)"
Jump to navigation
Jump to search
m |
|||
Line 8: | Line 8: | ||
Each section gets started by some general information: | Each section gets started by some general information: | ||
− | 4b - RwUInt32 hAnimVersion - animation's version format (in all GTAs - 1.0 (0x100)) | + | <font face="consolas">4b - RwUInt32 hAnimVersion - animation's version format (in all GTAs - 1.0 (0x100)) |
− | 4b - RwUInt32 nodeId - user Id for this bone | + | 4b - RwUInt32 nodeId - user Id for this bone |
− | 4b - RwUInt32 numNodes - number of bones in hierarchy (if this bone is a root bone; for all other bones this parameter is set to 0) | + | 4b - RwUInt32 numNodes - number of bones in hierarchy (if this bone is a root bone; for all other bones this parameter is set to 0)</font> |
If there are any affected bones then there are two more values following: | If there are any affected bones then there are two more values following: | ||
− | + | <font face="consolas">4b - RwUInt32 flags - flags for hierarchy animation | |
− | 4b - RwUInt32 keyFrameSize - size of data (in bytes) needed for one animaton frame (in GTA this parameter is equal to 36) | + | 4b - RwUInt32 keyFrameSize - size of data (in bytes) needed for one animaton frame (in GTA this parameter is equal to 36)</font> |
Those values are followed by an array of bone information. It's size gets defined above. | Those values are followed by an array of bone information. It's size gets defined above. | ||
− | + | <font face="consolas">4b - RwUInt32 nodeId - user Id for this bone | |
4b - RwUInt32 nodeIndex - bone index in this array | 4b - RwUInt32 nodeIndex - bone index in this array | ||
− | 4b - RwUInt32 flags - bone flags | + | 4b - RwUInt32 flags - bone flags</font> |
== Hierarchy animation flags == | == Hierarchy animation flags == | ||
These flags are a set of parameters to create and update the hierarchy. | These flags are a set of parameters to create and update the hierarchy. | ||
− | <font face="consolas"> | + | <font face="consolas"> 1 SUBHIERARCHY - hierarchy inherits from another hierarchy |
2 NOMATRICES - hierarchy doesn't use local matrices for bones | 2 NOMATRICES - hierarchy doesn't use local matrices for bones | ||
4096 UPDATEMODELLINGMATRICES - update local matrices for bones | 4096 UPDATEMODELLINGMATRICES - update local matrices for bones | ||
Line 32: | Line 32: | ||
== Bone flags == | == Bone flags == | ||
− | 1 POPPARENTMATRIX - this flag must be set for bones which don't have child bones | + | <font face="consolas">1 POPPARENTMATRIX - this flag must be set for bones which don't have child bones |
− | 2 PUSHPARENTMATRIX - this flag must be set for all bones, except those which are the latest in a particular hierarchical level | + | 2 PUSHPARENTMATRIX - this flag must be set for all bones, except those which are the latest in a particular hierarchical level</font> |
== See also == | == See also == |
Revision as of 14:39, 5 November 2014
{{{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 |
HAnim PLG is a child section of the extension of the frame list section inside a DFF model. It defines information for bones which can be used inside animations to animate the object.
Structure
Each section gets started by some general information:
4b - RwUInt32 hAnimVersion - animation's version format (in all GTAs - 1.0 (0x100)) 4b - RwUInt32 nodeId - user Id for this bone 4b - RwUInt32 numNodes - number of bones in hierarchy (if this bone is a root bone; for all other bones this parameter is set to 0)
If there are any affected bones then there are two more values following:
4b - RwUInt32 flags - flags for hierarchy animation
4b - RwUInt32 keyFrameSize - size of data (in bytes) needed for one animaton frame (in GTA this parameter is equal to 36)
Those values are followed by an array of bone information. It's size gets defined above.
4b - RwUInt32 nodeId - user Id for this bone
4b - RwUInt32 nodeIndex - bone index in this array 4b - RwUInt32 flags - bone flags
Hierarchy animation flags
These flags are a set of parameters to create and update the hierarchy.
1 SUBHIERARCHY - hierarchy inherits from another hierarchy 2 NOMATRICES - hierarchy doesn't use local matrices for bones 4096 UPDATEMODELLINGMATRICES - update local matrices for bones 8192 UPDATELTMS - recalculate global matrices for bones 16384 LOCALSPACEMATRICES - hierarchy computes matrices in the local space
Bone flags
1 POPPARENTMATRIX - this flag must be set for bones which don't have child bones 2 PUSHPARENTMATRIX - this flag must be set for all bones, except those which are the latest in a particular hierarchical level