PDA

View Full Version : Strange rotations on arm setup


mlefevre
06-23-2008, 09:55 PM
Hey there,

I've seen a few different setups for the elbow joint, but for some reason I get unpredictable results if the arm joints are not setup in a straight line.

I've attached a file. Try translating the wrist_ctrl and the test_wrist_ctrl inwards towards the body. Each one has essentially the same setup, but both produce different results as far as the position of the elbow joint is concerned.

If anyone could tell me the reason behind this, and how to go about fixing it for setups that require the arm joints to NOT be in a straight line, I'd be extremely grateful, appreciative, thankful and stuff.

Ta :D

meatle
06-26-2008, 07:08 AM
I'm very new to this type of stuff, but I believe you should be setting the preferred angle so that the IK solver knows which way to bend otherwise you'll get that effect.

You have to click on the joint that that's giving you the flipping action bend it in the desired angle, right click and select the preferred angle.

mlefevre
06-26-2008, 07:03 PM
Hey meatle, thanks for replying.

My bad, I didn't make it clear enough. I wasn't sure how to describe it so I added the file.

The arms are only in a straight line in one plane, say if you were looking at the arm from a front view. But the joints are bent at the elbow.

edwardG
06-30-2008, 11:13 PM
Well, you truthfully don't have the same elbow setup on both of them, here's what I found after messing with it for 5 seconds:

1) They both are set at different angles.
2) The elbow controls are both in different places in relation to the arm. The one on the left (the test) has it's PV Elbow control further back than the other. If you move the wrist control along X it will also flip once it crosses the PV plane. That means that the one on the right will flip sooner than the one on the left.
3) I think that the real culprit, however, is that your elbow joint is had some Z rotation on it (you can tell that the shoulder, elbow, and wrist are all not in a straight line). Therefore, the plane at which the IK handle calculates the rotations has garbled data in it and can't calculat correctly. I bet what you did was select both the shoulder and the elbow joints and rotated down in Z, then froze the transformation. All you needed to do was rotate the shoulder then freeze transforms, then make the IK handle, your stretch script, etc.

Hope this helps, good luck!

mlefevre
07-01-2008, 01:03 AM
Hi edwardG,

Thanks for replying, I appreciate you taking the time to take a look at my file.

1) and 2) You are right, both setups are not the same. I've seen on occasion people setting up arms with joints at different angles to accommodate the model, and I noticed they had problems such as the one demonstrated in my file and that setting up a pole vector control (elbow control) on an arm that isn't strictly T-pose will result in rotations on the joints. However, I found a great solution to that in a gnomon tutorial!

The elbow control being at a different location has nothing to do with the strange rotations when pulling the arm into the body. Infact, the reason it is in a different location was to avoid getting any rotations whatsoever when applying a pole vector control!


3) The joints had 0 rotation on all axis. I didn't freeze transform any joints (I never do - for some reason alot of tutorials I've come across regard freeze transforming joints as an unholy sin. Is it? O.o)


I was given a suggestion to try out a '2B IKsolver' instead of a 'RP IKsolver', and it works perfectly, on both setups.

Thanks again. :D

zombibim
11-03-2008, 09:53 AM
Hi mlefevre,

can you elaborate on the 2B IK solver a little bit? I'm having the same problem with my arm's pole vector but i can't find this 2B IK solver in Maya 2008. And which gnomon tutorial is that?

Thanks in advance!

mlefevre
11-03-2008, 11:58 AM
Hi zombibim,

You can find information on the 2B IK solver in Maya's help documentation.

To load it in Maya:

i) Window > Settings/Preferences > Plug-in Manager and look through the plug-ins to find ik2Bsolver.mll

ii) Make sure it's boxes are checked, then type ik2BSolver; in maya's command line.

iii) Open your IK Handle Tool Option box, and you should have the 2B solver loaded.


The Gnomon tutorial I was referring to is the Puppet Rigging :)

I'm not so sure I can go into detail about it's information on here. :/ Check it out on the website!

PolarBird
11-03-2008, 03:53 PM
Hey mlefevre.

Been struggling with flipping IK arms for a while and the 2Bik seems a lot more stable. Thank you man! I got something good out of this day after all :)

zombibim
11-03-2008, 11:18 PM
Thanks mlefevre, the ik2Bsolver works!

Leffler
11-04-2008, 11:45 PM
Hey

If i understand the problem correct, I have a thing for the problem that works fine for me on my testfile. Picked this up from the supercool Fahrenheit DVDs by Aaron Holly.

Well, maybe itīs not perfect because if you draw the joints really weird, it can still flipp pretty weird but this has helped me in some situations. I havenīt tried it in all situation either, but feel free to test this method

Here is my flow in tutorialform

1. Draw the joints.
2. Create a locator (or whatever you wanna use as poleVector controller)
3. Select the (in this case) "upper_arm_jnt", shift-select the "wrist_jnt", shift-select the locator.
4. Do pointConstrain WITHOUT maintain offset.
5. Select the "lower_arm_jnt" and the locator, do aimConstrain .. settings doesnt matter, i had maintain offset NOT checked
6. Delete the 2 constrains
7. Translate the locator back a bit, using "object" as move-setting
7. Set the preffered angle on the "lower_arm_jnt" to -y, I put in -90 in Y (This is probably not neccessary since the chain is drawn angled... )
8. Created the IK handle from upper -> jnt. I used the regular IK RP Solver
9. Select locator, the IK handle and poleV constrain

Now, if it works ... there should be 0,0,0 rotations on all joints in the chain. And then there should be no weird flipping going on ....

Well, itīs getting late here so I have to get some sleep. Will do more tests tomorrow because this is an interesting problem!

// Otto

CGTalk Moderation
11-04-2008, 11:45 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.