<$BlogMetaData$>

Splinophobia

Many rookie 3D animators (and even some veterans) are uncomfortable, perhaps even intimidated, by the spline editor in their animation software. Perhaps they were attacked by balls of colored yarn as children; perhaps they confuse it for a map of the London Underground; or maybe they just can't make sense out of jumble of colored squiggles. Whatever the reason, it's a shame, because the spline editor is a powerful animation tool.

I personally adore working with splines; sometimes I even animate directly in the spline editor without touching my model. By simply knowing what a spline should look like I can predict generally how my object will move, diagnose and fix problems in my animation, and get a jump on my polish phase.

In this two-part tutorial I'm going to try to impart to you some simple rules and concepts to help you better understand the meaning and power of splines (or "function curves", as they are sometimes called). I'll be using Maya's Graph Editor for my examples, but the principles I illustrate here apply to any spline editor for any decent 3D animation program. Hopefully by the end of this you'll be on your way from splinophobe to splinophile!

The Basics

I'm going to start with the most basic explanations of spline editors just to make sure I don't leave anyone behind. I'll use a simple animated example: a ball moving from one position to another (I'll call the positions "Pose A" and "Pose B").

The red dots between the two poses above show us the spacing of the animation. The ball is translating along the X axis, so I'll load the Translate X channel into the spline editor and examine it.

The horizontal axis of the graph represents Time (measured in frames), and the vertical represents Value (this can be inches, meters, degrees, percent, etc.). The black dots represent the keys I've set, and a red spline passes through all of these keys to show you what is happening between the keys. As the spline travels across the graph from left to right it shows us the value of the X Translation as it moves forward in time. So on frame 1 the ball's Translate X is 0, and on frame 30 it's 10.

Note that I have 4 keys set: 2 for Pose A and 2 for Pose B. This is because I want the ball to hold in a pose at the beginning and the end. The spline between the first two keys and the last two keys is perfectly horizontal, meaning that there is NO movement. This is because the Value is not changing between these keys, only the time is changing. Movement only occurs where there is a change in both value and time (and thus a slope in the spline), in this case, between keys 2 and 3. The steeper the slope, the faster or greater the movement. The more the slope flattens, the slower or lesser the movement. Make sense?

 

The direction of the spline's slope can tell us something about the direction of the object's movement along the chosen axis, in this case Translate X. Reading from left to right, if the spline is ascending that means the value is increasing and the ball is moving to the right. If the spline is descending, that means the value is decreasing and the thus the ball is traveling to the left. It's not so important to memorize what slope corresponds to which direction; the important thing to note is that a change in the direction of the slope means a change in the object's direction. This will become important when I talk about anticipation and overshoot. Still with me?

The last thing I want to mention is the tangent handles, which appear above in brown. If you've used vector-based art programs like Adobe Illustrator then you're familiar with bezier paths. Splines behave similarly. Every key on a spline has tangent handles that you can lengthen or rotate to affect the shape of the spline as it passes through the key. These are necessary to put the curves into the splines and allow for graceful transitions between your keys without having to manually add a lot of extra in-between keys and breakdowns. You can do away with the tangent handles entirely by converting your keys to "linear" or "held", but this will require more work down the line to get graceful motion and timing. If you wanted to you could key every control on every frame, effectively doing your animation on one's and not allowing the spline tangents to have any influence on your animation. While sometimes this is necessary for fast or precise actions, it is not an efficient way to work and does not take advantage of what the computer is best at: smooth inbetweens.