Vehicle Animation: Difference between revisions
Content added Content deleted
(Created page.) |
(Updated enumerations and changed descriptions to indicate ties to part models. (Thanks Matt)) |
||
Line 1: | Line 1: | ||
<pre>This page is a work in progress. Check back at a later date for more up-to-date information.</pre> |
|||
The vehicle animation resource type stores per-vehicle user-triggered animations, working in conjunction with a [[Body Part Remap Data]] resource. |
The vehicle animation resource type stores per-vehicle user-triggered animations, working in conjunction with a [[Body Part Remap Data]] resource. |
||
Line 15: | Line 13: | ||
| 0x4 || 0x4 || uint32_t || ? || Version number || 1 |
| 0x4 || 0x4 || uint32_t || ? || Version number || 1 |
||
|- |
|- |
||
| 0x8 || 0x4 || uint32_t || ? || Number of |
| 0x8 || 0x4 || uint32_t || ? || Number of models || |
||
|- |
|- |
||
| 0xC || 0x4 || [[# |
| 0xC || 0x4 || [[#Model|Model]]* || ? || Models || |
||
|- |
|- |
||
| 0x10 || 0x4 || uint32_t || ? || Number of animation data entries || |
| 0x10 || 0x4 || uint32_t || ? || Number of animation data entries || |
||
|- |
|- |
||
| 0x14 || 0x4 || [[#Animation |
| 0x14 || 0x4 || [[#Animation|Animation]]* || ? || Animation data || |
||
|- |
|- |
||
| 0x18 || 0x4 || uint32_t || ? || Number of |
| 0x18 || 0x4 || uint32_t || ? || Number of modifier entries || |
||
|- |
|- |
||
| 0x1C || 0x4 || [[# |
| 0x1C || 0x4 || [[#Animation modifier|Animation modifier]]* || ? || Modifier/attribute data || |
||
|- |
|- |
||
| 0x20 || 0x4 || int8_t[4] || ? || Wheel |
| 0x20 || 0x4 || int8_t[4] || ? || Wheel part model indices || Order: Front left, front right, rear left, rear right<br />-1 if unused; no animation displays |
||
|- |
|- |
||
| 0x24 || 0xC || || || padding || |
| 0x24 || 0xC || || || padding || |
||
Line 42: | Line 40: | ||
| 0x4 || 0x4 || uint32_t || ? || Version number || 1 |
| 0x4 || 0x4 || uint32_t || ? || Version number || 1 |
||
|- |
|- |
||
| 0x8 || 0x4 || uint32_t || ? || Number of |
| 0x8 || 0x4 || uint32_t || ? || Number of models || |
||
|- |
|- |
||
| 0xC || 0x4 || || || padding || |
| 0xC || 0x4 || || || padding || |
||
|- |
|- |
||
| 0x10 || 0x8 || [[# |
| 0x10 || 0x8 || [[#Model|Model]]* || ? || Models || |
||
|- |
|- |
||
| 0x18 || 0x4 || uint32_t || ? || Number of animation data entries || |
| 0x18 || 0x4 || uint32_t || ? || Number of animation data entries || |
||
Line 52: | Line 50: | ||
| 0x1C || 0x4 || || || padding || |
| 0x1C || 0x4 || || || padding || |
||
|- |
|- |
||
| 0x20 || 0x8 || [[#Animation |
| 0x20 || 0x8 || [[#Animation|Animation]]* || ? || Animation data || |
||
|- |
|- |
||
| 0x28 || 0x4 || uint32_t || ? || Number of |
| 0x28 || 0x4 || uint32_t || ? || Number of modifier entries || |
||
|- |
|- |
||
| 0x2C || 0x4 || || || padding || |
| 0x2C || 0x4 || || || padding || |
||
|- |
|- |
||
| 0x30 || 0x8 || [[# |
| 0x30 || 0x8 || [[#Animation modifier|Animation modifier]]* || ? || Modifier/attribute data || |
||
|- |
|- |
||
| 0x38 || 0x4 || int8_t[4] || ? || Wheel |
| 0x38 || 0x4 || int8_t[4] || ? || Wheel part model indices || Order: Front left, front right, rear left, rear right<br />-1 if unused; no animation displays |
||
|- |
|- |
||
| 0x3C || 0x4 || || || padding || |
| 0x3C || 0x4 || || || padding || |
||
Line 67: | Line 65: | ||
|} |
|} |
||
=== |
=== Model === |
||
{{todo|Research the non-primary indices.}} |
{{todo|Research the non-primary indices.}} |
||
Line 73: | Line 71: | ||
! Offset !! Length !! Type !! Name !! Description !! Comments |
! Offset !! Length !! Type !! Name !! Description !! Comments |
||
|- |
|- |
||
| 0x0 || 0x1 || int8_t || ? || |
| 0x0 || 0x1 || int8_t || ? || Part model index || Primary index from the [[Vehicle Graphics|graphics]] resource |
||
|- |
|- |
||
| 0x1 || 0x1 || int8_t || ? || Second |
| 0x1 || 0x1 || int8_t || ? || Second part model index? || From the [[Vehicle Graphics|graphics]] resource. -1 if unused |
||
|- |
|- |
||
| 0x2 || 0x1 || int8_t || ? || Third |
| 0x2 || 0x1 || int8_t || ? || Third part model index? || From the [[Vehicle Graphics|graphics]] resource. -1 if unused |
||
|} |
|} |
||
=== Animation |
=== Animation === |
||
{{todo|Research types/flags, understand connection between byte at 0x2 and secondary data.}} |
{{todo|Research types/flags, understand connection between byte at 0x2 and secondary data.}} |
||
Line 86: | Line 84: | ||
! Offset !! Length !! Type !! Name !! Description !! Comments |
! Offset !! Length !! Type !! Name !! Description !! Comments |
||
|- |
|- |
||
| 0x0 || 0x1 || int8_t || ? || |
| 0x0 || 0x1 || int8_t || ? || Part model index || From the [[Vehicle Graphics|graphics]] resource |
||
|- |
|- |
||
| 0x1 || 0x1 || int8_t || ? || |
| 0x1 || 0x1 || int8_t || ? || Animation type || See [[#Animation type|animation type]] |
||
|- |
|- |
||
| 0x2 || 0x1 || int8_t || ? || |
| 0x2 || 0x1 || int8_t || ? || Modifier part model index? || Refers to modifier part model on cops but not others. See [[#Animation modifier|animation modifier]] |
||
|- |
|- |
||
| 0x3 || 0xD || || || padding || |
| 0x3 || 0xD || || || padding || |
||
Line 97: | Line 95: | ||
|} |
|} |
||
=== |
=== Animation modifier === |
||
{{todo|Understand the animation type/action field.}} |
{{todo|Understand the animation type/action field.}} |
||
Line 103: | Line 101: | ||
! Offset !! Length !! Type !! Name !! Description !! Comments |
! Offset !! Length !! Type !! Name !! Description !! Comments |
||
|- |
|- |
||
| 0x0 || 0x1 || int8_t || ? || |
| 0x0 || 0x1 || int8_t || ? || Part model index || From the [[Vehicle Graphics|graphics]] resource |
||
|- |
|- |
||
| 0x1 || 0x1 || int8_t || ? || Animation |
| 0x1 || 0x1 || int8_t || ? || Animation trigger || See [[#Animation trigger|animation trigger]] |
||
|- |
|- |
||
| 0x2 || 0x1 || bool || ? || Loop animation || |
| 0x2 || 0x1 || bool || ? || Loop animation || |
||
Line 115: | Line 113: | ||
= Enumerations = |
= Enumerations = |
||
=== |
=== Animation type === |
||
{{todo|Values such as 3 are used; explore what they do and determine if these are flags or not.}} |
{{todo|Values such as 3 are used; explore what they do and determine if these are flags or not.}} |
||
{| class="wikitable" |
{| class="wikitable" |
||
! Name !! Value !! Comments |
! Name !! Value !! Comments |
||
|- |
|- |
||
| ? || |
| ? || 0 || None |
||
|- |
|||
| ? || 1 || Rotate |
|||
|- |
|||
| ? || 2 || Transform |
|||
|- |
|||
| ? || 3 || |
|||
|- |
|||
| ? || 4 || Rotate (reversed)? |
|||
|- |
|||
| ? || 5 || Rotate once and return to origin |
|||
|} |
|||
=== Animation trigger === |
|||
{| class="wikitable" |
|||
|+ Caption text |
|||
|- |
|||
! Name !! Value !! Comments |
|||
|- |
|||
| ? || 0 || |
|||
|- |
|||
| ? || 1 || Turning |
|||
|- |
|||
| ? || 2 || |
|||
|- |
|||
| ? || 3 || |
|||
|- |
|||
| ? || 4 || |
|||
|- |
|||
| ? || 5 || |
|||
|- |
|||
| ? || 6 || Front right wheel rotation |
|||
|- |
|||
| ? || 7 || Front left wheel rotation |
|||
|- |
|||
| ? || 8 || Rear right wheel rotation |
|||
|- |
|||
| ? || 9 || Rear left wheel rotation |
|||
|- |
|||
| ? || 10 || Brake |
|||
|- |
|||
| ? || 11 || Throttle |
|||
|- |
|||
| ? || 12 || |
|||
|- |
|||
| ? || 13 || Speed |
|||
|- |
|||
| ? || 14 || RPM |
|||
|- |
|||
| ? || 15 || |
|||
|- |
|||
| ? || 16 || |
|||
|- |
|||
| ? || 17 || |
|||
|- |
|||
| ? || 18 || |
|||
|- |
|||
| ? || 19 || |
|||
|- |
|- |
||
| ? || |
| ? || 20 || Hover |
||
|- |
|- |
||
| ? || |
| ? || 21 || Boost |
||
|} |
|} |
||
Revision as of 20:49, 31 October 2022
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 models | |
0xC | 0x4 | Model* | ? | Models | |
0x10 | 0x4 | uint32_t | ? | Number of animation data entries | |
0x14 | 0x4 | Animation* | ? | Animation data | |
0x18 | 0x4 | uint32_t | ? | Number of modifier entries | |
0x1C | 0x4 | Animation modifier* | ? | Modifier/attribute data | |
0x20 | 0x4 | int8_t[4] | ? | Wheel part model 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 models | |
0xC | 0x4 | padding | |||
0x10 | 0x8 | Model* | ? | Models | |
0x18 | 0x4 | uint32_t | ? | Number of animation data entries | |
0x1C | 0x4 | padding | |||
0x20 | 0x8 | Animation* | ? | Animation data | |
0x28 | 0x4 | uint32_t | ? | Number of modifier entries | |
0x2C | 0x4 | padding | |||
0x30 | 0x8 | Animation modifier* | ? | Modifier/attribute data | |
0x38 | 0x4 | int8_t[4] | ? | Wheel part model 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 |
Model
To do: Research the non-primary indices. |
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x1 | int8_t | ? | Part model index | Primary index from the graphics resource |
0x1 | 0x1 | int8_t | ? | Second part model index? | From the graphics resource. -1 if unused |
0x2 | 0x1 | int8_t | ? | Third part model index? | From the graphics resource. -1 if unused |
Animation
To do: Research types/flags, understand connection between byte at 0x2 and secondary data. |
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x1 | int8_t | ? | Part model index | From the graphics resource |
0x1 | 0x1 | int8_t | ? | Animation type | See animation type |
0x2 | 0x1 | int8_t | ? | Modifier part model index? | Refers to modifier part model on cops but not others. See animation modifier |
0x3 | 0xD | padding | |||
0x10 | 0x30 | Matrix33 | ? |
Animation modifier
To do: Understand the animation type/action field. |
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x1 | int8_t | ? | Part model index | From the graphics resource |
0x1 | 0x1 | int8_t | ? | Animation trigger | See animation trigger |
0x2 | 0x1 | bool | ? | Loop animation | |
0x3 | 0xD | padding | |||
0x10 | 0x20 | Vector4[2] | ? |
Enumerations
Animation type
To do: Values such as 3 are used; explore what they do and determine if these are flags or not. |
Name | Value | Comments |
---|---|---|
? | 0 | None |
? | 1 | Rotate |
? | 2 | Transform |
? | 3 | |
? | 4 | Rotate (reversed)? |
? | 5 | Rotate once and return to origin |
Animation trigger
Name | Value | Comments |
---|---|---|
? | 0 | |
? | 1 | Turning |
? | 2 | |
? | 3 | |
? | 4 | |
? | 5 | |
? | 6 | Front right wheel rotation |
? | 7 | Front left wheel rotation |
? | 8 | Rear right wheel rotation |
? | 9 | Rear left wheel rotation |
? | 10 | Brake |
? | 11 | Throttle |
? | 12 | |
? | 13 | Speed |
? | 14 | RPM |
? | 15 | |
? | 16 | |
? | 17 | |
? | 18 | |
? | 19 | |
? | 20 | Hover |
? | 21 | Boost |