PDA

View Full Version : IK Solver -Pole Vector problem


J0K3R 3D
03-07-2009, 06:17 AM
First let get a few things out of the way.

Using Maya 2008
Rigging an arm.
All joints oriented to point towards its child with the X-axis.
Joint rotations are zero'd out.
Using default settings on IK Handle Tool and the Pole Vector constraint.

Now the problem I am having;

Im am trying to set up an IK arm (to do an FK/IK switch later). I do the usual ... click the shoulder joint, then the wrist joint to get the IK Handle. Then I contraint the Pole Vector to an object (with frozen transformations and deleted history) directly behind the elbow joint. Everything seems to work well until I test out the IK.

As I translate the IK handle closer to the body, only using the x-axis, the elbow doesnt point towards the Pole Vector object! It starts bending down then back up as it passes below the shoulder joint. Ive checked and rechecked everything and nothing seems to be out of place. Its like the IK is ignoring the pole vector or something.

My explanation is probably confusing so heres a pic! :)
http://i732.photobucket.com/albums/ww324/mqanimate/mayaproblem.jpg

Thx for the help.

DanHaffner
03-07-2009, 08:12 AM
It sounds like you drew your joints in a straight line, which is fine, but when you put an IK on it, it has no bend to use to solve with. To counter this when the joints are straight, grab the shoulder joint and the elbow joint, hit "E" to pull out the rotation manipulator and rotate the joints on the Y-axis so the arm fold in on itself like you would expect it to. While the arm is bent and still selected, go to Skeleton -> Set Preferred Angle. This will tell the IK which way it is supposed to bend when it is solving. Zero out the joints, recreate the IK handle, then make your pole vector, and it should bend properly.

Let me know if this helped any.

J0K3R 3D
03-08-2009, 06:05 AM
Hey Dan thanks for the help. The bones were not drawn in a straight line they have a slight bend to them at default. Its not even horizontal.

Still, I tried what you said ... unfortunately it didnt work :( Really at a loss here. Maybe im not explaining it well.

Im going to see if I can put a file with the problem up somewhere and link it here.

DanHaffner
03-08-2009, 10:42 AM
Ah, sorry man. Yea, throw up a scene file.

mlefevre
03-08-2009, 11:18 AM
EDIT* - Tried my own suggestion, but it can't be down to that.

J0K3R 3D
03-08-2009, 08:06 PM
Ok set up a file at filedropper.com. Just click where is says "Download this File" it should work.

http://www.filedropper.com/brokenik

The ones on the back is the original joints im trying to fix. Already has the IK's set up with the pole vector, which of course, doesnt work as it should. If you grab the IK and translate it in the X-axis toward the shoulder, the shoulder rotates pointing the elbow down. As you can see the joints are oriented and the rotates zero'd out

There is also one in front of it before the IK set up in case you guys want to try for yourself. Probably a simple solution im not seeing :(

Thx again for the help. Greatly appreciate the time you've taken.

mlefevre
03-08-2009, 11:49 PM
You need to set the preferred angle for the elbow joint, before applying the ik solver.

You can do this by rotating the elbow joint forward (i.e the direction the character is facing), holding the RMB on the elbow joint, and selecting "Set Preferred Angle" - then applying the ik solver and pole vector constraint.

I've attached a working copy for maya 2008+.

Good luck!

-matt

J0K3R 3D
03-09-2009, 01:39 AM
lol, I knew it was going to be something simple like that. I could swear thats what I did when Dan asked me to. In either case thanks a bunch it works now! :) Though I might have done it with the shoulder selected.

Thanks a ton! I owe ya both one :D

DanHaffner
03-09-2009, 05:19 AM
You need to set the preferred angle for the elbow joint, before applying the ik solver.

You can do this by rotating the elbow joint forward (i.e the direction the character is facing), holding the RMB on the elbow joint, and selecting "Set Preferred Angle" - then applying the ik solver and pole vector constraint.

I've attached a working copy for maya 2008+.

Good luck!

-matt

lol, I knew it was going to be something simple like that. I could swear thats what I did when Dan asked me to. In either case thanks a bunch it works now! :) Though I might have done it with the shoulder selected.

Thanks a ton! I owe ya both one :D

Maybe I just didn't explain it well enough. Either way, glad it got worked out for yea.

Cheers.

-Dan

J0K3R 3D
03-09-2009, 06:00 AM
hehe naw you explained well enough. It was either because I selected the wrong joint (i remember playing with the shoulder as well) or I didn't rotate the elbow enough since it did have a slight bend to it. Cant really remember but either way you were right with the 'set preferred angle' thing. Thanks again.

CGTalk Moderation
03-09-2009, 06:00 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.