Stretch those limbs!

If you want to build a cartoon character rig, it's a good idea to enable it to squash and stretch. Even if your character is not cartoony, some animated shots may require a little stretching in order to achieve more convincing and clear poses. Depending on your project and schedule, it can be a good idea to enable this feature in all of your rigs.

How to do it...

  1. Open the file 005-Stretch.blend. It has an IK leg setup similar to the result of the previous recipe. Move the Foot.L bone around and see how it works. We need the leg to stretch to the position of the foot controller.
  2. Select the IK_Thigh.L bone and go to the Bone tab, under the Properties window. You'll see a panel called Inverse Kinematics. Change the Stretch field value to 0.1. Do the same for the IK_LowerLeg.L bone.

    If you move the foot controller, you'll see that IK chain bones change their size, but the leg mesh doesn't follow. It happens because we have two chains: one for deforming the mesh and another for the IK movement. The deformation chains only have Copy Rotation constraints, so it won't follow the size of the IK chain bones.

    You can see the results in the following screenshot:

    How to do it...

    Note

    If we were using only one chain to both deform and have the IK constraint, we would have a bigger problem: the stretching would not retain the mesh volume. This is one reason why we need separate bone chains. We need one to give the IK motion, while the other follows it maintaining its volume.

  3. Select the Foot.L controller and reset its position (Alt + G) and rotation (Alt + R) if you have it anywhere else than its rest position. Go to the wireframe (Z) visualization mode in the 3D view, so you can view both chains of bones clearer.

    To stretch our mesh we're going to keep the Copy Rotation constraints applied on the deform chain and add another one: the Stretch To constraint.

  4. Select the IK_Thigh.L bone, hold Shift, select the D_Thigh.L bone, press (Ctrl+ Shift + C), and choose the Stretch To constraint.
  5. Things will seem very wrong and messy, but don't panic. Go to the Properties window, under the Bone Constraints tab for the D_Thigh.L bone, change the Head/Tail field value to 1, and click on the Reset button in the Stretch To constraint panel.
  6. Repeat steps 4 and 5 for the D_LowerLeg.L bone.
  7. Now, select both D_LowerLeg.L and D_Thigh.L bones and move (M) them to a disabled armature layer. Move the Foot.L controller around and you'll have a good stretchy IK leg. The next screenshot shows the result with the IK chain hidden for clarity:
    How to do it...

    A good thing about this setup is the fact that you are able to adjust the amount of stretching in each segment of the limb. You can, for instance, select the IK_Thigh.L bone and scale it (S) up and down to achieve the desired amount of stretching and squashing.

  8. This file has some ready-to-use shapes for the leg IK bones called SHAPE_Legs. Select the IK_Thigh.L bone, go to the Properties window, in the Bone tab and set the Custom Shape value in the Display panel to SHAPE_Legs.
  9. Repeat step 8 for the IK_LowerLeg.L bone. After that, scaling up and down both bones gives you a flexible stretching setup, as you can see in the next screenshot:
How to do it...

This process of adding Stretch To constraints to the leg bones can also be applied to IK arms and FK setups. Refer to the file 005-Stretch-complete.blend to the see the complete recipe for your reference.

How it works...

By using separate bone chains for deformation and control, along with the Stretch To and Copy Rotation constraints applied on the deformation bones, you can make your character squash and stretch its limbs easily by scaling the controller bones.

There's more...

And what if you want to turn the ability to squash and stretch on and off? Thanks to the new "everything can be animated" paradigm in Blender 2.5, it's just a matter of creating a driver to control the influence of the Stretch property on the IK chain:

  1. Open the file 005-Stretch-toggle.blend, which has the result of this recipe with a bone to act as the driver.
  2. Select the IK_LowerLeg.L bone, go to its Bone tab in the Properties window, right-click on the Stretch slider, and choose Add Driver, as shown in the next screenshot:
    There's more...
  3. Go to a Graph Editor window in the Drivers mode and click on the name of the driver you've just created: IK Stretch (IK_LowerLeg.L). On the Properties tab (N), choose Armature/LegStretch.L in the Ob/Bone fields and check the Local Space box.
  4. Finish by entering var*.1 (without quotes) in the Expr field. This is because a value of 1 for the stretch property is too much. The next screenshot shows the driver values:
    There's more...
  5. To replicate the driver to the IK_Thigh.L bone, go to the Bone tab on the Properties window for the IK_LowerLeg.L bone, where you've created the first driver.
  6. Right-click on the purple slider (the color indicates it's driven) and choose Copy Driver. Then select the IK_Thigh.L bone, right-click on the Stretch slider, choose Paste, and you're done! The file 005-Stretch-Toggle-complete.blend has this complete setup.

See also

Chapter 5: Creating IK legs with a three-pivot foot

Chapter 1: Making an IK-FK switcher

Chapter 1: Customizing shapes and colors for your bones

Chapter 2: How to create a stretchy spine

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.138.104