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

From GTAMods Wiki
Jump to navigation Jump to search
m
m
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{Stub}}
 
{{Stub}}
{{RW Section|HAnim PLG|0x011E}}
+
 
 +
{{RW Section
 +
| NAME = HAnim PLG
 +
| VENDORNAME = Criterion Games
 +
| MODULENAME = Toolkit
 +
| MODULEID = 000001
 +
| IDENTIFIER = 1E
 +
| PARENTS = [[Frame List (RW Section)|Frame List]] ''([[Extension (RW Section)|Extension]])''
 +
}}
  
 
'''HAnim PLG''' is a child section of the [[Extension (RW Section)|extension]] of the [[Frame List (RW Section)|frame list section]] inside a [[model file|DFF model]]. It defines information for bones which can be used inside [[IFP|animations]] to animate the object.
 
'''HAnim PLG''' is a child section of the [[Extension (RW Section)|extension]] of the [[Frame List (RW Section)|frame list section]] inside a [[model file|DFF model]]. It defines information for bones which can be used inside [[IFP|animations]] to animate the object.
 
 
 
  
 
== Structure ==
 
== Structure ==
Line 11: Line 16:
 
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:
  
  4b - RwUInt32 flags - flags for hierarchy animation
+
  <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.
  
  4b - RwUInt32 nodeId - user Id for this bone
+
  <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.
<code><font face="courier">
+
<font face="consolas">   1 SUBHIERARCHY           - hierarchy inherits from another hierarchy
: : : : 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
+
  8192 UPDATELTMS             - recalculate global matrices for bones
: 8192 UPDATELTMS - recalculate global matrices for bones
+
16384 LOCALSPACEMATRICES     - hierarchy computes matrices in the local space</font>
16384 LOCALSPACEMATRICES - hierarchy computes matrices in the local space
 
</font></code>
 
  
 
== 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>
 
+
8 - unknown flag
== See also ==
 
* [[RenderWare_binary_stream_file|RW file format specification]]
 
  
{{N|SA|VC}}
+
{{N|SA|VC|3}}
[[Category:GTA_3]][[Category:Pedestrian_Formats]]
+
[[Category:Pedestrian_Formats]]

Latest revision as of 12:23, 11 September 2020

HAnim PLG
RenderWare Stream Section
Vendor Criterion Games
Module Toolkit
Module ID 0x000001
Identifier 0x1E
Chunk ID 0x0000011E
Versions All
Hierarchy
Parents:
Frame List (Extension)
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
8 - unknown flag