Panda Manual > Animation with Joints
Animation with JointsA skeleton is a set of joints - shoulder, elbow, wrist - each hanging off another. Every vertex follows one joint. Turn the shoulder and the whole arm swings, elbow and hand with it. You animate by turning joints on a few frames (keys) and Panda works out the frames between. It's MilkShape's way, and much quicker than posing vertices for anything with limbs.
A model with a skeleton is always in one of two states, switched with the Animate button (or Ctrl+M):
| Animate off (the rest pose) | You see the model as you built it,
with no animation (the frame number says Rest pose). This is where you build:
edit the model, add and move joints, give them vertices. The animation is kept safely, just not
shown. The play controls are greyed out here, because there's nothing to play in the rest
pose. |
| Animate on | You see the animation, worked out from the keys, and you animate: step through the frames, play, and turn or move joints to set keys. You can't change the model itself here (more below). |
So: to see or play a skeleton's animation, turn Animate on first. Imported models with a skeleton open in the rest pose too.
Joint 1 (the shoulder). Click in the middle: Joint 2, hanging off
Joint 1 (the elbow). Click near the top: Joint 3 (the wrist).Joint 1 and Assign Vertices. Box-select the upper half's vertices, click
Joint 2, Assign Vertices. (The Vertices column shows how many each has.)Joint 2 in the Joints tab. Drag left or right in the
Front view: the elbow turns. That set a key on frame 0 (an orange dot).Build with Animate off. Choose the Joint tool and click in a view:
Joint 1, Joint 2 ...: give them proper names with
Rename... (they become the names in .glb files and the
_J_ constants of the code export).Moving a joint (Animate off): choose Joint under Select, pick the joint, and drag with Move. This moves only the joint - its pivot, the point things turn round - not the vertices. Put each joint where the bend should be: the middle of the elbow, not its surface.
Two ways:
Move and Rotate always work on the joint that's already picked - you can drag anywhere in the view, not just on the joint. So pick first, then drag. In Animate mode the tool is Rotate, so to pick another joint by clicking, switch to Select for a moment - or just click it in the Joints tab, which is quicker.
A joint only moves the vertices you give it. Select vertices (Vertex select, or Face select for whole faces), pick the joint, and click Assign Vertices on the Joints tab. Each vertex follows one joint; assigning it again moves it to the new one. Select Vertices shows which vertices a joint has.
Vertices that follow no joint stay still. Tips:
Turn Animate on. Panda switches to Joint select and the Rotate tool.
Between keys each joint turns smoothly from one key to the next, the short way round. Before a joint's first key it holds the first key; after its last key, the last. A joint with no keys stays in its rest pose. Keys are per joint: the elbow can have keys on frames 0, 6 and 11 while the wrist has one on frame 3.
Clear Key Here (Joints tab) takes the picked joint's key off this frame; Clear All
Keys takes all its keys away. The Keys column shows how many keys each joint has, with a
* when it has one on this frame.
In Animate mode you can't change the model: its frames are worked out from the joints, so an edit to the vertices would be lost. Tools other than Select are refused (unless you're moving or turning a joint), and so are operations that change vertices or faces, with a message saying so. Assigning vertices, colours and texture coordinates still work. Turn Animate off to edit the model: the keys are kept and the animation follows the changed model.
The animation is a number of frames (shown as Frames on the Model tab). Keys sit on
frames. The frame tools work as with pose frames, and switch Animate
on for you:
The list shows every joint as a tree (each joint indented under the one it hangs off), with how many Vertices follow it and how many Keys it has. Click a joint to pick it; double-click to rename it.
| Rename... | Names the picked joint. |
| Delete | Deletes the picked joint (Animate off). See Deleting joints. |
| Assign Vertices | The selected vertices follow the picked joint. |
| Select Vertices | Selects the vertices that follow the picked joint (and switches to Vertex select). |
| Clear Key Here | Removes the picked joint's key on this frame (Animate on). |
| Clear All Keys | Removes all the picked joint's keys. |
Joints are dots, joined to the joint they hang off by a bone line, drawn over the model so you can always see them. The dot is red for the picked joint, orange for a joint with a key on this frame (in Animate mode) and yellow otherwise. Bones are bright when you're working with joints (Joint select, the Joint tool, or Animate mode) and dimmer otherwise.
Pick a joint and click Delete on the Joints tab, or press Del in Joint select (Animate off). Its children hang off its parent instead (keeping their keys), and its vertices go to its parent too. Its own keys are gone.
Deleting the last joint turns the animation into ordinary pose frames - nothing is lost - and the model is a plain pose-frame model again.
Adding the first joint to a model that has pose frames asks first: with a skeleton the frames are made from the joints, so the frame you're on becomes the rest pose and the other frames' poses are replaced by what the keys say (the number of frames and the clips stay). Answer No to keep the pose frames. (It can be undone.)
b2dMeshAnimate plays.Panda free vertices, because glTF needs every vertex to follow something.Importing a .glb with a skeleton and animation asks whether to Keep the
Skeleton or Bake into Frames - see Files.