GimIK Live Guide - 01 Basic Setup


Disclaimer:
All code here is provided as is without support.
Use at your own risk! These posts assume you have some knowledge of import/running python script in maya

So I decided to have a bit of fun in my spare time messing with the grimIK node and a guide that can be place and deleted.

This node is available here: Grim IK Github I compiled this against windows 10 for maya 2020.

You can grab that mll here if you don’t want to build it yourself: grimIK.mll

The setup

Since I want the FK controls to align automatically, I’m going to build the IK setup first. These are the base nodes I need to start with.

baseNodes

Hook these up as the node expects.

baseNodes

Make sure the hierarchy in the scene reflects what the node expects.

baseNodes

And I want some guides for the IK controls. So duplicate these and call them _guide_ctrl.

baseNodes

Note: We only need to do the IK as the FK is going to work itself out *from the IK.*

We also need to adjust the length of the limbs [manually for now] to break the knee. At this stage I set the upperLength and lowerLength to 2.1 to begin with.

Now we hook up the guide to the offsetParentMatrix of the rig controls, and position the guides as expected.

Note: when we delete the guide these connections will be severed automagically.
Note2: If maya has an issue that you delete and it drops the current value, you may need to script the delete to remove connections first, keeping the current value, and then remove the guide elements.

baseNodes
baseNodes

And in it’s simplest form, we can now connect the outputs of the grimIK to the fk offsetParentMatrix to align these as expected, via the worldMatrix[0] of the hip, and the matrix of the knee and ankle.

baseNodes

Now we can create the cycle (in the guide only it will go when we delete the guide) by hooking the fk worldMatrix[0] to the grimIK node.

Note: THESE connections won’t delete unless you script them to. So you’ll want to handle these being deleted along with the guide deletion accordingly!

baseNodes

Note: Notice how the grimIK node aligns downX for the hip and knee? This is one of the handy things about setting up the guide like this. The FK ctrls will adopt this alignment automatically. Turn off Orient Tip Blend if you want the ankle to maintain the same aligment as hip and knee

baseNodes

And that’s about it.

You have a global root guide to move the rig. Position the foot and pole. So now we can start layering in some more complexity.

.. onwards… Knee