Vehicle Animation

Revision as of 04:38, 5 October 2022 by Burninrubber0 (talk | contribs) (Created page.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
This page is a work in progress. Check back at a later date for more up-to-date information.

The vehicle animation resource type stores per-vehicle user-triggered animations, working in conjunction with a Body Part Remap Data resource.

Structures

Note: This type has no available debugging symbols. All structures are based on user research and are unconfirmed.

Header

32-bit

Offset Length Type Name Description Comments
0x0 0x4 uint32_t ? Resource size
0x4 0x4 uint32_t ? Version number 1
0x8 0x4 uint32_t ? Number of animations
0xC 0x4 Animation* ? Animations
0x10 0x4 uint32_t ? Number of animation data entries
0x14 0x4 Animation data* ? Animation data
0x18 0x4 uint32_t ? Number of secondary data entries
0x1C 0x4 Secondary data* ? Secondary data
0x20 0x4 int8_t[4] ? Wheel animation indices Order: Front left, front right, rear left, rear right
-1 if unused; no animation displays
0x24 0xC padding
0x30 0x100 Matrix44Affine[4] ? Wheel positions Order: Front left, front right, rear left, rear right
Animation only; real positions in deformation resource

64-bit

Offset Length Type Name Description Comments
0x0 0x4 uint32_t ? Resource size
0x4 0x4 uint32_t ? Version number 1
0x8 0x4 uint32_t ? Number of animations
0xC 0x4 padding
0x10 0x8 Animation* ? Animations
0x18 0x4 uint32_t ? Number of animation data entries
0x1C 0x4 padding
0x20 0x8 Animation data* ? Animation data
0x28 0x4 uint32_t ? Number of secondary data entries
0x2C 0x4 padding
0x30 0x8 Secondary data* ? Secondary data
0x38 0x4 int8_t[4] ? Wheel animation indices Order: Front left, front right, rear left, rear right
-1 if unused; no animation displays
0x3C 0x4 padding
0x40 0x100 Matrix44Affine[4] ? Wheel positions Order: Front left, front right, rear left, rear right
Animation only; real positions in deformation resource

Animation

 
Hmmm...
To do:
Research the non-primary indices.
Offset Length Type Name Description Comments
0x0 0x1 int8_t ? Animation index Primary index
0x1 0x1 int8_t ? Second animation index? -1 if unused
0x2 0x1 int8_t ? Third animation index? -1 if unused

Animation data

 
Hmmm...
To do:
Research types/flags, understand connection between byte at 0x2 and secondary data.
Offset Length Type Name Description Comments
0x0 0x1 int8_t ? Index
0x1 0x1 int8_t ? Type or flags
0x2 0x1 int8_t ? Secondary index? Refers to secondary data index on cops but not others
0x3 0xD padding
0x10 0x30 Matrix33 ?

Secondary data

 
Hmmm...
To do:
Understand the animation type/action field.
Offset Length Type Name Description Comments
0x0 0x1 int8_t ? Index
0x1 0x1 int8_t ? Animation type/action (per pashok) Trigger? 0 and 0x15 on cops/DLC. More on bikes (0xB).
0x2 0x1 bool ? Loop animation
0x3 0xD padding
0x10 0x20 Vector4[2] ?

Enumerations

Type or flags

 
Hmmm...
To do:
Values such as 3 are used; explore what they do and determine if these are flags or not.
Name Value Comments
? 0x1 Rotate
? 0x2 Transform
? 0x4 Rotate (reversed)?