About the Graph Editor
The Graph Editor is a window that shows a graphic representation of your animation. It has points that represent the time and position in which a keyframe was set, and curves between the keyframes, which show the acceleration (
Figure 12.29
).
By changing the distance between keyframes, you can change an object's speed. However, you must adjust the curve that represents its motion between keyframes to change its acceleration.
You can use the tangent types in the Graph Editor to quickly change the
shapes
of the curves (
Figure 12.30
). By default, the keyframes you set will be spline tangents. You can also manually adjust the shapes of the tangents. The Graph Editor is helpful for editing, copying, and looping animation.
Tangent types
There are six tangent types, all of which you can set by selecting a keyframe or an animation curve and choosing from the Tangent menu in the Graph Editor. You can also change which tangent type is automatically assigned to keyframes before they are set, in the Keys section of the Preferences window.
-
Spline
Keyframes with spline tangents have smooth curves between and through them (
Figure 12.31
). When animating a fish through water, you might use a spline tangent.
-
Linear
This tangent type simply draws a straight line from one keyframe to the
next
. It creates jerky movement with sudden changes, which might be good for some-thing mechanical (
Figure 12.32
).
-
Clamped
This is the default tangent type. Keyframes with clamped tangents act just like spline tangents with one very useful exception: If two keyframes are set at the same value at different points in time, it acts like a linear tangent. It
prevents
the problem that sometimes occurs with spline tangents, which is that an object you want to be still will
drift
slightly (
Figure 12.33
).
-
Stepped
This tangent type ensures that a value remains the same until it gets to the next keyframe, when it
jumps
to that position. It makes the curve look like a stephence, the
name
(
Figure 12.34
). One use for this tangent is for producing camera cuts. If you want a camera to hold in one position and then cut to another position, keyframe using a stepped tangent.
-
Flat
The tangent itself becomes horizontal when using this tangent type. Flat tangents typically create "slow-in slow-out"which means that the animation gradually accelerates between keyframes, goes quickly in the middle of the curve, and then gradually decelerates as it moves to the next keyframe (
Figure 12.35
).
-
Fixed
The tangent doesn't change when you edit the keyframe.
Creating a bouncing-ball animation is a good way to learn some of the functions of the Graph Editor.
To use the Graph Editor to change tangent types:
|
1.
|
From the Create menu, select NURBS Primitives > Sphere.
|
|
2.
|
Move the sphere up 10 grid units.
An easy way to do this is to type
10
in the field next to Translate Y in the Channel Box.
|
|
3.
|
Make sure you're at frame 1 in the time-line and that Auto Keyframe is turned on.
The key icon
should appear red and pressed down.
|
|
4.
|
Press
to keyframe only the translate attributes.
|
|
5.
|
Go to frame 15 and translate the sphere down to
1
along the
Y
axis.
The ball will be keyframed once it is moved, because Auto Keyframe is on.
|
|
6.
|
Go to frame 30 and translate the sphere back up to
10
along the
Y
axis.
Rewind and play back the animation. The ball's bounce is not convincing.
|
|
7.
|
From the Window menu, select Animation Editors > Graph Editor.
The Graph Editor window opens. The curve for the sphere's animation should appear as long as the sphere is still selected.
|
|
8.
|
Marquee-select the two keyframes at the top of the graph (
Figure 12.36
).
|
|
9.
|
Click the Flat Tangents button
in the Graph Editor window.
|
|
10.
|
Select the keyframe at the bottom of the curve (
Figure 12.37
).
Since you're trying to click on such a small point, it helps if you marquee-select, even when you're only selecting one keyframe.
|
|
11.
|
Click the Break Tangents button
.
This allows you to move the tangents on either side individually.
|
|
12.
|
Select the tangent on the left of the keyframe; then
-select the tangent on the right.
|
|
13.
|
Click the Move
Nearest
Picked Key Tool button, which is at the top-left corner of the Graph Editor
.
|
|
14.
|
With the middle mouse button, drag the tangents and move them up one at a time to form a V shape (
Figure 12.38
).
Play back the animation. It should now look more like a real bouncing ball.
|
Perhaps you want your ball to bounce again. One easy way to accomplish this is to copy and paste keyframes in the timeline.
To copy and paste in the timeline:
|
1.
|
Animate the bouncing ball as described in the previous task.
|
|
2.
|
Make sure that the playback end time is set to at least 60.
You can do this by typing
60
in the Playback End Time field.
|
|
3.
|
Hold down
and drag in the timeline from 1 to at least 31 (
Figure 12.39
).
|
|
4.
|
Right-click the timeline; select Copy from the pop-up menu (
Figure 12.40
).
|
|
5.
|
Click frame 30.
The frame you are on when you paste sets the time when the range of keyframes you paste will begin.
|
|
6.
|
From the Edit menu, select Keys and then select the option box next to Paste.
The Paste Keys Options dialog box opens.
|
|
7.
|
In the Paste Method section, click Merge (
Figure 12.41
) to paste the keyframe at the current frame without moving any adjacent keyframes.
|
|
8.
|
Click Apply.
A new keyframe marker appears on the timeline.
|
|
9.
|
Rewind and play the animation.
The ball now
bounces
twice.
|
Sometimes you want an animation to repeat several times. You can use the Graph Editor to perform multiple paste operations at once.
To copy and paste in the Graph Editor:
|
1.
|
Animate a bouncing ball.
|
|
2.
|
Make sure that the timeline goes to at least 120.
You can do this by typing
120
in the Playback End Time field.
|
|
3.
|
From the Window menu, select Animation Editors > Graph Editor.
The curve for the sphere's animation should appear. If it does not, select the sphere.
|
|
4.
|
From the Edit menu in the Graph Editor, select Copy.
|
|
5.
|
Hold down
and drag in the Graph Editor window until the red line, which is the time indicator, is at the end of the curve (
Figure 12.42
).
|
|
6.
|
From the Edit menu in the Graph Editor, select the box next to Paste.
The Paste Keys Options window opens.
|
|
7.
|
In the Copies field, type
3
(
Figure 12.43
).
|
|
8.
|
While the mouse is in the Graph Editor, press
.
The entire animation curve now fits within the window. There are now three additional bounces (
Figure 12.44
).
|
|
9.
|
Rewind and play the animation.
The ball bounces four times.
If you want to speed up or slow down your animation, you can scale the time in the Graph Editor. A longer time for the same distance means slower movement, and vice versa.
|
{% if main.adsdop %}{% include 'adsenceinline.tpl' %}{% endif %}
You can also scale values. Perhaps all of your bounces are too high, or none of your arm swings extends far enough. Scaling a value is just as easy as scaling an object's
size
.
To scale in the Graph Editor:
|
1.
|
Create a bouncing ball with four bounces, as in the previous task.
|
|
2.
|
From the Window menu, select Animation Editors > Graph Editor.
|
|
3.
|
From the column on the left, select Translate Y.
This isolates the Y translate curve.
|
|
4.
|
Marquee-select the whole curve.
|
|
5.
|
Press
to switch to scale mode.
|
|
6.
|
Move the mouse over the first keyframe on the left side of the curve (
Figure 12.45
).
The mouse's location when you begin to scale serves as the scale's pivot point.
|
|
7.
|
With the middle mouse button, drag to the left.
|
|
8.
|
Move the mouse over one of the low points of the bounces (
Figure 12.46
).
|
|
9.
|
With the middle mouse button, drag down.
The bounces get shorter (
Figure 12.47
).
|
Tip
|