Before we begin with this refresher course on how to manipulate function curves, let's go over some keys words and definitions.
From Alias|Wavefront's Maya tutorial:
Attributes are properties of the object. When an object is animated in Maya, what is in fact happening is that one or more attributes of that object are changing in value over time. Keyable attributes are attributes which have been added to the list of attributes which are available for keying with the Channel Box and Keys menu. NOTE: Any attribute which has a numerical value can be animated, even if it is not assigned as "keyable".
The primary attributes you usually work with are Translation, Rotation, and Scale. You can create your own attributes by setting driven keys. Driven keys are usually set because you are animating an action that requires to use of different attributes. If you have gone through the character setups for Adam, Earl, and Mira, you'll see that they have attributes that control things such as how their fingers spread or how their backs bend. For example, let's look at the hand Spread attribute for Adam, which can be found when you select the LHANDCONS.
The driver attribute is called "Spread". The driven attributes are all the attributes that Spread affects. The value of the driven attributes is locked to a corresponding value of the driver attribute, Spread. When the value of Spread increases (to a maximum value of "10") then the pinky, ring finger, index finger, and thumb spread out and away in relation to the middle finger. When the value of Spread decreases (to a minimum value of "-2") then the fingers come back together. You can read more about driven keys in Alias|Wavefront's online tutorial found at D:/AW/Maya3.0/docs/en_US/html/UserGuide/Anim/KeyAnimSetKey6.html (this link will work if you are working on the computers in Sieg 228).
Remember, do not delete the driven keys if you see them! Unless you mean to delete these, it's best to just leave them alone. For the characters Adam, Earl, and Mira, the driven keys will usually look something like this in the graph editor:
Notice that they are usually linear and either the line's beginning or midpoint appears to go through time 0 (zero) with a value of 0 (zero). In actuality, it sits in the the vertical attribute lists the driven attribute values, and the horizontal axis lists driver attribute values. It usually only takes up a small portion of the graph editor relative to the rest of the animated keys.
Keys represent the value of an attribute of an object at a particular time. For example, if your attribute is the translation of an object, such as the distance an object moves in a given amount of time, then perhaps you set a value (key) of 0 feet at time 0 seconds, then set another value (or key) at distance 2 feet at time 3 seconds. You have just set key frames and have just begun an animation.
Tangents are handled lines that control how a curve functions work.
This tutorial will assume that you already know how to set keys and select which attributes you want to animate. The purpose of this tutorial is to show you how to go about refining keys that you have already set so that your animation can flow smoothly. If these concepts are unfamiliar to you, it's a good idea to run through the tutorials set up by Alias|Wavefront beginning here at D:/AW/Maya3.0/docs/en_US/html/UserGuide/Anim/KeyAnimSetKey3.html (this link is assuming you are working from Sieg 228).
One more side note. It's usually a good idea to get rid of unnecessary keys. Static channels are keys that have remained the same value throughout the animation. There is basically no animation on these keys. These usually occur when you set a key frame on every attribute instead of setting the key frame selectively. Getting rid of these will make your graph editor less cluttered and easier to manage.
The outliner portion of the graph editor shows every single attribute that is keyed, regardless of whether or not there is animation on them. This not only makes it difficult to select which graphed line you want to select, but it also makes it difficult to pick out what exactly is animated from the outliner.
Now the lines in the graph have been reduced and it's easier to pick out the attributes that have changed values on them. As you can see, there's still so many lines to choose from, so the less junk there is on the screen (static channels) the easier your life will be when you manipulate your animation.
To delete the static channels, select Edit > Delete All By Type > Static Channels from the menu in Maya's main window.
We'll begin with some basic mouse and quick key tools. (LM = left mouse button, MM = middle mouse button, RM = right mouse button) When mentioning "selection", this can be the tangent, the key, or the entire curve.
When clicking and dragging the LM to the left, you select the entire curve. When clicking and dragging the LM to the right, you select only the keys that fall within the selection box you create.
When clicking and dragging the MM, you will pick the nearest point to your selected curve. What happens to your selection depends on which mode you are in (i.e., moving or adding keys).
When clicking the SHIFT key before pressing the MM, you will move things orthagonally from its origin point. But notice that if you do this and begin to move your mouse horizontally, your selection will only move horizontally. And if you begin to move your mouse vertically, your selection will only move vertically.
When clicking the RM, you get a quick pop-up menu of the menu on the top of the Graph Editor window.
"F" will frame your selection (if nothing is selected, then all curves) to fit into the size of your window.
ALT+MM pans your window.
ALT+MM+LM zooms your window.
ALT+SHIFT+MM pans your window horizontally only.
ALT+SHIFT+MM+LM zooms your window horizontally only.
DELETE will delete your selection.
We will begin by going through your options in the Graph Editor (Window > Animation Editors > Graph Editor). We'll just run from left to right through what each of the buttons do in the graph editor and give examples as to when you might use them.
Moves your selection.
Inserts a keyframe to sit along an existing curve.
Adds a new key to anywhere on the curve. This is similar to inserting a keyframe first, and then moving the key.
The number on the left ("7") is the selected key's time value. The number on the right ("92.207") is the selected key's numeric value.
Key tangents are important because they allow you to refine your keys to more than just setting their time and value. A majority of the animation work is cleaning up keys already set, and a majority of this will be fixing the curve tangents. For example, if you run through the Walk Tutorial or the Jump Tutorial without cleaning up the keys, you'll notice that the character will "slip" at times, or look choppy, or its feet will sink into the ground. Overall, it will just look weird. Now we'll go over types of tangents in the graph editor, tweaking techniques, and scenarios you might put all of this to use.
TYPES OF TANGENTS IN THE GRAPH EDITOR
Spline Tangents -- this is the set default when setting keys. It's for creating smooth and flowing animation. The problem with spline tangents can be that it's too smooth. It's the reason why you lose your character's feet into the ground or why things slide or ease into a sto
Linear Tangents -- This makes a straight line between two keys, instead of a curve. It is good for animating a linear transition in an animation, i.e., going from point A to point B at a constant rate. The problem with this tangent is that it can make an animation look choppy.
Clamp Tangents -- There's no default button for clamp tangents. This option can be selected from the Graph Editor window Tangents > Clamped. If you look at the example below, although the left key and the right key have the exact same value, because they are both splines, there is the point between them which results from the out-curve shooting up from value A before coming back down to value A at a different time for an adjacent in-curve. This causes the appearance of "slippage" or even "ground sinking" (in an example of a walk). Clamp tangents interpolate splines whose value of two adjacent keys are very close and makes it linear. This is also similar to flattening the tangent (explained later).
Stepped Tangents -- Like the clamp tangents, there is no button for this option and can be selected from the Graph Editor menu. Stepped tangents have curves whose out-curve is always horizontal and flat. The value changes at the key without gradation. A strobe light, for example, doesn't dim from off to on. It's either on, or it's off. To create a strobing effect, you would use a stepped tangent. (This example was taken from Alias|Wavefront online tutorial)
Flat Tangents -- As its name suggests, flat tangents simply flattens the curve to be horizontal. It is similar to clamping but is more flexible to use since you don't have to select two keys to interpolate a flat curve from. Flat tangents can be used where there's a pause in the action, such as in a bouncing ball. A bouncing ball eases into its peak, pauses, and eases out of its peak. You can see what flat tangents look like in the above graph example of a "dimmed light using splines".
Break Tangents --- Sometimes you want your "in-tangent" to be a flat tangent, while your "out-tangent" be a spline tangent. You can achieve this by breaking the tangent. Normally, a tangent is just one line. If you break the tangent, then you "snap" the tangent at it's midpoint, or where it's touching the curve. Now, when you manipulate the tangent handles, instead of the entire tangent being affected, only half the tangent is altered.
Unify Tangents --- Just as you can break a tangent, you can unify it as well. Unifying a tangent will allow both tangent handles to manipulate the function curve in conjunction to each other. NOTE: If you have altered the tangents by breaking it before, unifying the tangents will not make them come back together in a straight line. Look at the example below. Before being unified, just the "out-tangent" rotates. After being unified, then the "in-tangent" and the "out-tangent" rotate maintaining the same angle of relationship with each other.
Free Tangent Weight --- to free a tangent is to allow you to manipulate the length of the tangent itself. This is especially useful when you are trying to manipulate spline tangents. You can increase or decrease the length of the tangent so the tangent is easier to manipulate. First, you must make sure that the tangent is "weighted", meaning that you are able to manipulate its length. You can make it weighted in the Graph Editor window by selecting Curves > Weighted Tangents. (Conversely, if you wish to make sure a tangent cannot freed, you would select Curves > Non-weighted Tangents). Notice how the end of the tangent is an open square. This signifies that the tangent you're manipulating is free.
Lock Tangent Weight --- Once you have manipulated your tangent to a desired length, it's a good idea to lock it when you're done. Unlike converting it back to a non-weighted tangent, a locked tangent can be easily freed when needed (non-weighted tangents cannot be freed unless you specifically weight them as mentioned above). A locked tangent's length cannot be lengthened or shortened unless you unlock it. Notice how the end of the tangent is a closed square. This signifies that the tangent you are manipulating is locked.
Up until now, the tutorial was exclusively limited to the Graph Editor. The Graph Editor is where the majority of your key manipulation will be done. Another tool to use is the Dope Sheet. The Dope Sheet can be found in Window > Animation Editors > Dope Sheet...
The Dope Sheet is used primarily for manipulating the timing of the keys. This can be done in the Graph Editor as well, but it's more easily represented with the Dope Sheet's time bars. The manipulation of things in the Dope Sheet are exactly the same as in the Graph Editor, the only difference being that you have no curves or tangents to work with. It's a matter of preference as to which editor you use to manipulate your keys. Ideally, you should work with both windows, depending on what you are trying to accomplish. Below will be a quick tutorial on manipulating the timing of an animation using the Dope Sheet. These instructions can be applied to the Graph Editor as well.
Timing Manipulation --- "Manipulate" meaning you want to lengthen the time an animation runs, or you want to cut and paste keys, etc., while the values of the keys remain the same. You can easily change the timing of one or two keys, but this discussion will be about moving a large number of set keys on a multiple number of curves.
Before you manipulate the timing of your animation, it's usually a good idea to set a key frame on the very topmost node of your character at the beginning and end of the time frames you want to manipulate. Although this will create a lot of static channels, static channels can be easily deleted, as mentioned at the beginning of this tutorial. The reason for doing this is to guarantee that the positioning of the character remains the same although its timing has been altered.