Tuesday, August 02, 2011

AM Tutoring Tips and Tricks part 10 - Defeat Animator's Voldemort.

It's about time to face animators' Voldemort - Constraints. Constraining objects is tricky for animators, if we do it right, it can help us save a lot of time, and make things easier to animate; but it can also put us in an endless hell if we do it wrong. I'm not an expert of programing type stuff, but I wish I was. So the trick I'm going to share is more like my personal experience, and as usual, please kindly share your magic if you know anything that might be better.

There is a universal principle for me when using parent constraints. I usually make the heavier object the parent, and the lighter object the child. The heavier object will be leading the action most of time, and it will be easier to control if I make it the parent. For example, if there is a guy trying to lift a heavy ball, then I'll make the ball the parent, and the hands the child. This way I can animate the ball up and down first, and then work on the hands to eliminate the IK feeling.

Before we dive into animation, I would like to explain the way I usually apply constraints. This trick is very useful, especially when animating referenced files.

First of all, I'd like to clarify the differences between "Parent" and "Parent Constrain". "Parent" (p) will allow you to animate the child’s attributes, but is not able to be switched on and off. "Parent Constrain" is able to be switched on and off, but you can't animate the child’s attributes when it's on. So if you are using a referenced file, then the best way to set up a parent constraint is making an alternate controller. So you'll be able to switch the constraint on and off and animate attributes as well.

For the alternate controller, the goal is to build a controller which has the same local axis as the original one.

Step 1: Create a locator, and zero out the translation and rotation values.

Step 2: Select the new controller, and create a group above it (ctrl+g)
Step 3: Select the original controller you would like the alternate controller to control, in this case, the right IK hand, and then shift+select the new controller group, uncheck "maintain offset" in the "Parents constrain" option box, and hit apply. You should see the new controller snap to the original controller in this step.
Step 4: Open the outliner, and DELETE the constraint we just created under the new controller group. Now you have a new controller which has the same local axis as the original controller.
Step 5: Select the new controller, then shift+select the original controller, and apply "Parent Constrain" (maintain offset shouldn't make any different at this point) *
After the alternate controller for the hand is built, here is my rule, I'll only set keys on the alternate controller when the constraint is on, and set keys on the original controller when the constraint is off.

The last step is easy (trust me.), select your alternate controller group, then the ball controller, and "Parent" (p) them. DONE, now you should have an alternate controller, which is controlling the original controller, parented to the ball, and is also free to animate.

In sum, I hope this is not too confusing. I'm sure this is not the easiest way to do it, and there must be a lot of mel scripts that can do the same thing with one click. I'd like to share them with you if I find any. But understanding how it works before using magic will help you feel more comfortable fixing problems if something goes wrong (it always goes wrong....always...)

*Make sure you set a key before the parent constraint is applied, so it will add an attribute which allows you switch the constraint on and off.

Article created by Erik Lee, refined by Joseph Taylor.

2 comments:

Matthew Maners said...

Hey Erik now this was waaaay useful, awesome. When you get back to work you will need to show me this setup.

Erik Lee said...

SURE THING!
I'm glad you found this helpful, Matt.