[Closed] Maintaining distance via script controller?
Rigging has never really been my specialty, and aside from using various cookie cutter techniques I haven’t done much of it. Lately I’m trying some thing out, seeing what works and what doesn’t, etc.
For example, I like the reverse foot IK rig, but I’ve always found it annoying that the foot can be stretched past the limits of the IK goal. I tried setting up a simple script controller to limit the maximum distance from the hip to the foot control shape, but it ends up creating a keyframe on every frame, which is obviously not optimal.
Anyone have any ideas for me?
the character rigging is most interesting and challenging thing of a technical artist’s work.
the reverse foot technique is cool thing but one little problem kills it. it’s the toe’s animation. dig … dig deeper yourself, and you will see what i mean.
Well I know that some people like to add an extra bone to control the toe in FK… is that what you’re talking about?
Anyway, I found a solution for what I needed that turned out being much more simple than what I was trying to do initially. So far it seems to be working…
Sure! Basically, I just made a reverse foot rig following the usual steps. Then I made a second foot control spline.
The first foot control spline, which the foot bones are all parented to, acts like the IK end effector, while the second one acts like the IK goal. So in my test scene I’ve named them $CTRL_Foot_EE and $CTRL_Foot_G.
Next, I make the position controller for $CTRL_Foot_EE a script controller, and assign a node variable to $CTRL_Foot_G. The script is set up as follows:
if distance CTRL_Foot_G $Offset_Thigh <= 34.9514
then CTRL_Foot_G.pos
else (normalize (CTRL_Foot_G.pos - $Offset_Thigh.pos) * 34.9514) * $Offset_Thigh.transform
($Offset_Thigh is the point object that the thigh bone is parented to, and 34.9514 is the combined length of the thigh and calf bones in my scene.)
EDIT: I didn’t account for the fact that the thigh point object would rotate. I’ve added another point that is position-constrained TO that point (but which maintains a zero rotation in world space) and am using that in the script in place of the other point.