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.
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. 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.
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.
IK_Thigh.L
bone, hold Shift, select the D_Thigh.L
bone, press (Ctrl+ Shift + C), and choose the Stretch To constraint. D_Thigh.L
bone, change the Head/Tail field value to 1
, and click on the Reset button in the Stretch To constraint panel. D_LowerLeg.L
bone. 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: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.
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
. 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: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.
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.
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:
005-Stretch-toggle.blend
, which has the result of this recipe with a bone to act as the driver. 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: 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. 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: 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. 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.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
18.117.138.104