Procedural Rig in Maya question??

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  04 April 2003
Procedural Rig in Maya question??

Hey,

Im building a procedural rig in Maya and Ive got a small problem with pivots. I managed to solve it, but it just seems like a really difficult way, so Im just checking if there is an easier way.

So here goes:

I have a node that I want to be snapped to my wrist and then I want its pivot to be snapped to the elbow. The problem is that the translate co-ordinates for the elbow joint are based on their creation, so they are like 0 0 15, but in world space they are actually like 30 12 6. This has to be done via a script, so I cant just go into pivot mode and snap to the elbow. I need to actually assign the position of the elbow to the rotatePivot values of the node. When I point constraint my node to the wrist, the rotatePivot values are still 0 0 0, so now if I want to get it to the elbow, I dont have anyway of doing this. Thats basically my problem.

Here is how I solved it:

I create a locator and snap that to the wrist where my node is. I then freeze transformation on the locator so its position is 0 0 0 at the wrist. This is the same as the nodes rotatePivot. I then point constraint the locator to the elbow and get its co-ordinates. I then assign those to the rotatePivot of my node. Thats it, now my object stays in the same place and its pivot is by the elbow. I then delete the locator and any null constraints.

My solution works, but my question is whether or not its the easiest method. So please if anyone does have an easier method please share it with me. Keep in mind that this is a procedural script and I will need to adjust the position of the elbow depending on the model, so it will never have a constant position before I apply the rig.


Cheers,
loked
 
  04 April 2003
The xform command is your friend...

float afElbowPos [3] = `xform -q -ws -rp ElbowJoint`;

xform -ws -rp afElbowPos[0] afElbowPos[1] afElbowPos[2] WristLocator;


... or something like that.

Hope this helps,
Michael Duffy
mduffy@ionet.net
 
  04 April 2003
Okay, now I feel like a fool. That was really simple. I forgot that there was world space and object space. Thanks!!!

Later
 
  01 January 2006
Thread automatically closed

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.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 07:36 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.