FK legs and a FK/IK Switch

Having finally created working strethcy IK legs, I could get to work on making a set of FK legs. Like the IK, I duplicated the deform skeleton, but replaced the _jnt with FK_jnt. Unlike creating the IK leg, I didn’t need to create anything except controllers. I used the curve tool with snap to vertex turned on and drew the shapes around the mesh of the monkey. I used the MEL script “parent -r -s” to attach all the curve shapes to a single curve node so that the animator can click on any of the curves to select the entire controller.

The thigh and ankle controllers I drew with curves, but I just used circles (which I editted slightly) for the knee and tibia joints. To try and keep the rig clear to use I colour coded my controllers. The most important controllers I changed to a brighter colour and the less important ones (like the tibia joints) were darker.

Foot05 Foot06

Like before, I nested all of these controllers in a double set of groups (_SDK and _0). I then parent constrained each FK joint to its relative controller.

As the toe controls were parented directly to the deform skeleton (there was no seperate FK and IK version) I needed to get the main toe controller to follow both the IK and the FK skeletons. I created an FK/IK switch control for the leg and then proceeded to parent constrain the main toe controller to both the end of the IK and FK controller heirarchies. At the same time, I also parent constrained the deform joints to both the IK and FK joint chains.

I then had to wire up the switch to control the parent constraints between FK and IK. I used the hypershade to do this. I brought the switch and the parent constraints in and also created a reverse node.

Foot07

I then also wired up the visibility of the IK and FK controllers so that the animator can only see FK controls when the switch is at FK, and IK controls when it is at IK.

I decided to colour code the IK and FK so that it is clear at a glance whether the leg is set to FK or IK. For the IK I chose red (left) and blue (right), and for FK I chose pink (left) and green (right). However, since the toes are the same controllers whether the leg is in IK or FK, the controllers were just a single colour. I spent a bit of time trying to work out how to use the switch to drive the colour override for the control shapes. Eventually I found that I could use a condition node that was true when the switch was above 0.5 and false when below 0.5. Then I wired the condition node to the drawing override of the controller. As the drawing override is not in the short list of things in the hypershade I had to open the connection editor and wire them up in there.

Foot08 Foot09

Finally, I had to work out what number represented each colour. With some trial and error I eventually found the values and wired up all of the toe controllers so that they change colour. Success!

Foot10

This site uses Akismet to reduce spam. Learn how your comment data is processed.