Icon

Animating The Inanimate, Part 3

Handling Handles

Last time we looked at morph targets as a character animation technique, and by my count, that particular piece contained no less than 57,491 instances of the word "morph." As we press on to the exciting world of handles, it's my personal goal to surpass that number in this article, aiming for a cool 60,000 mentions of "handles." By the end of this series (which will, mercifully, come with the next installment), there will probably be a great many words you will likely wish you've never heard of, but for now, I'll just concentrate on making you sick to death of the word "handles" and all its various derivatives.

First off, let me preface this piece by saying that I don't know if "handles" is even a real term for what I'm about to show you. One of the byproducts of being a freelancer is that I've sometimes found myself developing my very own Nell-like vocabulary for processes that may or may not have perfectly acceptable names in other professional circles, so over time I've taken to calling this particular technique "handles" amongst myself. That said, let's get into the long and the short of what handles are.

The concept of handles refers to the process of taking a model, associating target objects with it, and using the movement of the target objects to control the deformation of the base model. These target objects become, in effect, the handles which you grab in order to deform the associated base model, almost like the way you would use the handles on a marionette to control its movement. In LightWave (which, if you've missed the other articles in this series, is the 3D animation program I'm using), this technique is implemented through a series of plug-ins that, when applied to your base model, allow you to assign target objects to control various movements such as bending, twisting, and tapering (among others). In practice, these target objects will more often than not be null objects, which most, if not all, mainstream 3D packages implement in one form or another.

Thoroughly confused yet by that exemplary definition which was no doubt aided by my awesome command of the English language? Fortunately, I have examples I can turn to here to better illustrate the concept. I'm sure you all remember Mr. Tube from the last article; Mr. Tube surely remembers you. Anyway, he's kindly agreed to join us again today to help me demonstrate handles. Mr. Tube, indeed being a tube, just so happens to be the perfect shape for this example. Let's say that I want to have a looping 30 frame animation of Mr. Tube swaying his "head" around in a circular fashion (fig. 1).

(Either JavaScript is not active or you are using an old version of Adobe Flash Player. Please install the newest Flash Player.)
Figure 1: Mr. Tube swaying round and round. He's got the music in him.

To do this particular move using handles, I'll first bring Mr. Tube into the LightWave Layout environment. I'll then add two null objects for the handles, which I'll call n_tophandle and n_bottomhandle (I always preface null objects with "n_," so they're easy to pick out of selection lists and hierarchies and such). Since I know Mr. Tube is exactly one meter high, I'll set my n_tophandle object to have its Y axis position at one meter, and since Mr. Tube's center is actually set to be his bottom plane, I'll leave n_bottomhandle where it is (at coordinates 0,0,0). I'll then parent each handle to the tube object so they'll travel wherever Mr. Tube goes. This base setup is shown in figure 2.


Figure 2: The handles are the turquoise lines framing the top and bottom of the tube. The object hierarchy is shown in the Scene Editor window to the right.

Now comes the fun part. With the tube object selected, I'm going to open up the Item Properties panel, and with the Deform tab active, I'm going to add the Deform:Bend displacement plug-in (fig. 3). I haven't told the plug-in what handles to use yet, so by default it shows up as inactive. That's about to change. Double-clicking on the plug-in name brings up the plug-in configuration box, which I'll tell to use n_tophandle as the effect handle, n_bottomhandle as the effect base, and the Y axis to deform along (fig. 4). Once that's done, the Deform:Bend plug-in reflects these settings in the Item Properties panel (fig. 5). Now that Mr. Tube is set up the way I want him, all I need to do to animate him bending is to select the n_tophandle object and move it around at various points along the timeline. In this case, to make Mr. Tube sway in a circle, I just made keyframes along the timeline for the n_tophandle object's X and Z coordinates, and the top of the tube bends to follow. That's it! Pretty easy, huh?


Figure 3: The Object Properties panel as shown after the Deform:Bend displacement plug-in was first added.


Figure 4: The Deform:Bend plug-in options.


Figure 5: The Object Properties panel, updated to reflect the handles assigned to it.

Of course, as simple as this is conceptually, you can combine several deformation plug-ins with more than two handles to achieve a pretty wide range of motion. Let's once again turn to our old buddy Al the Calculator for a closer look.

Now, let's say I have a script that calls for a three-second sequence where Al needs to "look around frantically." That particular lack of specificity notwithstanding, I can glean from the script that Al needs to have a pretty wide range of movement, and after noodling on it a bit, I've decided that I can get what I need out of Al by making it so he can twist, bend, and taper. After even further noodling, I've determined that I'm going to need a set of four null objects to serve as Al's handles:

1) n_base - this is the common base for all of the other handles, sitting at the very bottom of Al's "body." If I had to have any of the deformations start to affect Al from any point other than the bottom, I would have needed to create additional base handles further up Al's torso, but for this sequence, they can all share the same base handle.

2) n_bendhandle - this handle sits at the top of Al's "head" and will control how Al bends.

3) n_twisthandle - this handle also sits at the top of Al's "head" and will control how Al twists.

4) n_taperhandle - ditto the other two handles, except this one will control the taper.

Figure 6 shows Al's hierarchy in LightWave's Scene Editor after I've added all the handles and parented them to Al. I'll then open up the Al's deform tab and add the Deform:Bend, Deform:Twist and Deform:Taper plug-ins, and then link each appropriate handle to its corresponding deformation plug-in (fig. 7). Now Al's all handle-d up and ready to rock -- all that's left to be done is to animate the handles and Al will follow along.


Figure 6: Al's parenting hierarchy.


Figure 7: Al's Object Properties panel showing which handles are assigned to the three deformation displacements.

Speaking of animating the handles, maybe now is a good time to explain a bit about how they work. Depending on which type of deformation is applied to the handle, you're going to need to move, rotate, or stretch the handle to get it to do what you want. Whatever do I mean? Well, let's say you have a twist handle. You wouldn't expect a twist handle to actually do its thing by moving it around the stage, would you? I mean, by definition a twist is a form of rotation, and the same goes for our virtual handles. Affecting the rotation of the twist handle will get Al to twist, while affecting it's movement won't do anything at all. As for our other handles, the bend handle is affected by movement, and the taper handle is affected by stretching, which fortunately for us is a pretty intuitive way of doing things. Now, some of you may be wondering why I needed to make all these handles in the first place if three distinct actions control all of Al's deformations. And you'd be right. Technically, I could have used a single handle and applied all three deformations to the one handle, since moving, rotating, and stretching the handle can all be controlled independently. However, if you've ever tried to keep up with relative coordinates of any model once you begin to add rotation and scale into the mix, you'll know why I have three separate handles. If I could stretch my marionette metaphor from earlier just a bit further, imagine what a contorted claw your hand would become if you tried to control a complex marionette's movement with a single handle. Sure, it's possible, but can you say carpal tunnel? Trust me, it's a lot easier on the brain to keep the three actions we're assigning to Al separate in this case, so I usually assign one control handle for each deformation I'm planning on doing.

In any event, Al is chock stinkin' full of handle goodness and ready to be animated, and after I've done the deed, Al is, in fact, now looking around frantically as shown in figure 8. Of course, this was a real quickee job for the purposes of demonstration, so my usual caveat applies that I would probably perform WAAAYYYYY more tweaking of Al's movement here if this were actually a production sequence, but I'm sure the producer will be oh-so thrilled nonetheless. And besides, you can plainly see how much range of motion is available to Al through just the addition of four null objects and three deformation plug-ins, so my work is done here.

(Either JavaScript is not active or you are using an old version of Adobe Flash Player. Please install the newest Flash Player.)
Figure 8: The finished shot. Doesn't Al look frantic?

So now that we've got two character animation techniques under our belt, next time we're going to wrap up the series with a look at bones. As an added bonus, our seemingly forgotten friend Ralph the Peanut will finally be getting some action, so don't miss it!

^ Top of Page

Got Feedback? to send an email. I'll do my best to answer. Really.