FK-IK Spine Rig

by Brian Immel

This tutorial will instruct you how to build a FK-IK Spine for character animation. This tutorial assumes that you know the basics of Set Driven Keys, creating and modify IK spline handles, and using constraints.

This tutorial is broken down into six sections. You should follow these sections in sequental order. Creating the Spines talks about setting up the spine joints. Setting up the Controllers takes us through the process of setting up the controllers for the spine. Set Up the IK builds the IK spine. Constrain the Joints walks use through the <sarcasm>extremely fun</sarcasm> process of constraining one set of joints between two other sets. SDK the FK Joints shows us the way to the promised land through 40 days and 40 nights of setting up Set Driven Keys that control the FK spine. By Tying Up Loose Ends, we connect the all the control groups to the main controller.

Creating the Spines

1. Create the main spine too look like Figure 1. Starting from the bottom, name the joints in this spine: 1. waist, 2. spine_base, 3. spine_lower, 4. spine_mid, 5. spine_upper, and 6. chest. These joints will be used as the deforming joints. For organizational reasons, create a new layer, name it skeleton, and put these joints in it.

2. Select the waist joint and duplicate it. Rename all the joints with the prefix FK_. These joints will handle the FK interactions of the spine rig. Select the FK_waist joint, group it, move the pivot to sit on top of the joint called FK_waist. Rename this group to FK_spine_group. For now, create a layer named FK and put these joints in this new layer. You should color this layer differently than the previous layer.

3. Reselect the waist joint and duplicate it one last time. Rename all the joints with the prefix IK_. Make one last layer called IK and put these joints in it. You should color this layer differental that the previous layers. Reroot the IK_waist as the base for this spine. We will need the spine to have this order of the hierarchy for the IK spline later.

These joints will handle the IK interaction of the spine rig. The purpose of these three joint hierarchies to set up a system that allows us to switch between FK and IK controls and a blend in between.

Top

 

Setting up the Controllers


In this section, we are going to set up the controllers for all the spines. We will create three controllers out of NURBS curves and add custom attributes to the main controller.

1. Create the first curve and point snap it to the waist joint. Name this curve IK_lowerSpine. Group and center pivot on this curve. Rename this group to IK_lowerSpine_group.

2. Create the second curve and point snap it to the chest joint. Name this curve IK_upperSpine. Group and center pivot on this curve. Rename this group to IK_upperSpine_group. These groups will come in handy later when we constrain them to follow the main controller.

3. Create the final curve and point snap it to the spine_base joint. Name this curve Torso_Controller. Manipulate the Torso_Controller curve to look like the curve in Figure 4.

4. Put all of these curves in a new layer called Controllers.

5. Scale these curves as necessary. Freeze transforms on all of these curves. It is very important to freeze the transforms on these curves. These zero'd-out attributes will serve as our spine's reset positions.
6. Select all the curves and Lock and Hide (select attribute(s) and right-click on Lock and Hide Selected) the Scale and Visibility attributes. This rig will not be using these attributes.

7. Select the Torso_Controller and add this attributes (Modify > Add Attributes) with their respective values:

Attribute
Min
Max
Default
FK_IK_Spine
0
1
0
Spine Bend
-10
10
0
Spine Side
-10
10
0
Spine Twist
-10
10
0
Hip Bend
-10
10
0
Hip Side
-10
10
0
Hip Twist
-10
10
0

 

 

Table 1: Torso_Controller custom attributes

The controllers should be ready to go go go. At this point, you should save your file You know, like just in case your super exgirlfriend decides to rip up your apartment.

Top

 

Set Up the IK

This section sets up the IK joints with an IK Spline that will allow the spine rig to give a more fluid, dance-like ability.

1. Go to Skeleton > IK Spline Handle Tool option box. In here, disable Auto Parent Curve and set the Number of Spans to 2.

2. Click on the IK_waist joint and then on the IK_chest joint. Rename this IK handle to IK_spine and the curve it generated to IK_curve.

3. Next we are going to set up the IK_curve with a series of clusters that we will use to control the IK spine. Select the IK_curve and assign a cluster (Deform > Create Cluster) to each CV. These clusters should not be relative (Deform > Create Cluster > option box, Relative = disabled).

4. Name these cluster IK_cluster## starting with 01 at the bottom of the chain and ending with IK_cluster05 at the top of the spine (Figure 5).

5. Select IK_cluster01 through IK_cluster03 and group them. Center the pivot and rename this group to IK_lowerCluster_group.

6. Select IK_cluster04 and IK_cluster05 and group them. Center the pivot and rename this group to IK_upperCluster_group.

7. Parent Constrain (Constrain > Parent with offsets enabled) IK_lowerCluster_group to IK_lowerSpine.

8. Parent Constrain the IK_upperCluster_group to IK_upperSpine.

9. Hide the IK_curve, IK_spine, and all the clusters. Hiding these objects will help reduce visual clutter and reduce any chance of animating the wrong items. Part of the main idea of this rig it to be able to animate everything from the control curves. In this case, the IK spine is being controlled by the IK_lowerSpine and IK_upperSpine.

10. Save your file before a band of cursed pirates attack your hideaway.

Top

 

Constrain the Joints

In this section, we will set up the relationships between the deforming, IK, and FK joints.

First joint
Second joint
Last joint
IK_waist FK_waist waist
IK_spine_base FK_spine_base spine_base
IK_spine_lower FK_spine_lower spine_lower
IK_spine_mid FK_spine_mid spine_mid
IK_spine_upper FK_spine_upper spine_upper
IK_chest FK_chest chest

Table 2: Parent Constraints of the deforming joints

1. In the Outliner (Window > Outliner), select the following joints in their respective selections and parent constrain each set:

After setting up the first Parent Constraint, use the "g" key to repeat the last action used to speed up the parent constraining process a bit.

2. In the Hypergraph (Window > Hypergraph), select the waist joint and then click on the Input and Output Connections button. Select the waist_parentConstraint1 node. Open up the Set Driven Key window (Animate > Set Driven Key > Set option box). Next, select the Torso_Controller and click on Load Driver in the SDK window.

3. In the Driver section, select the FK_IKSpine attribute.

4. In the Driven section, select the waist_parentConstraint1. Highlight the IK_waistW0 and FK_waistW1 attributes. In a nutshell, we are wiring the FK_IK Spine attribute to blend the weights of the parent constraint of the waist joint between the FK and IK joints with the same name. The default value of 0 in FK_IK Spine tells the rig to be in FK mode. When the value is set to 1, the deformer spine will follow the IK spine.

5. In the Channel Box, change the value of the IK_waist W0 to 0. FK_waistW1 should be left at 1. This step establishes the default behavior of the spine to be in FK mode.

6. Click Key in the SDK window.

7. Select the Torso_Controller in the Driver section and change the attribute value to 1 in the Channel Box. In the Driven section, select the waist_parentConstraint1 attribute. Switch the values of IK_waistW0 to 1 and FK_waistW1 to 0 in the Channel Box. This step establishes the spine behavior to follow the IK spine.

8. Click Key in the SDK window.

9. Repeat steps 2-8 subbituting waist with spine_base, then spine_lower, spine_mid, spine_upper, and chest until all the deformer joints' constraints have been SDK'ed.

10. Now that the hard part is done, we can relax. Kick back and chill for a moment. Don't forget to save your file at this point.

Top

 

SDK the FK Joints

This section covers setting up the FK joints for automation via the Torso_Controller.

1. Select the FK_spine_base, FK_spine_lower, FK_spine_mid, FK_spine_upper, and FK_chest joints. Right-click on the Rotate Z attribute and select Set Driven Key.

2. Select the Torso_Controller and in the SDK window, click on Load Driver. Highlight SpineBend in the upper section. In the lower section, with all the joints selected, highlight rotateZ (if it isn't selected already). Hit Key. We just established a connection between the SpineBend attribute and the RotateZ attribute of the selected joints.

3. Change the value of the SpineBend to 10.

4. Change the value of RotateZ of the selected joints to -30.

5. Hit Key in the SDK window.

6. Change the value of SpineBend to -10.

7. Change the value of RotateZ of the selected joints to 30.

8. Hit Key in the SDK window.

9. Reset the value of SpineBend to 0. We now given the FK spine the ability to bend forward and backward.

10. In the Driver section, select SpineTwist. In the Driven section, with all the joints still selected, highlight the attribute called rotateX and hit Key.

11. Change the value of SpineTwist to 10.

12. Change the value of RotateX of the selected joints to 30.

13. Hit Key in the SDK window.

14. Change the value of SpineTwist to -10.

15. Change the value of RotateX of the selected joints to -30.

16. Hit Key in the SDK window.

17. Reset the value of SpineTwist to 0. The FK spine can now twist side to side a total of 150 degrees.

18. In the Driver setion, select SpineSide. In the Driven section, with all the joints still selected, hightlight the attribute called rotateY and hit Key.

19. Change the value of SpineSide to 10.

20. Change the value of RotateY of the selected joints to 30.

21. Hit Key in the SDK window.

22. Change the value of SpineSide to -10.

23. Change the value of RotateY of the selected joints to -30.

24. Hit Key in the SDK window.

25. Reset the value of SpineSide to 0. The FK spine can bend sideways.

26. Repeat steps 1-25 replacing all the joints with FK_waist joint and the Spine attributes with Hip Attributes.

27. Save your work! Don't let it get flushed away!

Top

 

Tying Up Loose Ends

Finally, we need to connect the FK and IK spines to the Torso_Controller so that they will move with the main controller's translate and rotation.

1. Select the Torso_Controller first. Next, select the FK_spine_group. Parent Constrain. We must parent the FK group and not the FK_spine otherwise we will not have a clean SDK with the Torso_Controller.

2. Select the Torso_Controller first. Next, select the IK_lowerSpine_group. Parent Constrain.

3. Select the Torso_Controller first. Next, select the IK_upperSpine_group. Parent Constrain. Again, we must parent constrain the groups of the IK spines. If we parent constrain the IK spine curves themselvers, we wouldn't be able to animate the translate or rotate attributes.

4. Save your work!

After all your hard work, your spine rig should be able to complete the motions in this image:

Don't forget to stretch before you engage in any heavy physical activity!