Thursday, 6 October 2011

Animation Chronicles - Episode 2: Animation Controllers

I've created IK handles for my skeleton's feet, which allows me to quite easily pose them (e.g. in order to place the skeleton in a sitting position, I just have to translate the hip joint). Thing is, IK handles are a bit small and are hard to reach when the the skeleton is skinned. For this reason, I'm going to create controllers. We'll also see that it has other advantages.

A controller is nothing more than a normal mesh/object to which parts of the skeleton get constrained in various ways. Then, the controllers are the objects that are actually moved around and keyed. This has several advantages:
  • It makes it easier to pose a skinned skeleton.
  • You can constrain several joints to the same controller.
  • You can easily limit the transform to prevent anatomically impossible poses.
I will begin by creating controllers for the skeleton's feet. Controllers are usually Nurbs curves, which can be created from meshes (I've followed this video tutorial). I've simply created boxes that vaguely encompass each foot, like a shoe.

Then, I move the box's pivot to the ankle joint (using vertex snapping), for obvious reasons. Once that's done, I parent the foot's IK Handle to the box, and add a parent constraint on the toe joint to the box as well. This way, the foot will take the position and orientation of the box (which we can now call a controller).
Note that the IK Handle and the toe joint are parented differently. Obviously, the joint needs to stay in the skeleton's hierarchy, so I can't simply parent it to the controller. That's why I use a constraint. The IK Handle doesn't have this problem and thus can be directly parented to the controller.

Now, the entire leg is posed just by moving and rotating that single box. Easy, isn't it?