Class 3 - Week 7 - Locking Elbows to a Surface

It looks like you need to have your character plant their elbow on
something. Lucky for you, this is the easier of the two methods!


In this first section, I'll go over the method I use to lock elbows
down to a surface, while still giving me the ability to make sure
the animation stays consistent. Okay, enough jibberjabbing, let's
get started!
  • Select the Finger Controls and set "Ik Enable" to 1.
  • Select the Ik Controller (the one at his wrist) and set the "Elbow PV" to 1. This will turn on a controller that allows you to orient the elbow.
  • Select the PV Control that just popped up and set "Elbow IK" to 1.
  • This will now cause the elbow joint to snap to the PV Control. Now you can move the PV Control to the surface you would like his elbow to plant on and voilĂ , you have an elbow that won't need to be counter animated all the time!

But what's this? You say that now the upper and lower arms are
stretching and destroying the rig? Sadly, this is a side effect of
planting the elbow. Now you can just animate it by eye and hope that
the length stays consistent. But, more often than not, you'll end up
with a wiggle in the arms. Fortunately we have a secret weapon that
will help us with this: the Distance Tool!

You'll find it under "Create > Measurement Tools > Distance Tool".
Once you have it activated, just click twice on any surface. This will
create two locators connected with a line that will automatically
calculate the distance between both locators.

With the Distance Tool, we'll be able to measure the length of
Stewie's arm while it's in its default position, then use that
number to make sure that his arms don't stretch or shrink while his
elbow is planted.

To set this up properly, the first thing you'll need to do is make
Stewie's geometry selectable. To do that, select his main layout
control (the big circle around his feet) and hit the right arrow
button. This will select the "stewie_ac_C_visibility" node where you
can find the "Geo Display" attribute. Set this from "Referenced" to
"Normal" and you'll now be able to select all of Stewie's geometry.

  • Use the Distance tool to create two locators with the measurement between them.
  • Select the upper arm of the planting elbow, then select one of the measurement locators.
  • Go to "Constrain > Parent Constrain > Options".
  • Make sure "Maintain Offset" is unchecked and hit "Add".
  • Now select the elbow, then the second measurement locator.
  • Parent Constrain this the same way as before.

That's one down, one more to go.
You'll want to create a new pair of measurement locators, but this
time, constrain one to the elbow and the other to the finger controls.

You should now have a system that tells you the exact length of the
arm at all times. By default, Stewie's arms should be around:

Upper arm: 3.990618
Lower arm: 3.841592

If you don't want to see so many digits, select the number, open the
attribute editor and under the "Extra Attributes" section, you'll
find "Precision" which will allow you to set how many decimal points
there are. This is great because lots of numbers can be quite a mess
at times, although I would recommend not going below 3 decimals as
it could lead to some slight wiggling.

Now you'll be able to keep the arm at a consistent length as you're
animating. This will still require a bit of fiddling to keep it from
stretching but it does beat having to do it all by eye.


We've got the basics for planting the elbow but all this counter
animating to keep the arm from wiggling can be quite a pain. What we
need is a way to keep the arm at a consistent length without having
to constantly tweak it. Sadly, we won't be able to do that with the
upper arm as that would cause the elbow to unplant itself, but we
can do something for the lower arm!

This will be much easier to set up while Stewie is in his default "T"
pose as rotations will line up much nicer.
  • First, create a Nurbs Circle by going to "Create > Nurbs > Circle" and give it a new name by double clicking it's name in the channel box. For my example, I'll be naming it "pElbow_Control".
  • Select the Elbow PV control, then the newly created pElbow_Control.
  • Go to "Constrain > Parent > Options". Make sure "Maintain Offset" is unchecked and hit "Add".
  • Select the pElbow_Control, then the Ik Wrist control.
  • Go to "Constrain > Parent > Options", but this time, make sure "Maintain Offset" is checked and uncheck "Rotate All" in the
  • Constraint Axes section. This will allow us to keep more control on the wrist later on and reduce counter animation.

What we have just created is basically a Fk/Ik hybrid and it will
allow you to rotate the pElbow_Control ring to animate the lower arm
while the elbow is planted. This completely removes the need to
counter animate the lower arm as well as making it a bit easier to
get nice arcs. Just remember, once you've turned on this control
system, avoid animating the Translation of the Ik wrist control as
it will just end up snapping back.

But what if you need your character to lift his arm from the surface
afterwards? To turn off this system, just set a key on the Ik wrist
to create a "blend parent" attribute and set it to 0. This will
allow you to animate the Ik wrist as usual.


Our system now allows you to plant the elbow and animate it without
much counter animation, but turning it on/off whenever the elbow
plants or lifts off the surface is quite the headache, especially
with all the attributes you need to change everywhere. So why not
automate it for us?

To begin with, we'll need a new attribute that will allow us to
control everything. Select the Ik wrist control and go to "Modify >
Add Attribute".

Name the new attribute something you'll remember. I'll be calling
mine "ElbowPlant". Also set the Data Type to "Boolean" to make the
attribute an on/off switch.

Now that we've got our new attribute, we need to set what it
controls. To do this, go to "Animate > Set Driven Key > Set..."
which will allow us to key other attributes to a specific value when
the ElbowPlant attribute is set to off and another value when it's
set to on, effectively making a switch.

Select the Ik wrist control and in the Set Driven Key window, hit
the "Load Driver" and in the top right pane, select the "Elbow
Plant" attribute. We now have the attribute that will control the
rest, but what are the attributes that will need to be controlled?
Here's a list of which objects and attributes we'll need. Select
each of the objects below and load them as the Driven in the Set
Driven Key window.

  • From the Ik Wrist control, we'll need the "Blend Parent" attribute.
  • From the Elbow PV, we'll need the "Elbow Ik" attribute.
  • From the pElbow_Control, we'll need the "Visibility" attribute.

We now have everything we need to get started.
  • To begin, set the Elbow Plant attribute to On.
  • Blend Parent to 1.
  • Elbow Ik to 1.
  • Visibility to 1.

In the Set Driven Key window, make sure that the "Elbow Plant"
attribute is selected for the Driver, then select each of the Driven
attributes listed above one by one and hit the Key button at the
bottom left of the window. For example, make sure the Elbow Plant
attribute is selected then under the pElbow_Control, select the
Visibility attribute and hit the key button.

That's half the switch. Let's get it so it can turn off now.

The process is exactly the same but this time set the attributes as
  • Elbow Plant attribute to Off.
  • Blend Parent to 0.
  • Elbow Ik to 0.
  • Visibility to 0.

Key them all individually as you did earlier and with that, you
should now have a system that allows you to plant an elbow solidly
onto a surface, animate the lower arm without having to counter
anything, and even turn it all on and off with the change of the
Elbow Plant attribute!

There you have it. If you've made it all the way to the end of this
tutorial, congrats and thank you. I hope some of it has been helpful
to you and please remember that the intermediate and advanced
sections are not needed and will not give you a fantastic looking
animation. They only thing they help with making the constraints
easier to manage. So if you find it too difficult or if it just
isn't working for you, don't worry about just leaving it behind.

No comments:

Post a Comment