Keywords: Animation, Maya Rigging, Spine IK system, Spine FK system

Maya Rigging series of articles:

Stage 1: Spine FK system

See: [Maya]Rigging 09 - Spine FK

Stage 2: Spine IK system

1, Create controllers for IK joints: ctrl_hip_ik, ctrl_shoulder_ik, ctrl_chest_ik and ctrl_pelvis_ik.

2, Setup the visibility for IK controllers in Node Editor for IK FK switch.

3, Unparent all IK controllers, because we need to manipulate the transformation of them later.

4, We will Reset Transformations later, but make sure that the Offset Parent Matrix has been reset before do that.

Because I had tweak the pivot of ctrl_pelvis_ik before, so to be safe, it is best to clean the Offset Parent Matrix.

You can tweak the rotation of controller if it’s orientation was wrong after Offset Parent Matrix.

5, Then Reset Transformations all controllers to place them at the origin of coordinate axes in world space.

Reset Transformations will zero the translation and rotation and normalize the scaling.

6, Duplicate the IK joints that we created earlier.

Then cull the unnecessary joints, only remain joints for shoulder, chest and pelvis.
Rename the IK joints at last: ikjoint_shoulder, ikjoint_chest and ikjoint_pelvis.
We can also tweak the Radius of joints for better visualation.
And give a special color for these joints.

7, Create an empty group at origin of coordinate axis, and we will use it as a reference afterward.

8, Match Pivots of joints to the origin of coordinate axis. (Check Rotate and Orientation)

9, Offset Parent Matrix of all IK joints to clean the transformations. The controller’s Offset Parent Matrix had been cleaned before.

10, Create a curve for spine IK system, we use EP Curve Tool to create it.

Using 3 Cubic to make the curve more smooth.

11, Hold V, then left click all the joints one by one, hit enter to finish it at end.

Rename the spine curve.

12, Create IK Spine Handle.

Uncheck Auto parent curve and Auto create curve.
Then click pelvis joint, then click the neck joint, then select the spine curve at last.
Now the Spine IK Handle has been created successfully.
We can move the vertex of spine curve to test if it works right.

All the joints of spine must be clicked when creating Spine IK Handle, otherwise the skeleton will deform sightly.

13, Bind Skin for IK joints. Select Selected joints for Bind to.

Now we can manipulate the IK system using IK joints.

14, From this step, we will demonstrate how to bind controller which pivot was modified.
Match Translation from shoulder controller to ikjoint_shoulder first.

15, Now we will modify the pivot orientation of ctrl_shoulder_ik, make sure Bake Pivot Orientation was checked before do that.

Then tweak the pivot position of ctrl_shoulder_ik. (Hold V when moving pivot)
You will see the Local Rotate Pivot and Local Scale Pivot have been modified.

16, Then move the ctrl_shoulder_ik to the origin of coordinate axis.

17, Freeze Transformations for ctrl_shoulder_ik to zero the translation and rotation, Local Rotate Pivot and Local Scale Pivot also will be zeroed at the same time.

18, Then Match Translation from ctrl_shoulder_ik to ikjoint_shoulder again.

19, Match Pivots of shoulder controller to the IK joint. (Don’t foret to check Orientation)

At this example, pivots between shoulder controller and IK joint was matched before, but to be safe we should do it again.

20, Offset Parent Matrix the ctrl_shoulder_ik to clean transformation, the Offset Parent Matrix of shoulder IK joint had been cleaned before.

21, Connect the offsetParentMatrix from ctrl_shoulder_ik to ikjoint_shoulder in Node Editor.

Now we can manipulate the shoulder transformation using ctrl_shoulder_ik.

22, Setup the controller in same way for other joints: chest and pelvis.

23, But when you rotate the IK controllers, ctrl_shoulder_ik works right, but ctrl_chest_ik and ctrl_pelvis_ik can’t drive the the upper body.

That’s because we haven’t set up hierarchy for IK controllers yet.
After the hierarchy setup finished, now the rotation on IK controller works fine.

24, Don’t forget to optimize the Offset Parent Matrix for IK controllers after hierarchy setup.

25, Sometimes the transformation weight for points of spine IK curve may be low, we can adjust the weight for the target curve points in Component Editor.

26, As shown in the following image, there’re two attributes named Roll and Twist.

Roll rotates the whole upper body, and Twist twists the spine joints.
But ctrl_shoulder_ik, ctrl_chest_ik and ctrl_pelvis_ik can’t roll or twist the upper body normally.
We expect to the IK controllers roll and twist the upper body as attributes Roll and Twist do.
To achieve this, we need to set up the driven process for Spine IK Handle in Node Editor.
Now we can roll and twist upper body using ctrl_shoulder_ik and ctrl_pelvis_ik.

But if we rotate axis Y for ctrl_chest_ik, rotation of upper body doesn’t execute as expected.

To address this issue, we need to add a new node named plusMinusAverage to blend the rotation of ctrl_shoulder_ik, ctrl_chest_ik.
Now ctrl_chest_ik works right.

27, A new problem is that ctrl_hip_ik doesn’t work as expected, because we haven’t setup the driven process for ctrl_hip_ik.
We want to drive the pelvis joint using ctrl_hip_ik in the next step.

Here’s the whole graph nodes: we added two new nodes named multiplyDivide and plusMinusAverage.
And we set the Input 2X to -1 for multiplyDivide.
Now we can drive the pelvis joint normally.

28, In next step we move the all controllers into root controller, because we want to blend the rotation of root controllers into spline IK.

29, But there’s a deformation issue when move the IK controllers into ctrl_torso.

That’s because we had modified pivot of ctrl_torso which will lead to transformation issue in current step.

30, To address this issue, we need to unparent all the child nodes under the ctrl_torso temporarily, and unparent the ctrl_torso from root controller temporarily.

Then reset the Offset Parent Matrix for ctrl_torso.
Then tweak the pivot of ctrl_torso as we needed, don't forget to Freeze Transformations at last.
Then Match All Transformation from ctrl_torso to pelvis joint.
At last, restore the hierarchy.

31, Now we can move the IK controllers into ctrl_torso safely.

We can check if IK controllers work fine.
Don't forget to optimize the OffsetParentMatrix at last.

32, An new issue: when we rotate the root controller, the upper body doesn’t rotate as expected.

To address this issue, we need to add Rotate Y of ctrl_torso and Rotate Y of ctrl_root into the blending workflow.
Finally, root controller and upper body were rotated as expected.

Because we haven’t setup the IK FK control for legs, so there’s an issue that lower body doesn’t rotate following root controller, but no worries, after setting IK FK switch for legs (See: [Maya]Rigging 08 - IK FK Switch), legs can follow with root controller.

33, The final hierarchy at the ending of current stage.

References

Realtime Creature Rigging Workshop (10 / 19) : Spine FK & IK systems
https://www.youtube.com/watch?v=5AHmfuYkcMY


战国战争史:长平之战
长平之战是东周战国时代最大规模的战役。秦军60万军队“伤亡过半”,但成功歼灭了赵军45万士兵。这场战役成为战国局势的转折点。赵国作为当时仅次于秦的国家,在战败后迅速衰落。此后,六国再也无法单独对抗秦国。40年后,秦灭六国。