View Full Version : IK Leg Problem
04-18-2006, 09:47 PM
This is not really a problem because my IK handle does work but i'm confused so I thought I'd ask you guys for an explanation.
Basically I have my leg setup (HIP->KNEE->ANKLE->BALL->TOES) with all the rotation set to zero, then I add my IK and that to has the rotations set to zero.
But then when I orient constraint the ankle joint to the ik handle the leg gets rotated to like (X-41.081) and (Y 90) and I wish the ankle would stay where I put it, and seeing as the ik and ankle joint have all zero values in rotate then I don't understand why they move.
Now I understand that although the joints and IK are zero rotation that doesn't mean the XYZ are lined up in component mode.
So I tried, orient constrainting the IK to the ankle so that the IK lines up exactly with the ankle joint in component mode. Then delete the constraint so we are back with just the ankle joint and IK all with zero rotations, but this time the component XYZ are lined up as well.
Then add my orient constraint to the ankle so it follows the IK and this time the foot doesn't move but instead of zero we get a load of numbers in the IK rotates.
And i don't get why that is.
04-19-2006, 02:51 PM
Joints are the only other form of transform object which react differently from other transforms. That is because of the way it handles joint orientation information. If you open your attribute editor for your ankle joint, you'll notice it has rotate attributes as well as joint orientation attributes. This is why, even though an ankle joint may be pointing to a ball joint, it still has zero values on the rotate. If you try to orient your ankle ik to your joint, you will get the reaction you just experienced because of the different way joints handle orientations.
Here's a simple workaround. Create a null group, temporarily parent it to the ankle joint, and while its parented zero out it's translate and rotate, and make sure it's scale is set to one (just do this in the channel box, do not freeze transform the node). Then group that null so it has node to absorb transforms when you reparent it. Reparent this top group to your IK, select your original group (the one you zeroed out), shift select your ankle joint, then orient constrain it and voila. The joint should be oriented without any residual rotate values.
What you've just done is create a group with the very same transforms as the target joint. The secondary group is important as it absorbs the additional transforms received once you reparent the null, so that the original null retains the joint transforms. I use this often in setups to get joints to follow my controllers without residual values.
04-19-2006, 03:46 PM
Also another problem which is killing me is to do with animation controls.
What I am trying to do is simple enough, I just want to orient constraint a circle onto my joints so they are easy to select.
But every time I orient constraint the joint to the circle the joint rotates to point 90 to left or something. and the circle will move to point alont the joint and not circle around the joint.
Then other times when the joints stays in its original position its still not right because when the circle moves in the X direction the joint will move along in the Z direction.
The problem is just as hard to explain really so if anyone has any ideas please help.
04-19-2006, 03:50 PM
Thanks isoparmB just read your post after I posted my next problem, although you might have solved that as well.
04-19-2006, 04:13 PM
hey isoparmB, so far so good the IK handles are are working nicely and the two animation controls i've added are working as well, your a life saver.
one little thing - you obviously have to keep the groups don't you, because it is the group that has been constraint it just happens to have the IK handle in its hierarchy.
Something i have to learn more about is organising the outliner
04-20-2006, 01:12 PM
Welcome. And yes, you will need to keep the groups, as they now control your joints.
One neat trick you may or may not want to try with your controllers, though. You mentioned that you were orient constraining joints to curves (for an fk setup?). You can actually parent the shape nodes of curves to joints, so that when you select a curve you end up selecting a joint.
Say you have a joint1 in your scene, and a circle named nirbsCircle1 (which has a shape node name of nurbsCircleShape1) What you do is position the curve to your joint and freeze-transform it, then type:
parent -shape -relative nurbsCircleShape1 joint1;
This wil parent the nurbs circle shape to the joint, so you can select the joint by selecting the curve. It makes for an easy selection-handle-type control.
04-20-2006, 03:07 PM
Just tried your suggestion Martin and like most things i try and do in Maya something always goes wrong.
Now i have finished my character and started animating him last night but your method would defiantly of been faster. So i could do with solving this for future use. I have attached a before picture and an after picture, and when Maya does things like this i just wanna give up and if it wasn't for this site i would of long ago.
The before picture is how i want it to look, and two things about the after picture, firstly why has it moved and secondly the circle had orientated itself so that it is in-line with the foot instead of spinning around it, kind of hard to explain.
So if you have any time could you take a look.
04-20-2006, 03:28 PM
I see your problem. Hmmm....let me remember....
Create the circle. Then parent it to the joint, zero out the translate and rotate, then set scale to 1. If, when zeroed, the circle is not facing down the axis you want to, rotate it by 90 degrees in the appropriate axis then do a freeze transform. After which, group the circle and unparent it. It's basically the same technique to get the transforms of the joint you used earlier. You can then try to parent the circle's shape node to the joint, or use the curve to constrain the joint.
If that dosen't work try putting the curve in the position, rotate it then freeze transform it. Then do the parenting operation. I'm not in front of maya right now... I don't remember if the transforms of the curve need to aligned with worldspace or the joint's own transforms.... You'll have to do a trial by error. :]
I think when you initially tried to parent your curve to the joint the curves transforms where not in-line with the joints, hence the movement.
Transforms can take a little time getting used to, once you get used to them though the principle is very simple, though you may bang your head for a very long time before you actually get it (I certainly did. Ouch. No one ever told me not to freeze transform blend targets. Nyaha haha.). You'll get the hang of it, no doubt. Just remember when and when NOT to freeze transform your objects (especially for constraint target nodes.).
Good luck with the foot rig.
04-22-2006, 08:50 AM
you solve my problem too
04-22-2006, 05:48 PM
Thanks Martin your first suggestion worked really well, beginning to understand this a lot better now. Funny how most of the problems i've been having are all connected.
**How would you undo an nurbs curve to joint parent, because i could do with changing the nurbscurve shape but now they are essentially the same object/joint so i can't seem to select just the curve.**
04-24-2006, 01:33 PM
If you select the joint and click down (keypad down), this should select the shape node of the curve. Basically all that's left of the original curve is the shape node: It is now using the joint for it's transform attributes. If the curve shape node is not immediately the first thing you select when clicking down, click either left or right until you get to the curve shape node. You can traverse parenting hierarchies using this method.
Or you can select the joint and from the hypergraph click on the list connections tab. This will show all the connections to the joint.
Once you select the shape node, you can either delete it or unparent it. I think this should work:
parent -w nurbsCurveShape1
(or whatever name of the curve shape node.)
I think this should create a new transform node for the curve (dag nodes can't exist without a transform).
04-24-2006, 02:16 PM
perfect, thanks for all your help martin.
04-24-2006, 02:16 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.