Blender 3D: Noob to Pro/Basic Animation/Introducing the Graph Editor
|Applicable Blender version: 2.70.|
The Graph Editor is where you exercise the lowest-level control over the details of an animation, right down to the settings and placement of each keyframe. You previously learned how to create and delete keyframes; now you will learn how to get inside them and tweak them.
Let’s start by creating a very basic animation, using the default cube. As you did in “First Keyframes”, set up a couple of Location keyframes, one at frame 1, and another positioning the cube a few widths away at frame 25. Scrub between these times in the Timeline, and confirm that the cube moves between those two positions.
Now, add a new window to the left of the 3D view , and change its type to Graph Editor . Provided the cube is still selected, it should show something like this. The Location controls at the left will likely initially appear collapsed to a single line; click on the right-pointing triangle so it points downwards, revealing the separate X, Y and Z Location control lines.
The curves at the right are the FCurves; the colours for the X, Y and Z location curves correspond to the colours of the squares surrounding the eye icons in the control lines at left.
Remember, the Graph Editor only shows animation data for selected objects. If you ever wonder why the right curves are not showing up here, make sure you have the right objects selected in the 3D view.
Note the following features of the display:
- The vertical green line represents the current frame. It always shows the same frame as the corresponding line in the Timeline , and also the frame number at the lower-left corner of the 3D view . Just as in the Timeline, you can set its position with , or use the arrow keys to step forward/backward one frame (right/left arrows) or jump to the next/previous keyframe (up/down arrows).
- There is also a horizontal green line which is positioned with . This can be used (together with the vertical line) for snapping selected control points to the specified value or time.
- The control points on each curve, at the position of each keyframe. These are black when not selected, or a pinkish colour when selected. Various keyboard shortcuts you should be familiar with from the 3D view also apply here: to select one point (deselecting everything else), + to add/remove a point to/from the selection, to toggle selecting everything/nothing, even to do a box selection, even ircle select is available.
- The little handles joined to each control point by straight lines. FCurves are Bézier curves, just like those commonly found in 2D illustration programs, or in Blender’s own curve objects. By default each control point gives a smooth curve, causing the position (or other object property) to smoothly accelerate and decelerate; but you can change the handle type with , if for example you want a more sudden change.
- The eye, speaker and padlock icons in each control line.
- Clicking the eye icon causes the eye to close, and the corresponding FCurve to disappear from the display; this reduces clutter and makes it easier to edit just the right curve. Click the closed eye to open it again and make the hidden curve reappear.
- Clicking the speaker icon mutes (temporarily disables) the effect of the corresponding curve, without actually deleting it. This may be useful for debugging complex motions. When muted, the radiating arcs disappear from the speaker, and the curve turns white; click the speaker again to unmute the curve.
- Clicking the padlock locks the curve against selection and editing, while keeping it visible. Clicking on the closed padlock opens it again, restoring the ability to select and edit the curve.
- Clicking on the text or background (i.e. not in any icon) on a control line with selects the entire curve. You can also + to select multiple curves at once. Pressing or within the area of the control lines will get rid of the entire selected curve(s)!
- You can scroll around the view with . Or you can drag the scroll indicators, anywhere except at their ends.
- The view can be zoomed with the mouse wheel, as in the 3D view. However, this zooms both horizontally and vertically by the same factor. It is characteristic of the Graph Editor that the curves are likely to be stretched very tall, while squashed very narrow. To zoom on each axis independently, drag on the ends of the scroll indicators: lengthen them to zoom out, shorten them to zoom in.
- You can also use and , just like in the 3D view, to zoom and centre the view on the entire set of curves or just selected curves or parts thereof.
Set the current frame to something in-between the two keyframes, e.g. frame 12. Selectone of the control points at frame 25, and try moving it around: how does it affect the cube in the 3D view? Constrained moves are very useful here:
- to change the value of the FCurve at the control point without moving the keyframe in time
- to move the control point in time without changing the value it gives to the FCurve. You can move one control point past another; Blender will automatically reconnect the curve segments to ensure the curve does not loop back on itself.
Also, go to frame 25 (the time of the second keyframe), and make sure nothing is selected. Now go to the Select menu, and choose the option “Column on Current Frame” (keyboard shortcut+ ): this selects all keyframes located at the current frame time. Now you could, e.g. use to adjust the position of all control points for this keyframe in time.
Inserting and removing control points: You can, of course, delete selected control points withor in the usual way. You can also insert control points at the current time with : this will pop up a menu asking whether you want to insert control points for all editable channels (FCurves), or only the curves containing currently-selected control points. The new control points will be inserted so as to make minimal difference to the actual shapes of the curves; but you can of course tweak them around afterwards.
Rescaling an entire animation sequence: Supposing you painstakingly set up an animation sequence, only to discover that the total length of it is not quite right, either too long or too short. It is easy enough to lengthen the entire sequence (making it run slower), or shorten it (making it run faster).
First of all, make sure all the affected objects are selected. In the Graph Editor, ensure all the relevant FCurves are visible and not locked. Set the current time to frame 1. Pressonce or twice to ensure that all control points are selected.
In the window header for the Graph Editor, find the Pivot Point menu (as at right). Make sure the “2D Cursor” option is selected. Now pressto rescale the entire animation in time, keeping only keyframes at the current time (which you set to frame 1, remember) unchanged. Either type in a suitable number to get an exact new length, or adjust it by eye so the last keyframe ends up at the right frame number. As always, press to confirm the transformation.