Thursday, November 15, 2012

FAQ - When should I insert keyframes?

Subtitle: And what can Blender do to help me with this?
(This was originally written as a response to a question on BlenderArtists)

There are basically two schools of thought about how/when to keyframe...

With the older technique (sometimes referred to as "layering"), you only keyframe the controllers you are animating at a particular point in time and only when keyframes are needed. For example, you start at the root/COG and insert keyframes there on frames 1, 11, 21, then move up the spine and insert keyframes on 5, 16, and so on.

The newer/standard technique these days (which is taught at places such as Animation Mentor) is a pose-to-pose approach, where you consider each pose in its entirety as a single drawing. That is, you firstly go through creating a set of key storytelling poses (blocking pass), where you keyframe every control on every key pose. Then, you perform a few more passes over this adjusting those poses and/or inserting extra keyframes (again on all controls) to flesh out the pose transitions, before finally polishing everything on a control-by-control basis.

This second approach is much better for environments where you need to show work to a director for approval: directors can get a better idea of where you're taking the shot, and you can retime different parts easier (i.e. simply shuffle all the keyframes on a frame left or right). Also, the benefit of keyframing all controls at once is that you avoid any unwanted surprises should you change the timings on some controls as you've captured the entire pose on each frame. The downsides are that: 1) you have more keyframes to sift through when starting polishing; 2) changing the pose on a "static" body part means you now need to propagate the changed pose to adjacent keyframes; 3) if not done right, you can end up with clearly robotic "swing and hold" animation, where you character is clearly just hitting a number of predefined poses one after the other.

Blender supports both of these workflows
A few years ago when I started coding Blender, the design was orientated towards the layered workflow. At the time, that was my understanding of how animation is done (and how I'd been doing it), where you only wanted to minimise the number of keyframes you inserted. In particular, this lead to the "Only Needed" keyframing option being added - that is, to help you optimise when keyframes should/needed to be added.

However, as I learned more about animation, professional animators started teaching online more, and animators gained more experience working with these toolsets, it became clear that overall, there is a shift towards the pose to pose style. So, during the Animato project, Blender's animation system was redesigned to optimise more for a pose to pose, "just animate" workflow.

For example, the "Summary" channel in the DopeSheet makes it easy to see where what frames the key poses are on, and to retime these.

The "Whole Character" Keying Set inserts keyframes for all controllers on a character rig, and can be chosen from the Insert Keyframe (IKEY) menu, just like for Loc/Rot/Scale keyframes (as a bit of trivia, I coded it in a few hours while waiting for a tradesman to finish laying new flooring in the bathroom while our house was being renovated 2 years ago). Keying Sets were developed to allow you to choose a bunch of related properties (potentially across different objects) to insert keyframes for at the same time.

During Google Summer of Code 2011, the Graph Editor was refined to serve its common/core role as the tool where animation curves are "polished" during the final pass over a shot. In particular, the filtering defaults and presentation options were tweaked to make it easier to focus on a single curve at a time and be able to carefully adjust it. Meanwhile, the DopeSheet took on a greater role for giving an overview of the keyframes/timing of all components while blocking out shots.

The NLA system changed from being a "hack and slash" block recombinator (with all the associated scaling, synchronisation, and ugly transition yuckiness) to a non-destructive "animation layers" refinement pass workflow. (Granted, it does still have a few bugs which prevent this pipe dream from working completely, but the general workflow and framework are there!)

Finally, to avoid the problems with changing the pose for some "static" controllers after you've already inserted a bunch of keyframes with the old pose (as mentioned above), the "Propagate Pose" tool was developed to give you a helping hand.

Hopefully this post helped clarify some of these issues.


  1. Thanks, it was very helpful!!!


  2. Hi I´m using the NLA only thru action strips,

    Can you tell me if that´s an good approach to keyframe only?
    I have this doubt because I have a flash project to make in two months with 6 characters, and most of the actions are reused by all the characters.
    Using this workflow I can combine strips very fast and deliver some animation quicker.