“Creating IK to FK blends with Channels and Nodes”
On most animation rigs and setups, Animators expect to be able to blend from IK to FK and back to fit their preference or need for the animation. Limbs like the arms and legs are the main uses here, but a similar method could work for tails and such.
Why nodes over SDK’s (Set Driven Keys)?
In Maya, nodes are calculated faster the SDK’s. I believe using node takes less time to setup and less likely to error, then having to key separate SDK’s. In the end, this is simply another way of doing a common process in Maya, if you feel SDK’s work better for you or your own way does, then by all means, this is defiantly not set in stone.
*This tutorial assumes that you’re fairly comfortable with Maya basics.
Download These Files Before Starting
-Tutorial Package - .5mb - (includes resource files and word doc of tutorial)
Table of Contents
- Creating the Joints to blend to and from
- Constraining the Joints
- Create the Control to drive the blend
- Creating the Multiple/Divide Node
- Connecting the Multiple/Divide Node
- Creating and connecting a Reverse Node
- Seeing it work
- Going from here out
- The Why
Creating the Joints to blend to and from:
1. Create your original joint chain
*In this example, it'll be Shoulder, Elbow, Wrist created in the top view
2. Duplicate your chain twice (select Shoulder, ctrl+d) and name them accordingly
-IK_Shoulder, IK_Elbow, IK_Wrist
-FK_Shoulder, FK_Elbow, FK_Wrist
-Bind_Shoulder, Bind_Elbow, Bind_Wrist
Constraining the Joints:
3. Orient constraint (all axis, maintain offset), Bind_Shoulder to IK_Shoulder and FK_Shoulder
*Selection order is important here. Select IK_Shoulder first, then FK_Shoulder, then Bind_Shoulder, then apply the constraint.
4. Repeat this for Elbow and Wrist
*Again, selection order is important
5. Select each constraint in the outliner and in the Channel box, set the Interp Type to Shortest
Create the Control to drive the blend:
6. Create a Nurbs Circle, name it Switch
*You could just skip this step if you have a control already
7. Select Switch, Modify > Add Attribute
8. Click OK
Create the Multiply/Divide Node:
9. Windows > Rendering Editors > Hypershade
*In the HyperShade Window
10. Create > General Utilities > Multiply Divide
11. Name this node, IKFK_MD and set Input X to .1
Connecting the Multiply/Divide Node:
12. Select Switch from the Outliner and middle mouse drag it into the work Area of the Hypershade
13. Connect the Output of Switch.IKFK to the inputX of IKFK_MD
*To do this right click and drag over the black arrow at the bottom of the Switch node, to the select IKFK from the list, then click and drag over the bottom Left arrow on IKFK_MD node, select inputX
14. Select Bind_Shoulder_orientConstraint1 from the Outliner and middle mouse drag it into the work Area of the Hypershade
15. Connect the output of IKFK_MD.inputX to Bind_Shoulder_orientCostraint1.FK_ShoulderW1
16. Repeat step 14 and 15 for Elbow and Wrist constraints
Creating and connecting a Reverse Node:
17. Create > General Utilities > Reverse, name it IKFK_Rev
18. Connect IKFK_MD.outputX to inputX of IKFK_Rev
19. Connect IKFK_Rev.outputX to Bind_Shoulder_orientConstraint1.IK_ShoulderW0
20. Repeat step 18 and 19 for Elbow and Wrist
Seeing it work:
-In the provided Maya file you can scrub the timeline to frame 30 then adjust the IKFK value on Switch.
-In your own file, offset on of the chains (either the IK or FK) then adjust the IKFK value on Switch.
Going from here out:
-Now that you’ve got three joint chains, here’s how you can use them:
-Bind is what your mesh is bound to
-IK you’d hook up your IK handles, pole vectors and controls to
-FK you can drive with controls or display their display handles
-In this example we created a Switch control, this isn’t needed but does help keep the scene clean. You could put the IKFK channel on your characters hand control, the World control and so on. Whatever best suits your need and setup.
-Because of the nature of contraints you may come across an instance where it’s not solving correctly for the blend you wish. You can either blend over one frame or change the Interp type to another setting for better results
-Creating two duplicates of the chain allows you to orient constrain accurately and also deals with alignment and other settings on the joints.
-When you orient constrain an object, the default weights are 0 to 1. Since I personally find it easier to work from 0 to 10 when keying a blend, we needed to build a Divide node to set the channel range from 0 to 10 down to 0 to 1.
-Since the name of the blend channel is IKFK, you’d assume that 0 is IK and 10 is FK, so we connected the channel directly to the FK weight on the constraint, since we'd want the FK to have no effect when the IK is on.
-For the same reason, we don’t want the IK to influence the FK when its enabled, hence the Reverse node.
-A reverse node creates the opposite of a given number. Since the input was from 0 to 1, the reverse would be 1 to 0 (.7 to .3, .5 to .5 and so on).
-We connect the Reverse node to the IK weight so that it starts out at 1 (making the constraint enabled) while the FK starts at 0 (disabled). When the channel value is changed, this node tree adjusts the values and blends the joints accordingly.