PDA

View Full Version : Comparing object rotations?


Malkalypse
04-16-2009, 09:18 PM
Okay, I have a problem. I want to be able to compare the difference in rotation between an object and its parent, and use that difference as a script controller for a different object with ITS parent. To make things more complicated, the first object being checked is using a lookat constraint.

To illustrate (and this should not be a hard one to set up for anyone that wants a crack at it):

http://www.versatileartist.com/temp/relative_rotation.jpg

I want Box 4 to stay at the same relative rotation to it's parent, Box 3, as Box 2 is to its own parent, Box 1. I have spent several hours trying to figure this out, and my results have not been at all satisfactory. Please help!

PEN
04-17-2009, 01:38 AM
Just use an expose transform helper and wire to the exposed values. Does that get what you need?

Malkalypse
04-17-2009, 03:58 AM
It certainly appears to, thank you!

...

...

... Why have I never heard of the Expose Transform helper before now???

PEN
04-17-2009, 01:50 PM
Got me, I wrote the white paper for AD years ago on it and it was added in Max 8 I think. I have been using it ever since.

DaveWortley
04-17-2009, 02:47 PM
I didn't know this existed either... What are the applications of it? I'm assuming it's best uses are in rigging?

PEN
04-17-2009, 03:07 PM
There are many cases where you can't just wire up to the position or rotation of an object. For instance if an orientation constraint is controlling the track there is no track to wire to to get the local X rotation value. So you use the Expose TM helper to get those values. I use it in all rigs on just about all joints that I'm getting values from, This way I am not tied to any given controller in a list either.

scrimski
04-17-2009, 03:16 PM
I use it in all rigs on just about all joints that I'm getting values from, This way I am not tied to any given controller in a list either.
What's the advantage of this? At first sight this just looks like more work, at least to me.

PEN
04-17-2009, 03:28 PM
Huge advantages. First you can't get the rotations from a joint being controlled with an orientation constraint unless you use a script controller and do the math your self. Two it is faster then using a script controller in both setup and speed of calculation. Third I don't have to wire to just a single controller in a list of controllers I can wire to the final output of the controller list allowing me to use animation layers on objects that are driving others.

scrimski
04-17-2009, 03:52 PM
Two it is faster then using a script controller in both setup and speed of calculation.
Faster - the magic word.

Thanks for explaining.

CGTalk Moderation
04-17-2009, 03:52 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.