HAnim PLG (RW Section)

From GTAModding
Jump to: navigation, search
RW Stream Section
HAnim PLG
0x011E

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

See also

v · d · e
San Andreas Grand Theft Auto: San Andreas
File Formats.col.cfg.cut.dff.dat.fxp.gxt.ide.ifp.img.iplnodes*.dat.rep.rrr.scm.set.txd
DocumentationAudioCryptographyCutscenesGame memoryHandling.cfgMap ListingMission PacksOpcodesPathsReplaysSavesScripts
ToolsCLEOCollision File Editor IIENBSeriesG-ToolsIMG ToolLimit AdjusterMap EditorSan Andreas Audio ToolkitSanny BuilderTXD Workshop
TutorialsSan Andreas v2.0 ModdingHow to create a missionHow to create a threadHow to use Map Editor
ModificationsDesign Your Own MissionGostown ParadiseGTA: UnitedMyriad Islands
MultiplayergtaTournamentMulti Theft AutoSan Andreas Multiplayer(more...)
Useful linksCommunity portalDiscussion forumsMods on GTAGarage.comOpcodes database
v · d · e
Vice City Grand Theft Auto: Vice City
File Formats.adf.col.cfg.dff.dat.gxt.ide.ifp.img/.dir.ipl.raw/.sdt.rep.scm.txd
DocumentationHandlingMap ListingOpcodesScript PathsSavesSound Effects
ToolsCLEOCollision File Editor IIG-ToolsGXT EditorIMG ToolLimit AdjusterKEd (map editor)Sanny Builder (script editor)TXD Workshop
TutorialsHow to create a missionHow to create a thread
ModificationsGTA: Liberty CityState of Liberty
MultiplayerGTA:LC MultiplayergtaTournamentMulti Theft AutoState Of Liberty OnlineVice City MultiplayerVice City OnlineMulti-Vice
Useful linksCommunity portalDiscussion forumsMods on GTAGarage.comModding VC Mobile versionOpcodes database