Avatars, Animators and controllers
An Animator (class 95) component binds an AnimatorController (class 91) and an Avatar (class 90) to a rig. The
controller is stored compiled, as a ControllerConstant; names (states, parameters, layers, paths) survive only as CRC-32
hashes with a name table (m_TOS) beside them. Observed · SkateBIRD, Sledding
Animators can be nested in the hierarchy. In PEAK’s level 207 (BuildPlayer-Level_207 in levels192-207.assetbundle), 45 of the
600 Animators have other Animators below them: GAME/PassportManager/PassportUI (controller Passport) above
PortraitRenderer/PassportDummy/Scout (Scout), and Helicopter_End above the seated and hanging scouts, for instance.
Comparing the CRC-32 of every Transform path under each nested Animator, relative to the outer one, with the tracks of the outer
controller’s clips, no outer clip animates a Transform under a nested Animator, except one interface button
(BadgePopupScaler/UI_PauseMenuButton, which the three unlock pop-ups’ CosmeticUnlock clip drives). Observed · PEAK So a
rig belongs to the nearest Animator above it that has a controller. Inferred · PEAK The four Animators of the Ambience
controller sit on sound objects with no skinned skeleton. Observed · PEAK
Avatar
Section titled “Avatar”An Avatar stores the skeleton Mecanim animates and, for a humanoid, the compiled muscle data:
| Part | Content | Confidence |
|---|---|---|
| skeleton | per node its parent (−1 for a root), the index of its axes (−1 for none) and the CRC-32 of its path; nodes carry a transform (translation, rotation as a quaternion x, y, z, w, scale) |
Observed · SkateBIRD, Sledding |
| axes | per bone its pre-rotation and post-rotation, the sign of each axis, the limits of its rotation in radians, its length and its type | Observed · SkateBIRD, Sledding |
| human | for a humanoid, the human skeleton and its pose, which skeleton bone each human bone is (−1 for none), the retargeting proportions | Observed · SkateBIRD, Sledding |
| HumanDescription | what the avatar was built from: per human bone the skeleton bone it names and its limits, the skeleton bones with their local transforms, and the arm, forearm, upper-leg and leg twist shares | Observed · Sledding |
| name table | pairs of a CRC-32 and a path | Observed · SkateBIRD, Sledding |
A generic avatar has an empty human skeleton. Observed · SkateBIRD
Controller
Section titled “Controller”| Level | Content | Confidence |
|---|---|---|
| layers | the state machine each runs, a body mask, a skeleton mask (CRC-32 of a path and a weight), how it blends in (override or additive) and its weight | Observed · SkateBIRD |
| state machine | states, an any-state list, the default state, entry and exit selector nodes | Observed · SkateBIRD |
| state | its transitions, one blend tree per motion set (a plain clip is a tree of one leaf), the CRC-32 of its name and path, and the parameters that drive speed, mirror, cycle offset and time | Observed · SkateBIRD |
| transition | a destination and its conditions | Observed · SkateBIRD |
| condition | a mode (1 true, 2 false, 3 greater, 4 less, 6 equals, 7 not equal), the CRC-32 of the parameter, a threshold, and for an exit-time condition the time | Observed · SkateBIRD |
| parameter | the CRC-32 of its name, its kind (1 float, 3 int, 4 bool, 9 trigger) and its place in the default values of that kind | Observed · SkateBIRD |
| clips | m_AnimationClips: the clips the blend trees’ leaves index, a null slot for a null pointer (a leaf’s index counts it) |
Observed · SkateBIRD |
A transition’s destination below 30,000 names a state of its machine; 30,000 + n names selector node n (an entry or an
exit). Observed · Sledding
A selector transition’s destination can also be 0xFFFFFFFF, which names no state and no selector node; the destination of a state
or any-state transition is never −1. It occurs 16 times among the 1,671 selector transitions of the 699 compiled controllers read
in 529 serialized files of PEAK, Sledding Game, Big Walk and SkateBIRD (PEAK’s seven level bundles and loose files, Sledding Game’s
50 bundles and loose files, Big Walk’s data.unity3d, SkateBIRD’s data folder, and the builtin Resources files, which hold no
controller; PEAK’s one-node maps manifest bundle was not read). Each is the only transition of the entry node of a state machine
with no states (a layer with nothing in it), whose exit node leads to selector node 0 (30,000); the 16 are PEAK’s Ambience
controller (machine 0) and Scout controller (machine 6), each stored once in the shared assets of each of the seven level bundles
and once in the loose resources.assets. Observed · PEAK Every other entry-node transition leads to a state, and every
other exit-node transition to a selector node, except 4 exit transitions in Big Walk, 3 in SkateBIRD and 1 in Sledding Game that
lead to a state. Observed · PEAK, Big Walk, Sledding, SkateBIRD That the value means “no destination” (an entry node of a
machine with no state to enter) is reasoned from where it occurs; the engine’s own handling of it has not been observed.
Inferred
Blend trees
Section titled “Blend trees”A node of a blend tree has a kind (blend_type: 0 1D, 1 simple directional 2D, 2 freeform directional 2D, 3 freeform
cartesian 2D, 4 direct), the parameters it blends by, its children with thresholds or positions, and for a leaf the clip
(u32::MAX for none). A child can itself be an inner node whose weight splits among its children (weights multiply).
Observed · SkateBIRD
| Kind | Weights | Confidence |
|---|---|---|
| leaf | 1 | Sourced · Unity manual |
| 1D | at or below the first threshold the first child plays alone, at or above the last the last child; between two thresholds the two neighbours play with weights linear in the parameter | Sourced · Unity manual |
| direct | child i’s weight is the value of its own parameter; with normalised blend values the weights are divided by their sum only where the sum exceeds 1; a sum of 1 or less stays as it is, so 0.2 and 0.1 play at 0.2 and 0.1, and all zeros play nothing | Observed |
| freeform cartesian | the gradient bands of Johansen’s thesis (equation 6.6): child i’s weight is `h_i = min over j ≠ i of (1 − (p − p_i)·(p_j − p_i) / | p_j − p_i |
The manual says direct blend values are divided by their sum; the editor (6000.6.4f1) does it only above 1, checked at 8 points. Observed The cartesian formula matches the editor to 1e-7 at 49 points around the bird’s Idling positions and on an uneven six-child set, outside the convex hull as well. Observed
The simple directional and freeform directional trees use polar gradient bands (Johansen, chapter 6.3.1); no engine measurement of their weights has been taken.
State time
Section titled “State time”For a state of one clip, the clip is at state time × speed + cycle offset × clip length seconds, with the speed the state states
times its speed parameter’s value when it names one, the cycle offset a fraction of the clip (the state’s or its parameter’s),
and the clip looped by its own looping. Sourced · Unity manual A state that is a blend tree has a time that is the weighted length of
its clips. Sourced · Unity manual
SkateBIRD’s bird
Section titled “SkateBIRD’s bird”The bird’s Animator is level0 object 10796; its controller is Skating Bird (sharedassets0.assets object 1309) and its
avatar sharedassets0.assets object 1302. Observed · SkateBIRD The controller has 3 layers, 3 state machines, 39 states,
30 parameters, 47 clips and 311 names, and every field read agrees with an independent reader’s, field by field.
Observed · SkateBIRD
| Layer | Content | Confidence |
|---|---|---|
0 Beak Override |
2 states: Polite Beak Movements plays Beak Chatter, Beak Closed plays Bobbing and Twitching, switched by the bool beak_noise |
Observed · SkateBIRD |
1 Base Layer |
35 states, default Idling, a freeform cartesian blend tree of 7 clips from Bobbing and Twitching to Fastest Mood, 24 transitions out of it; Flapping (state 1, speed 2.5), Curled Up (a 1D blend of two clips), the pushes, Screm, the bailed states, twelve grab states (states 11 to 22: the entry clip, then its loop) and the reaction states, entered from the entry selector at states 0, 11, 23 and 25 |
Observed · SkateBIRD |
2 Blinking |
a 1D blend of Blinking and Blinking HawkOwl |
Observed · SkateBIRD |
All layers have blending mode 0 (override) and weight 1, and no any-state transitions. Observed · SkateBIRD