Sub topic 7
Shaping curves with Bezier handles and handle types
This chapter assumes you can select keyframes in the Graph Editor and move them with G, R and S. It also assumes you know that Bezier is the default interpolation mode. Here you will learn what the handles on a Bezier keyframe do, how the five handle types differ, and how to pick one for a given motion problem.
What handles control
A keyframe on a Bezier F-curve has two parts. The first is the key point, which stores a frame and a value. The second is a pair of handles, one on each side of the point. Each handle is a point connected to the key by a line.
The handles do not lie on the curve. They steer it:
- The direction of the handle line sets the slope of the curve as it passes through the key.
- The length of each handle sets how far that slope holds before the curve bends toward the next key.
- The left handle shapes the segment arriving at the key. The right handle shapes the segment leaving it.
Each segment between two keys is a cubic Bezier curve. Its four control points are the left key, the left key's right handle, the right key's left handle and the right key. Moving a handle changes only the two segments that touch its key.
Handles only matter when a segment uses Bezier interpolation. If the segment leaving a key is Constant or Linear, that key's right handle has no effect on it. Blender still stores the handle and applies it if you switch the segment back to Bezier.
The five handle types
Select keys and press V in the Graph Editor to open the Set Keyframe Handle Type menu. The type applies to both handles of each selected key, unless you have selected only one handle.
| Type | Behavior | Typical use |
|---|---|---|
| Automatic | Blender computes the handle direction and length from neighboring keys, producing a smooth curve. It can overshoot at peaks. | Smooth passes through a key where overshoot is acceptable. |
| Auto Clamped | Like Automatic, but the handles go flat at local minima and maxima. The curve never overshoots the key value. | The default. Safe for most motion, such as bounces, pendulums and camera moves. |
| Vector | Each handle points toward the adjacent key. | Sharp corners with straight approach and departure, such as a ball striking a floor. |
| Aligned | The two handles stay on one straight line, but each can have its own length. | Smooth direction through the key with different ease-in and ease-out. |
| Free | The two handles move independently. | Deliberate corners, sudden speed changes, or a curve that must hit a specific tangent. |
Automatic and Auto Clamped are "auto" types. Blender recomputes their handles when you move a key or its neighbors. Aligned, Vector and Free are manual types in the sense that you can pull the handles yourself. Vector handles still recompute their direction when neighbors move.
Why Auto Clamped is the default
Take three keys with values 0, 10 and 0. With Automatic handles, the smooth curve through the middle key can rise slightly above 10 between the keys. The curve is smooth, but the value at the peak is wrong. If the property is a location above a floor, the object may dip below it.
Auto Clamped sets the handles at the middle key flat (horizontal). The curve reaches 10 at the key and never goes beyond it. The cost is that the motion eases into every extreme, even where you wanted a sharp change of direction. For that, switch the key to Vector or Free.
Editing handles by hand
To edit a handle, select the key, then click the handle's end point. You can also box-select handles. You can then use G, R and S on the handle like any other selected point.
What happens when you move a handle depends on its type:
- Moving a handle on an Automatic or Auto Clamped key converts that key to Aligned. Blender stops recomputing it, because you have taken over.
- Moving a handle on a Vector key converts it to Free, because the handle no longer points at the neighbor.
- Moving a handle on an Aligned key rotates the opposite handle to stay collinear but does not change its length.
- Moving a handle on a Free key leaves the other handle alone.
Two habits make handle editing predictable:
- Constrain with X or Y while dragging. Locking a handle to the Y axis changes the slope without shifting timing. Locking to X changes only how long the handle is in time.
- Scale handles together with S while both are selected. Scaling shortens or lengthens both and keeps the angles, so the curve gets tighter or looser without changing direction.
Handles that cross over each other can make the curve double back in time. Blender prevents this by limiting how far a handle's frame can extend toward the neighbor, but a very long handle on one side of a segment can still produce an odd shape. If a segment bulges unexpectedly, shorten the handles first.
Shaping common motion
These handle patterns solve the most frequent problems.
- Ease out of a pose and into the next one. Make both keys Auto Clamped or Aligned with horizontal handles. The curve forms an S shape between them.
- Fast start, slow end. Keep the first key's handle short and steep, and give the second key a long, flat left handle.
- A bounce. Set the key at the floor to Vector. The curve arrives at the floor on a straight diagonal and leaves on another one. Set the key at the top of each arc to Auto Clamped, so the object hangs at the apex.
- A hold, then a snap. Make the first key's right handle and the second key's left handle both flat and very long. The curve stays near the first value, then moves quickly in the middle. For a perfect hold with no drift, use Constant interpolation instead.
Handles from Python
Each keyframe point exposes its position and handles as 2D vectors in (frame, value) space. This script makes the second key of the X location curve a Free key with a flat, long right handle. It uses action.fcurves, so it applies to Blender versions before the slotted-actions change. Check the API documentation for your version.
import bpy
obj = bpy.context.object
obj.location = (0.0, 0.0, 0.0)
obj.keyframe_insert(data_path="location", frame=1)
obj.location = (4.0, 0.0, 0.0)
obj.keyframe_insert(data_path="location", frame=24)
fcurve = obj.animation_data.action.fcurves.find("location", index=0)
kp = fcurve.keyframe_points[1]
# Handle types must be set before you position the handles.
kp.handle_left_type = 'FREE'
kp.handle_right_type = 'FREE'
frame, value = kp.co
kp.handle_left = (frame - 6.0, value - 1.0)
kp.handle_right = (frame + 6.0, value)
fcurve.update()
print(kp.handle_left[:], kp.co[:], kp.handle_right[:])Two details matter here. If you leave the type as Auto Clamped and assign handle_right, Blender recomputes the handle and discards your value. Setting the type to 'FREE' or 'ALIGNED' first avoids that. After editing, call fcurve.update() so the curve and the Graph Editor refresh.
Common errors
- Handles seem to do nothing. The segment is probably Constant or Linear. Select the key and press T to check the interpolation.
- Your handle edit vanished. The key is Automatic or Auto Clamped and was recalculated after you moved a neighbor. Change the type to Aligned or Free first, or accept that the handle converts when dragged.
- Overshoot below a floor value. The key uses Automatic. Switch it to Auto Clamped.
- A flat-looking curve that you can't steer. Both handles are zero length, or the curve was drawn at a tiny scale. Use View Selected or Normalize, covered in a later chapter, to see the handles.
- A sharp kink you did not want. A Vector or Free key sits where the neighbors expect a smooth pass. Set it to Auto Clamped.
Exercise
A character's hand moves up to a wave pose, pauses, then drops. At the top key, the hand overshoots the pose height on the way in and looks like it rises past the target. Which handle type is most likely on that key, what should you change it to, and why? Then say what happens to the key's type if you drag one of its handles after changing it.
Show answer
The key most likely uses Automatic, whose smooth handles can overshoot at a peak. Change it to Auto Clamped, which makes the handles flat at the local maximum so the curve never exceeds the key value. If you then drag a handle on that Auto Clamped key, Blender converts the key to Aligned, so it stops recomputing the handles. The handles then stay collinear but keep their own lengths.
Exercise
In a Python script you set kp.handle_right = (30.0, 2.5) on a key that has Auto Clamped handles, and the handle ends up somewhere else. Why, and how do you fix the script?
Show answer
Auto Clamped handles are computed by Blender from the neighboring keys, so assigning a position gets overwritten. Set kp.handle_left_type and kp.handle_right_type to 'FREE' (or 'ALIGNED') first, then assign the handle positions, then call fcurve.update().