FK Slider Switch
by Stefan Andersson
biceps to lift.
Of course there is always the exception that makes the rule. But in basic, this is what it is (or wise versa). So we need a rig that can switch from IK to FK with out any problems at all. To not get it to confusing I will use a 2 chain bone for this example (pretend it's the arm).
Part1. Creating - Naming
Create a 2 chain bone structure in the top viewport and duplicate it two times. Rotate them apart a little so that you can see all the bones. Don't rotate the Root!!
The middle bones will be the "target" bones. The target bones is also the bones that you will use for enveloping. The other bones will be the control bones. So let's name them to something smart :)
The FK bones:
The IK bones:
[pic 2, schematic]
I like to color the bones so that I know which one is what. Red ones are IK and blue are FK.
Part 2. Setup & saving clips
So we now have all our bones that we need. Lets do FK controls first Select the UP_Arm_Target and press CTRL-K to bring up the local kinematic window. Lock the window by pressing the 'keyhole' button. Select the UP_Arm_FK and press CTRL-K to bring up the local kinematic window for this chain as well. Now drag the green keyframe button for the UP_Arm_FK X rotation to the X rotation on the UP_Arm_Target.
The expression window will popup but you can close it as it comes up. What you are doing now is letting the UP_Arm_Target to be controlled by the UP_Arm_FK in the X rotation. Now do the same for the Y and Z. Then repeat the steps for the LW_Arm_Target and LW_Arm_FK.
You have now setup the target bones to be controlled by the FK bones. So what we now do is saving this information. Select both the target bones and then go to Store - Animated Parameters - F-Curves & Expressions. Name the clip Arm_FK and press OK.
If you now press CTRL-K on any of the target bones you will see that the expressions are now gone from the rotations. This is fine, no need to panic. The information is saved as a clip that we are going to use in the mixer.
Repeat all the steps above but this time use the IK bones instead of the FK bones. And name the clip Arm_IK.
Part 3. MIXER! and custom parameters
Now that we have saved our clips we can bring them into the animation mixer. In the explorer window select the Scene Root and then open up the mixer. Press the update button so that you can see two green tracks (animation tracks).
If you right click on any of the tracks you'll see a menu where you can add new track or insert clips that you have saved. So let's do that.
So insert both clips in the animation mixer, starting from frame 1 to 100 (or the length of your animation).
If you now pull the sliders to the right in the mixer you can see how the target bone is placing it self at either the FK or the IK bones. This is what we need! Now you can chose from either animating with IK or FK when ever you want. So lets make a slider with it that we can keyframe.
Make a null and name it..... "control null arms"? or something you would like for a name. Make sure that the null is still selected and go to Parameter - New Custom Parameter Set. Name it IK-FK-arms. If you now look in the explorer view you'll notice that you null now has a orange square with a C on it. This is where you can access your parameter set.
Now lets make a slider. Select the parameter set in the explorer view and go to Parameter - New Custom parameter. Name it IKFK, this means when the slider is to the left you will have IK and when it's to the right you'll have FK. Set the numbers so that they match the pic below.
note: if you add a "-" or "_" in the name the link with command will not work
Now we need to bind it all together so that we can use this slider. In the animation mixer set the FK clip slider 0 and the IK clip slider to 1. Double click on the parameter set in the explorer view to see the slider and drag the slider to -1 (for IK). Now right click on the keyframe button for the IK clip in the mixer and chose "Link with...", then select the IK-FK in the popup window.
click again on the same clip and chose copy animation. Right click on the
FK clip and do Paste animation. Drag the slider back 0 again. Now right
click again and chose set relative values. Do the same for the IK clip.
This means "when the IK-FK slider is at -1 the sliders should be where
you are now". Does it make sense?
Now when you drag your IK-FK slider it should blend between the different bones.
After you have done your enveloping you should hide the target bone so that you don't get confused about what bone to select when you animate. You could even go further to use the link with command to set the visibility on or off.
it up! Happy animating!