Animation
Skeletons and clips
Section titled “Skeletons and clips”A model that bends (a character, a flag, a waving Chonky) has a skeleton: bones the mesh is attached to. Move a bone and the mesh around it follows.
An animation clip is one movement of a skeleton over time: a wave, a spin, an idle bob. It stores, for each bone, where it is at each moment. A clip only fits skeletons with the bones it names.
Something has to play the clip
Section titled “Something has to play the clip”A clip does nothing on its own. What plays it is an animation tree: a small set of states, each playing a clip, with rules for moving between them. Idle until something happens, then wave, then back to idle. A script on the entity drives the tree, telling it which state to be in.
Each one uses the ones to its right.
- Scripta component on the entitydrives the tree
- Anim treechonky.
anim_ idle, then wavetree - Clipchonky_
idle one state - Clipchonky_
wave another state
Some states blend clips instead of playing one: a blend space mixes, say, walk and run by how fast something is going, so the movement changes smoothly rather than switching.
Replacing a shipped animation
Section titled “Replacing a shipped animation”The simplest animation mod swaps a movement the game already has for your own. Your clip is built against the original, so it keeps its skeleton and every bone you didn’t touch keeps the original motion. You can change one bone without redoing the rest.
Adding your own
Section titled “Adding your own”A model you import from a GLB can bring its own animations. Studio makes the clips, a tree with one state per clip, and a small driver script to put on the entity, all linked up, in one import. See Importing.
Seeing it in Studio
Section titled “Seeing it in Studio”Open a clip and it plays on its skeleton in the viewport. The Animation window’s Timeline shows the clip’s keys bone by bone, and Pose the Rig lets you turn bones by hand to check how a model bends.
For programmers
A clip is a Granny track group (per-bone TRS curves) in an .anim.gr2.import, referenced through a thin
.animation sidecar that also carries gameplay events. An .anim_tree is a state machine whose states name
sidecars (or a blend space); a component script holds a reference to the tree and poses it each frame. Every link
in that chain is by ID.
Where to go next
Section titled “Where to go next”Sound: how the game makes noise.