FORUMS: list search recent posts

Can you get Object Space values in MEL?

COW Forums : Autodesk Maya

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Adam Benson
Can you get Object Space values in MEL?
on Dec 30, 2009 at 8:50:23 am

Ok, I've got another headache here, and if I get this figured out before any of you respond here I will, as always, diligently post my answer for future users.

I'm working on a series of bugs for some music videos. Simple enough. I don't want to have to actually animate all the leg motions, so naturally, I wrote a little script to take care of the leg animations for me. This way when I move the bug, his legs just start walking along.

This all works perfectly fine. Except... when he turns. To my surprise, my simple little script is automatically taking the worldSpace value and not the objectSpace value. Now, I discovered this relatively late, after I've been working at 16 hour day, so it's possible that I'm overlooking the obvious. Here's my script:

translateZ=1.5*sin(roach_Controller.translateZ);

It's very simple, but (in a forward direction) works excellently. However, this does only seem to be taking the worldSpace translateZ value from the roach_Controller. How do I make it take the objectSpace value from the roach_Controller?

Thanks in advance for all your help.

Adam Benson
Visual Effects Artist/Musician/Sound Engineer/Editor
http://www.SleepDeprivedProductions.com
http://www.SleepDeprivedFilms.com


Return to posts index

Michiel Duvekot
Re: Can you get Object Space values in MEL?
on Dec 30, 2009 at 3:17:49 pm

You might want to look at this again. Maya is using local space, not world space. It's easy to check; parent the controller to a transform that has has the inverse transform of the controller, so that all motion of the controller is negated by it's parent. The legs will still move because the controller is moving in object space, but not in world space.

Michiel
http://www.thnkr.com


Return to posts index

Adam Benson
Re: Can you get Object Space values in MEL?
on Dec 30, 2009 at 8:53:50 pm

Interesting suggestion. I'll give it a try.
Thanks

Adam Benson
Visual Effects Artist/Musician/Sound Engineer/Editor
http://www.SleepDeprivedProductions.com
http://www.SleepDeprivedFilms.com


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]