PDA

View Full Version : object orientation question


Matt Leishman
01-06-2003, 07:16 PM
Hello All!

This question may seem to be trivial to some, but it is a question that has caused me some serious head trauma. Its probably a really easy fix, but i'm having a hard time coming up with it.

What I'm looking for is to be able to rotate an object (not a joint) and freeze out its transforms (so its rotation values are zeroed) without the rotational orientation zeroing out too and popping back to the world xyz orientation.

Any help anyone can give with this is greatly appreciated.

Thanks in advance.

Sanctuary
01-06-2003, 09:53 PM
well, a quick fix ...


group the object to himself ... use the group for world translate/rotate operations, in this way you can keep object`s local orientation

Matt Leishman
01-06-2003, 10:11 PM
yeah, that's what I'm currently doing for a band-aid. I was just hoping someone would know how to do it the cleaner way.

Thanks though Sanctuary.

Sanctuary
01-06-2003, 10:53 PM
well i don`t think there is a cleaner way

or you cand freeze only translate and scale and leave rotate untouched ... but i don`t see how can freeze every thing and still keep ur local orienation

srv
01-07-2003, 01:02 AM
hey,
this might be the answer you're looking for on this page
ik/fk arm gnomon (http://www.thegnomonworkshop.com/tutorials/arm_ik_fk/arm_ik_fk.html)
tell me if it solves your problem.

Matt Leishman
01-07-2003, 04:38 AM
thanks for the post srv, but it doesn't quite solve the problem. It deals with using the orientation of a joint to help solve my problem, but with my situation I'm not dealing with joints so it doesn't quite get there. Thanks for the link tho, great tutorial. I think I'm just gonna get comfortable with the solution posted by Sanctuary, it seems to be treating me fine for now.

AWAKE
01-07-2003, 05:26 AM
group group group.


ITs okay..

Matt Leishman
01-07-2003, 05:06 PM
no doubt, I am now a firm believer in the power of "group, group, grouping". I guess I always have been, but I never really appreciated more than I do now.

playmesumch00ns
01-08-2003, 10:25 AM
What you need to understand with this is that you cannot seperate an object's local coordinate system from its rotation. When you transforming an object you are not moving the object around you are moving it's coordinate system around. This has the effect of rotating, translating, scaling the object from the point of view of a viewer 'in world space'.

The object's pivot point is a visualization of the origin of the object's coordinate system, just as the little xyz in the middle of the view is a visualization of the world space origin.

You can't say to Maya "Okay just set the coordinate system's rotation to 0, but don't rotate it", it's obviously an impossibility. What you can do however is say "Okay, well keep the coordinate system like it is, but for my purposes, call this zero rotation".

What you're really saying here is "Keep the local system rotated at 45 degrees (or whatever), but I want to call this rotation zero relative to the world coordinate system".

Now the only way to do this is to use an intermediary coordinate system. When you group the object to itself you are just creating another transform node above your object. Thus your object's local coordinate system is now defined in the group node's space, which is itself defined in world space. Defining coordinate systems inside one another has the effect of nesting the transformations (as you would expect when you parent one object to another), so from the point of view of a viewer in world space, this has had the effect of keeping the local rotation axes of the object at 45 degrees, while resetting the object's 'rotation value' back to 0.

What is interesting is that if the group node has the same name as the original object, this change will be indistinguishable from the point of view of an expression or script.


Technically speaking, what I have described isn't exactly how it works inside Maya, but this is the functionality that Maya exposes to you. In Maya's internal workings, the space that the object is defined in never changes (it's defined in the shape node), maya automatically gives you another space above this in the form of the transform node. This is how instancing works - it's the exact same object, but with more than one transform node above it, which has the effect of the object being in two different places at once!

Hope this helps your understanding a little. Several people have asked about this sort of stuff now, maybe I should write a short tutorial and put it up here or something

Matt Leishman
01-08-2003, 03:51 PM
thanks, that clears everything up - 'preciate it!

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