PDA

View Full Version : arm twist problem


leet
01-28-2004, 09:28 PM
Hello folks,

Here goes: I have my character all rigged, but there is one problem with my arm set up.

I have IK/FK arm control on my arm which all works fine and dandy.. The problem is my forearm twist. When I am using FK, it works fine, but in IK mode does not work at all.

Little more details of my setup.
Hand conrtol has SDK to control the twist of my forearm, and movement of my hand (wrist) Everything like my fingers, and wrist movement works fine in both FK and IK... its just my fore arm twist.

Is it because my forearm twist joint is in the IK/FK bone chain? Does my forearm joint have to be a control join not in the actual skeleton? Its probably really simple and easy fix, I'm just not seeing the resolution.

I hope im making sense....
thanks in advance

cheers

nottoshabi
01-28-2004, 09:42 PM
What r u using for the ik-fk switch? 3 bones or the built in maya one?

leet
01-28-2004, 10:55 PM
hmmm didn't realize there was a different one...

I'm using just the default IK/FK...

The actual bones are as follows:

shoulder -> Elbow -> Forearm -> Wrist

When I put the IK/FK i just clicked the shoulder then the wrist joint, and it all works fine. EXCEpT the fore arm twist when I IK.

I guess I should have mentioned that I am a noobie at the rigging thing, so I might not know all the specific lingo and stuff. Sorry about that.

thanks for being patient.

cheers

john_homer
01-29-2004, 04:15 AM
Originally posted by leet
Is it because my forearm twist joint is in the IK/FK bone chain? Does my forearm joint have to be a control join not in the actual skeleton?
cheers

thats your problem right there...

leet
01-29-2004, 04:39 AM
Thanks for the insight, now I know whats wrong with the set-up.

But, how do I go about resolving the problem?

Do I just make another seperate joint alone by itself that controls the rotation of the forearm joint?

thanks

john_homer
01-29-2004, 06:12 PM
edit: oops, it told me this didnt post...

john_homer
01-29-2004, 06:13 PM
the elbow doesnt actually twist.. try it yourself... theres the whole ulna radius thing.... you can make them.. I like to fake it (dont tell my girlfriend)

put 2 or 3 joints evenly spaced between the elbow and the wrist (parent them to the elbow... now plug the "twist" attribute into a input1 of a multiply/divide node, set it to divide, set the input2 to the number of joints you are using (2 or 3) and put the output into the appropriate rotate channel in your new joints...

.j

bennyboy2
02-24-2004, 05:30 PM
I've just been working on this same problem, and came up with a slight variation on john homer's suggestion. Here's what I did. (note... I'm a relative noob, so maybe there's an easier way. But I now have a working forearm that can twist almost 200 degrees and still look reasonably good)

If after read this, it doesn't make sense, let me know and I'll give you a link to the project and you can just copy the rig I have.

SKELETON SETUP
1) make 3 (or even more) joints between the elbow and wrist. Make sure they are in a perfect straight line.

2) "create" a locator and place it on the last joint with vert-snap (holding "v")

3) select the locator and the elbow joint and "constraint"-->aim so the x-axis the joint is oriented nicely toward the elbow. Do the same for all the joints between the elbow and the wrist.

4) Select each joint again and freeze the Y/Z rotation. You don't want your fore-arm snaking around everywhere! :)

So far, this is what john homer suggested. Instead of using the math, though, I decided to keyframe each joint. That way, you can control EXACTLY how much each part of the arm rotates, for total control. It's a little more work, but I like having that ability.

KEYFRAMING
1) make a control object. It can be anything. I used a poly sphere. Put the object somewhere you can find it, but it doesn't matter where. I put mine above the shoulder.

2) select the next joint down from the elbow. In the channel box, select the x-rotation. Left-click on the number there. Now right click to get a menu, and "set keyframe."

3) now left click on your control object, then in the set keyframe window, select "load driver." For the driver, select "translate y" and for the driven (i.e. your joint) select "rotate x." In other words, moving the control object up or down is going to control the joint's rotation. Press the "Key" button, then make sure you are in frame 1, then menu "key"-->"set". Select the next joint, press the "load driven" button, and key it, too. Key the rest of the joints in the forearm the same way, but not the elbow.

4) now move to frame 10. Move your control object up to the highest position you want.

5) select the joint under the elbow, "show tool settings," and set the rotation mode to local. Rotate the joint. Set the key the same way you did for frame 1. Repeat for all the joints.

Now, when you move the control object up or down, the arm will rotate. If you want to use the IK handle to move the arm, you must go the attribute editor, select "Ik solver" attributes and enable ik/fk control. Turn down the ikblend setting very low (so the ik doesn't interfere with the rotation you want).

Now, when you move the control object up or down, the arm will automatically rotate. If you don't like the way the arm looks after rotating, just go to frame 10, rotate the joints until the arm looks better, and keyframe them again.

Whew! I'm worried this sounds too confusing.

john_homer
02-24-2004, 07:48 PM
Originally posted by bennyboy2
So far, this is what john homer suggested. Instead of using the math, though, I decided to keyframe each joint. That way, you can control EXACTLY how much each part of the arm rotates, for total control. ..

you can control them exactly, buy changing the values in the multiply/divide node...

I'm not sure why you want to control the forearm twist by translating another node...

.j

bennyboy2
02-24-2004, 08:23 PM
1. With even distribution of rotation, I didn't like the way the arm looked.

2. By keyframing, you don't need any trial and error. Just rotate each joint to a place you like and keyframe the joints, and you know it will look good. In the division method, you will need some kind of control object anyway, to control the forearm rotation- otherwise, you'll have to hide your skin every time you want to select the control joint. Really the only difference between our methods is you code the amount of rotation in the math and I like to code it by hand.

3. If you decide later to add deformers to make the arm flesh out properly, you can just key them to the same control object.

4. I like playing with puppets.:p

nottoshabi
02-24-2004, 08:57 PM
@ bennyboy2> Your method is good I like the concept. I would use it for something else. But for a wrist deformation. I like it to be automated twist the wrist, the forearm behaves right. Plus all my rigs are centered around the animators needs, so I can't add controls for stuff like that cause he wont like it.

Thanks for the idea.



:bounce:

john_homer
02-24-2004, 09:49 PM
[QUOTE]Originally posted by bennyboy2
[B]1. With even distribution of rotation, I didn't like the way the arm looked.

2. .. In the division method, you will need some kind of control object anyway, to control the forearm rotation- otherwise, you'll have to hide your skin every time you want to select the control joint. ...

3. If you decide later to add deformers to make the arm flesh out properly, you can just key them to the same control object.


1. it doesnt have to be even.. you have x y z in the multiply/divide...

2. drive it with the wrist!!!!!!!

3. drive deformations with the elbow or wrist???

i just dont see the reason for adding a control object... you have a skeleton...

also the utility nodes method will evaluate quicker...

.j

bennyboy2
02-25-2004, 01:57 AM
UNCLE!!!

hehe... ok, you guys have already figured out that I'm a noob. I feel I'm on the verge of learning something here, senseis... so please bear with me for one more question. :)

With the multi-joint method, I locked the y/z rotation for all the twist joints. So if I make an IK from the shoulder to the wrist, the wrist angle is basically pre-determined by the ik solver, and not easily adjustable by me.

So to turn the wrist, you have to grab the wrist joint or elbow joint and manually rotate it around the x-axis, right?

I can see how having physical twist controls would p/o an animator. But I know for me personally, with my joints under the skin, to select a joint I have to either hide the skin or make its layer invisible. Then I have to select the joint, zoom in enough to get a decent-sized rotate manipulator, then turn the skin back on again. So I made a control object to avoid having to do that.

So my question is, let's say I want my hand palm-up instead of palm-down. In a standard pro rig, what will the animator usually use to drive the arm rotation? What am I doing wrong?

Thanks for your help so far. You guys are cool. :)

john_homer
02-25-2004, 03:41 AM
i think there has been some confusion here...

I dont think anyone here is actually selecting joints...

you generally will have, say a curve that has the ik parented to it, and that drives the wrist rotates (in very short and dirty terms.) and also the twist (through */ nodes for me )

if you want to select the curve though...
you can give it a shape node, say a curve, so clicking on the curve actually selects the joint, as the curve is the shape of the joint...

try this.
make a joint, and a curve.
select the curves shape node (not the transform) THEN the joint, and excute the MEL...
parent -r -s;

now select the curve.

.j

john_homer
02-25-2004, 03:48 AM
something to note on that shape parenting biz...

it orients the shape to the joint ;(

to avoid this, orient the curve to the joint first...

parent the curve to the joint,
freeze transformations on the curve.
unparent the curve, (it should now have rotates in challel box)
the do the MEL shape parenting

.j

bennyboy2
02-25-2004, 05:10 AM
ouch.

OK, I'm getting that familiar feeling that I'm too dense to understand what you're talking about. My arm IK ends at the wrist, and gives (as far as I can tell) the same wrist angle for any given coordinate of the IK handle. So in position X, whether I want the palm up or down is controlled exactly how with this parent curve?

For me to get the point, I think you'd basically have to do a full tute with screenshots, and I don't expact that... BUT it certainly gives me my next study topic-- parenting IK's to curves. :)

Thanks for the help.

nottoshabi
02-25-2004, 08:46 PM
Hey try this.

http://www.learning-maya.com/rigging.php :)

bennyboy2
02-25-2004, 11:22 PM
!

You've just stolen my next week from me! Nice link. :)

nottoshabi
02-26-2004, 07:53 PM
Hey no prob bennyboy2 youare welcome.

What john_homer was talking about in his response is the ability to parent things. We move our joints with connections and parenting. I can only speak for my self on this but I always rotate or translated a joint throw some kind of connection or a shape. Never actualy touch the joint. That is placed out side of the geometry, and its colorfull and it stands out so that is easy to grab and select. Cause hunting for joints takes to much time away from animation plus it gets verry annoying after a while.

So look into connections, constraints and parenting.


Good luck....:thumbsup:

CGTalk Moderation
01-17-2006, 07: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.