[Maya]Rigging 09 - Spine IK FK
Keywords: Animation, Maya, Rigging, IK FK system, Spine
Maya Rigging series of articles:
- [Maya]Rigging Overview
- [Maya]Rigging 01 - Joint
- [Maya]Rigging 02 - Skinning
- [Maya]Rigging 03 - Visualization
- [Maya]Rigging 04 - Controller
- [Maya]Rigging 05 - Attributes
- [Maya]Rigging 06 - Foundations of IK
- [Maya]Rigging 07 - IK for Leg
- [Maya]Rigging 08 - IK FK Switch
- [Maya]Rigging 09 - Spine IK FK
- [Maya]Rigging 10 - Keyframe (WIP)
- [Maya]Rigging 11 - Common Tricks (WIP)
Stage 1: Spine FK system
1, Duplicate skeleton and cull the unused joints to create IK FK joints. Make sure the distance between original skeleton and replicas are equal.
2, Parent Constraints on original joints which was driven by IK and FK joints afterward.
3, Doing Match All Transformations from IK joints and FK joints together to original joints.
4, Create controllers (Curve) at the origin of coordinate axes.
Caution:
ctrl_torso is just a handle for spine IK joints and FK joints, it will be used to drive the transformation of entire upper body, not only to drive spine joint or pelvis joint. (For more details, see: Caution to ctrl_torso and ctrl_pelvis_fk)
5, Normalize the scale of all controllers (Freeze Transformations) before moving to the target joint.
6, Delete History (Alt + Shift + D) of all controllers (because history may contains transformation data which will lead to offset issue).
7, Move the controller to the target joint (or Match All Transforms), tweak the rotation of controller if needed.
8, Setup the hierarchy of controllers.
Don’t tweak the transformation (included pivot position and pivot orientation) of controller after setting up the hierarchy. If have to modify transformation, unparent the controller first, then tweak it, setup hierarchy again at last.
Because the modification to controller’s transformation affects the Offset Parent Matrix of self and child node, which will lead to deformation on joints is the subsequent flow.
9, Match Pivots from FK controllers to the FK joints.
You will see the pivot orientation of controllers and FK joints were matched.
10, Do Offset Parent Matrix for all FK joints and all FK controllers. (for more details, see: Offset Parent Matrix)
In the current example, it works right even we just Offset Parent Matrix only for pelvis_fk, (because we will use World Matrix to drive pelvis_fk joint intead of translate and rotate, other joints don’t need to Offset Parent Matrix), but this requires that the corresponding controllers of other joints(from spine_fk_01 to spine_fk_05) don’t Offset Parent Matrix too, otherwise it will lead to translation and rotation issue. But if controller’s transformation hasn’t been Offset Parent Matrix, this can make things very tricky for animators.
So we recommend that Offset Parent Matrix to all the controllers and all FK joints.
11, Create IK FK switch for spine joints, and turn on the FK on all spine constraints, turn off IK on them.
We will setup IK system in the subsequent flow, so we don’t care IK at this step.
12, Delete the scale for all spine FK joints in Node Editor.
We delete the scale for all FK joints because we will use another way to drive joint’s scale afterward.
13, Connect pelvis FK controller’s World Matrix to the Offset Parent Matrix of pelvis_fk joint in Node Edtior. Then we can drive pelvis_fk joint using pelvis FK controller.
14, Connect translate and rotate between spine FK controllers and spine FK joints in Node Editor.
Because ctrl_torso is the handle for entire upper body, so we don’t need to connect it to any joints in Node Editor.
Finally we can drive spine using spine FK controllers.
Caution to ctrl_torso and ctrl_pelvis_fk
You might wonder why don’t drive pelvis_fk joint using translate and rotate attributes.
If drive pelvis_fk joint using translate and rotate, the pelvis_fk joint will not follow with ctrl_pelvis_fk controller when moving ctrl_torso:
But it works right if using Offset Parent Matrix:
Another question you might want to ask:
Why the spine joints (spine_fk_01 to spine_fk_05) don’t need to be drive using Offset Parent Matrix attribute.
Because spine joints inherit from pelvis joint, Offset Parent Matrix will lead to deforming issue.
Stage 2: Spine IK system
WIP
References
Realtime Creature Rigging Workshop (10 / 19) : Spine FK & IK systems
https://www.youtube.com/watch?v=5AHmfuYkcMY
中国古代战争史:肥之战
秦王政十四年初,秦将桓齮率秦军进逼邯郸,赵王迁急命北部边防名将李牧为将军,率所部南下,指挥全部赵军抗击秦军。李牧率边防军主力与邯郸派出的赵军会合后,在宜安附近与秦军对峙。李牧先是采取筑垒固守,伺机反攻的方针,乘机一举袭占秦军大营,俘获全部留守秦军及辎重。又部署一部兵力由正面阻击撤回的秦军。经激烈战斗,大败秦军。李牧因此战受封为“武安君”