PDA

View Full Version : Adding IK handle rotates joints


Dustin
10-07-2009, 03:59 AM
OK, so this has bugged me forever. Normally I try to create joints that are straight so that it makes creating controls and the like easier. However, I am building a leg that is off-axis, and when I add an ikrp chain to it, the ik forces small rotational values into hip and knee. Does anyone know why this happens?

theflash
10-07-2009, 07:53 AM
From my knowledge, one really important thing is that all the rotation axis should be aligned in the same plane as the one formed by three joints. If you have even a light shift it will add rotation to the joints. Because I think Solver calculates bend based on that plane.
Could you post an example of skeleton you have created?

Lomax
10-07-2009, 03:03 PM
One possiblity might be to lock the other two rotation axis before applying IK. A while back I had to rig a character whose limbs weren't planar... though I can't remember if locking the channels prevented the slight rotation, or if it merely prevented those to channels from rotation further.

Me109
10-09-2009, 02:31 AM
Set Preferred Angle to the joints before applying IK

theflash
10-09-2009, 05:57 AM
It will still create problem if the joint axis are non-planar. I have been thinking about it and I think there is no way avoiding it because of the way legs are modeled sometimes.

Dustin
10-10-2009, 07:49 PM
It is for an auto-rig I am making, so ideally, I wanted the IK to work, no matter what angles the joints were at. The script did orient all the joints, that wasn't the issue. The issue seemed to be with setting the preferred angle. I took this out of the script, and it works fine now. I just have to make sure that in the auto-rig, the user can't point the knees in the wrong direction. I did try locking the joints originally too, which works fine if I did it manually, but if I did it through the script, where it locked the attributes, then created the ik, then unlocked the attributes, it didn't work... not sure why.

Thanks for all the help!

theflash
10-10-2009, 10:23 PM
I see. When I was experimenting with ik setup, I found that even if you orient the joint normal way, ik handle will add rotation to it. Basically you can't make joints in any angle work with ik directly because ik leg has to bend in the same plane.

How are you orienting the joints in your script?

Dustin
10-11-2009, 06:12 AM
For most of the joints, it's a simple xyz orientation with a couple exceptions; the wrists, the spine joint with the clavicles parented to it, and anything else that has more than one branch coming off of it, I just use "none" so that something like the wrist just takes on the same orientation as the elbow.

CGTalk Moderation
10-11-2009, 06:12 AM
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.