PDA

View Full Version : Rotation Order, urgh!


ThomasMahler
12-01-2004, 08:20 PM
Hey Guys,

Hope you can help me, I have to finish a neat little animation 'til 09/12, so I don't have a lotta time anymore...

I'm currently setting up a character and I'm humbling with the rotation of his headJoint. I really suck at animation/rigging, so, here's my problem:

I used rotation order xzy for the footCTRL - That works really well in Gimbal Mode, ry rotates the foot from side to side whereas rx rotates to foot "up and down" (you know what I mean).

I want to rotate the head of my character in exactly the same way (would be very comfortable to animate!), but it doesn't seem to work. I set the rotation order for the joint and for the headCTRL to xzy but if I rotate the headCTRL in y and then in x, the head rotates alright in y, but in x it rotates like I'd use a Global Rotation Manipulator, that means, the head doesn't rotate where his eyes are looking, it's rotating where you'd expect the global rotation manipulator - Man, that's some weird stuff, I don't seem to understand all of that anymore... :(

Just in case you didn't understand my problem, here's the Maya (6.0, sorry!) scene file:

http://members.chello.at/thomas.mahler/rig00.rar

Compare the rotation of the foot to the rotation of the headCTRL - What am I doing wrong? Is it because of the Local Rotation Orientation of the backNeckJoint? I'd be very happy if one of you guys could help me out! Uhm, and: If somethings wrong with the rig or if there's a better solution (only have to do very simple animations!) for this or that, I'd be happy if you guys could help me with that too! I never really animated before, so I actually don't really know where my rig will be good enough or where I'll doom it and start to cry... ;)

john_homer
12-01-2004, 08:56 PM
sorry, but I dont have time to look at the scene...
but its just sounds like you have a gimbal lock problem.

search the archives on "gimbal lock"

.j

ThomasMahler
12-01-2004, 09:58 PM
Well, I'm not totally sure if I fully understood Gimbal Locking, but that's not the problem, since I didn't even animated anything and I don't happen to loose one axis or something like that.

It's just that if I rotate around the X axis, the head doesn't rotate where his eyes are looking - It's very hard to explain (as I said before, I'm certainly not a glorious rigger/animator) and I don't really know what's the problem, but it just feels kinda off...

seven6ty
12-02-2004, 06:37 AM
Hey, I don't think it's a problem with your rotation order or anything else. Rotation order is more for IK solvers, it determines the order in which rotations are evaluated...

I'm pretty sure it has more to do with your joint orientations. To check these, highlight your joints (or just the root joint, if you want to see the joint orients for all joints in the hierarchy), then go into component mode, and turn on the question mark button at the top.

This should show you which way your x, y, and z axis are oriented, the positive direction being the one in which the axis is poking out of. On your shelf, go to the animation tab and the icon with the xyz axis and arrows showing them flipping, in the middle of the shelf, will do this for you. But be careful, it will re-orient all joints in the chain following the one you selected. To prevent this, simply change the MEL command for it from

"joint -e -oj xyz -secondaryAxisOrient yup -ch -zso;"

To:

"joint -e -oj xyz -secondaryAxisOrient yup -zso;"

...Removing the -ch flag which applies it to the entire hierarchy. Now it will just re-orient the one selected joint. You can also use:

"rotate -r -os 180 0 0"

To flip the axis at your will. Just change the "180 0 0" to whatever you'd like, with each number representing the x, y, and z axises.

elvis75k
12-02-2004, 05:12 PM
I don't understand what's wrong with Woody. I run your scene without errors and i have got some fun playng. Just to say that if you vant to drive the rotation of the backNeckJoint with the headCTRL remember to snap your pivot point at this joint..
Afterall i'm surprised that your expression to handle the rotation looks like this!

backNeckJoint.rotateX = headCTRL.rotateY;

I'll be watch this thread..

ThomasMahler
12-02-2004, 05:43 PM
Hey Guys,

First of all, thanks to all of you, I guess I know what's the problem now...

@seven6ty: Yeah, I think it's the joints Local Orientation Axis that's driving me nuts right now (that's what I meant with "Local Rotation Orientation" in my initial post) - I'm currently trying to fix that, but the "rotate -r -os 180 0 0" command rotates the whole joint, not only the Local Rotation Axis, so the head, which is parented to the backNeckJoint, goes the way of the dodo. So I tried to go into component mode and adjust the local rotation axis with the rotate manipulator or with the entries in the attribute editor, but that's kinda the same thing, so...

I'm looking for a command or something like that, that just let's me rotate the Local Axis Orientation to where I'd like to have it and that's all - I don't wanna rotate the joint or whatever. I'm not sure if all of that makes a lot of sense (I'm pretty confused right now ;)), but I hope you guys can follow me!

@Elvis:

Well, just rotate headCTRL.ry and then try to rotate it around X - You'll quickly see what's the problem.

And, yeah, I tried the connection editor (since direct connections are faster to evaluate than expressions, right?), but the thing is, I wanted it like that:

headCTRL.ry controls backNeckJoint.rx
headCTRL.(negative)rx controls backNeckJoint.rz
headCTRL.(negative)rz controls backNeckJoint.ry

Cause of the Local Orientation Axis, that's pretty weird stuff and I'm not experienced at all with things like that (Man, and people are still telling me that modeling can be a very technical job...), but at least I somehow knew how to control all of that, I wish I'd have a little more experience, when it comes to rigging, but...

Well, if you guys know how to simply rotate my Local Orientation Axis, without rotation the joint itself and messing things up, I'd be glad if you'd tell me!

seven6ty
12-02-2004, 09:20 PM
If it's rotating all the rest of your joints following it in the hierarchy... Could you just unparent them, perform the action, and then reparent them?? :)

ThomasMahler
12-02-2004, 09:30 PM
If it's rotating all the rest of your joints following it in the hierarchy... Could you just unparent them, perform the action, and then reparent them?? :)
Yeah, that's what I did, but it's really strange, there has to be a way to rotate the local rotation axes without unparenting and detaching skins and stuff like that... If I'm trying to simply rotate the Local rotation axis with the rotate manipulator in component mode, Maya blocks the transformation - It goes like zzzaaap, I see a few values in one of the rotate channels and then it jumps back to 0. Is that supposed to happen?

Also, it's extremely weird to use the attribute editor for changing the local rotation axis - I have to adjust the Rotate Axis and the Joint Orient Values and there's a lotta guess work invloved - And, to make things even better, Maya screwed up a few times while doing that.

So I just deleted the joint out of my hierarchy, created a new one and put all of that back together - Man, being a character rigger has to be an extremely tedious job...

Anyway, thanks a lot for your help!

seven6ty
12-03-2004, 12:58 AM
[QUOTE=Thomas Mahler]Yeah, that's what I did, but it's really strange, there has to be a way to rotate the local rotation axes without unparenting and detaching skins and stuff like that...QUOTE]

Yeah, do that before skinning and everything! :) Hahahaha. But yeah, it's important to check all of your rotational axises once you're done with the skeleton. I have to say I haven't really had much problems with the script rotating the rest of the joints and such, but then again I've been doing it before having anything bound to the joints and what not. You should be able to export the skin weights, unbind the skins, and then do whatever you have to do, before reminding, adding your influences again, and importing the weights back in. Bitchy tedious process again, but hey, it works I suppose. Anyways, good luck, it's fun stuff... Really!

ThomasMahler
12-03-2004, 04:45 PM
Well, now it works exactly as I wanted it, but it was quite a hassle...

And man, I unskinned and unparented everything, but I can't rotate the Local Rotation Axis in Component Mode, no matter what. What I did was basically creating a new joint hierarchy for the head with Auto Joint Orientation set to 'none' - But I don't see why we'd have to do that. I mean, just rotating the Local Rotation Axis the way you want it with the rotate manipulator SHOULD be possible - I still don't understand why Maya blocks every rotation I'm trying to apply directly to the Local Rotation Axis of the Joint...

seven6ty
12-03-2004, 06:43 PM
Yeah, I thought I remembered a way of doing that, like with the insert key and moving the pivot point, but I'm always unable to remember how to when I try to think of it. Hmm, maybe I was just dreaming?!?!

egoman
08-21-2005, 04:41 AM
Guess I'm a bit late here, but if you'd tried using the Rotate Tool in Local Mode I think things would have worked out just fine. You seemed to have everything else working: entering Component Mode and activating Local Rotation Axes, selecting an axis and rotating it manually. The problem is, as I said, that the Rotate Tool needs to be in Local Mode (just hold down E+LMB and choose "Local").

If you want to enter an exact rotational value you don't really need to use any MEL, just set the little text field on your Status Line to "Numeric Input: Relative" and enter your values there (X Y Z with spaces between each number).

If it's the X-axis that's off though, using the Orient Joint command from the Skeleton Menu should fix it (you can switch off "Orient Child Joints" if you want to).

All of these methods can be used on a skinned and rigged character without problems.


Regards,
Andreas

M.E.L.
08-22-2005, 09:38 AM
Little late here on this one but Thomas, you need to make sure that you are using an equivalent Rotation Order to the joints Orientation. You can often tell if the Rotation Order is incorrect for the orientation based on the problem you are having (the control is not rotating the head in its proper axis).

Rotation Order works as follows:

Default XYZ

X - represents your primary solving axis, this is typically your horizontal axis.
Y - represents your secondary axis, this is typically you up-axis.
Z - represents the alternative axis so to speak (bad explanation I know)

The thing to remember when setting up the rotation order is that your primary and secondary axis should closely match that of your joint orientation... this will aid an assist you in struggling against gimbal lock (it will NOT prevent gimbal lock) and will also give you a clean rotation on your joint.

-s

CGTalk Moderation
08-22-2005, 09:38 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.