Panda Manual > Animation with Pose Frames
Animation with Pose FramesThe simplest kind of animation is a flip-book: the model in a different pose on
each frame. When it plays, every vertex slides smoothly from where it is on one frame to where
it is on the next. That's what a .bb3d stores and what b2dMeshAnimate
plays. It suits things that wobble, bounce, flap, squash and stretch - and anything simple. For
characters with arms and legs, joints are usually quicker; they end up as
pose frames in a .bb3d anyway.
Every model has at least one frame. All frames share the same faces, colours and texture; only the positions of the vertices differ from frame to frame. Frames are numbered from 0.
Animate mode (the Animate button on the animation bar, or Ctrl+M) decides what moving vertices does:
[Animate mode: editing frame N] so you always know.A jelly that wobbles:
wobble with
frames 0 to 2, and set its Frames per second.Important: + Frame doesn't turn Animate on by itself. If Animate is off, a change you make after + Frame goes into every frame. Check the title bar says Animate mode before you pose.
| Clip list | Which part of the animation the slider and Play go through: All frames, or one of your clips. Choosing a clip goes to its first frame. |
| |< >| | First and last frame of the clip (Ctrl+Page Up / Ctrl+Page Down). |
| < > | Previous and next frame (Page Up / Page Down). They go round: next from the last frame goes to the first, as the clip plays. |
| Play / Stop | Plays the clip round and round (Ctrl+P), blending smoothly between frames at the clip's speed. Stopping lands on a whole frame, so your next edit goes there. Clicking in a view, or any edit, stops it too. |
| Slider | Drag to go to any frame of the clip. |
| Frame number | Frame 3 / 11: the frame you're on and
the last frame (frames count from 0, so this model has 12). With a skeleton and Animate off it says
Rest pose. |
| Speed | 0.1x, 0.25x, 0.5x, 1x or 2x: plays slower or faster just for watching (to check a quick move, say). It doesn't change the clip's real speed, which is set in Clips. |
| Animate | Animate mode on or off (Ctrl+M). |
| + Frame | Puts a copy of this frame after it, and goes to it. |
| - Frame | Deletes this frame (a model always keeps one). |
| Clips... | The Clips window (Ctrl+L). |
The play controls and slider are only active when there's more than one frame.
Animate Mode (Edit This Frame Only) Ctrl+M | As the Animate button. |
Play / Stop Ctrl+P | As the Play button. |
| First / Previous / Next / Last Frame | Ctrl+Page Up, Page Up, Page Down, Ctrl+Page Down. |
| Insert Copy of This Frame | As + Frame. |
| Insert In-Between Frames... | See In-betweens. |
| Fill In-Betweens... | See In-betweens. |
| Delete This Frame | As - Frame. |
Copy Pose Ctrl+Shift+CPaste Pose Ctrl+Shift+VPaste Pose on Selected Vertices | See Copying poses. |
Clips... Ctrl+L | See Clips. |
Every one of these can be undone.
Pose the important moments (the "key poses") and let Panda make the frames between.
Insert In-Between Frames... - go to a key pose that has the next key pose straight after it, choose this, and say how many frames to put between them (3 to start with, up to 1000). The new frames blend evenly from this pose to the next one. Example: frame 0 arm down, frame 1 arm up; insert 3 in-betweens on frame 0 and you get 5 frames moving smoothly from down to up.
Fill In-Betweens... - you already have frames, and want the ones between two poses redone as a smooth blend. Choose From frame and To frame: those two stay as they are and every frame between is replaced by an even blend from one to the other. Handy when you've messed up the middle of a move.
Blends are straight lines: each vertex moves in a straight line from its place in one pose to its place in the other. For things that swing round (an arm turning), straight-line blends make the arm shrink a little in the middle; put in more key poses, or use joints, which turn properly.
These are only for models without joints (with joints, keys do this job). The copied pose is forgotten when you open another model.
A clip is one animation in the model - walk, run, jump - as a run of frames with a name and its own speed. One model can hold many: frames 0 to 11 "walk", 12 to 19 "jump", and so on. Your program plays them by name or number.
Clips... (Ctrl+L) lists them with their name, first frame, number of frames and frames per second.
| Add... | A new clip. Panda suggests a name (Clip 1
...), starting at the frame you're on and running to the end, at the last clip's speed (or 12). |
| Edit... | Change the picked clip (or double-click it). |
| Delete | Deletes the picked clip (not its frames). |
| Show It | Picks the clip in the animation bar and goes to its first frame, ready to play. |
For each clip you set its Name, First frame, Frames (how many) and Frames per second (0.5 to 240). Clips can overlap and nothing checks the names, so keep them tidy. A clip lasts frames ÷ frames per second seconds.
Clips follow the frames when you add or delete frames: frames added inside a clip (or right after its last frame) make it longer, clips after them move along, and a clip whose frames are all deleted goes.
With Animate on (and no skeleton):
| Only this frame | Move, Rotate and Scale (the tools and by Values), Snap Together, Flatten, Paste Pose. |
| Every frame | Anything that adds or removes vertices or faces: shapes, the Vertex and Face tools, Extrude (its pull too), Delete, Duplicate, Weld, Unweld, Subdivide, Triangles to Quads ... Colours and texture coordinates belong to every frame anyway. |
| Not in Animate mode | Mirror. |
So build the model first, with Animate off, then animate it. You can still add a part later: new faces appear on every frame, in the same place on each, and you then pose them frame by frame.
b2dMeshFrameCount(mesh), and the clips with
b2dMeshClipCount, b2dMeshClipName, b2dMeshClipStart,
b2dMeshClipFrames and b2dMeshClipFPS.
b2dMeshAnimate(mesh, frameA, frameB, t) blends two frames, then
b2dMeshCopyVertsX/Y/Z give you the result. examples\BambooRuntime\26 - 3D in
2D\MeshAnimate.bam plays a clip._FrameClip(clip, seconds). See
BambooBasic Code Export.