PDA

View Full Version : How you mirror complex rig parts?


Xeash
10-16-2008, 07:36 PM
Hi,everyone
I trying to create the very complex character rig in Maya ( complex for me :rolleyes:)
and I faced a problem here...
I created complex leg rig with a lot of constraints',expressions' and computation nodes' connections...so when I tried to mirror that "system"(using duplicate with input connections) I got e.g. left leg rig with connections from the right leg...It's looks like mess...
I don't want to recreate all of this for left leg again....even scripted "reconection"(disconnect & connect with node name' side change) will be bad solution because here as I said a lof of connections.....

How you'ld solve this if you'ld faced same problem as me?

I will be thankful for any response :shrug:

Anyway thanks

mberglund
10-16-2008, 07:45 PM
I've never seen a full proof way of doing that... well, no magical script that will do it for you anyways. What I've learn to do is create small scripts that do about 80% of the work. e.g. create a script that builds the stretchy leg, then one that builds the switching system, then one that builds the reverse foot setup. then all you have to do is just piece it together.

I know that it doesn't help you now... good luck. please post if you find an autoMagic way of mirroring.

Polimeno
10-17-2008, 02:36 PM
Xeash

i recomend try to understand the aproach mberglund said to you, re-start your rig and thinking of it...
create all bones, rig in pices (like arm, leg, hands) of one side, understand how it works in script and save time creating functions to autome it for you.
bingo !


keep going.

Xeash
10-18-2008, 12:03 PM
Big thanks for your replies)


About automating...If I creating rigs for production then that you said is truly time-saving technique and I agreed with that. But in current rig I trying to experiment a lot... so I'm not confident to script that because it is not final(100% working) version of rig.That's why I needed workflow for mirroring ...to test e.g. 2 legs at work:rolleyes:

Actually I did that!
It's not super auto-(street)-magic way of mirroring but it works for me.
I didn't script it through...so there is about 5 minutes handwork(depend of rig).
And 1 thing in naming nodes: all(!) nodes e.g. for right side I started with "R_",so we need
just replace all connections to "L_".
So:
1.Duplicate rig with input graph(not input connections!) & mirror it
All your computation nodes & constraints will be duplicated (expressions too)
2 Rename all nodes dedicated to another side
3.Rename constraints weight attributes(!) -in Maya there is no way to rename attributes(or I don't know),so we need just recreate constraints with grabbing parametres of existing constraints,replace e.g. "R_" to "L_", delete existing constraint and create new constraint with new parametres.
I scripted this part(For this I used Python)
4.Rename duplicated expression content(same replacing "R_" to "L_")

But if we had connections(not expressions connections) to constraints we need recreate this by hands

P.S.
It's my first iteration of this technique so there is a lot of improving needed)

tonytouch
10-18-2008, 02:11 PM
hi Xeash ,

you can use "renameAttr object.oldAttr newAttr;" to rename them !!!

but the attributeOrder will change , and the effect will only be seen after reselecting the object .

in order to "reOrderAttr" check out this script (http://www.highend3d.com/maya/downloads/mel_scripts/utility_external/misc/reOrderAttrs-2218.html)

Buexe
10-18-2008, 05:59 PM
I don`t know the exact circumstance, but I don`t think that mirroring a rig is a good idea, at least if it is done brute force via scaleX = -1. Done on some parent node, it will affect all children and this will screw up stuf, for example rotating with the rotate manip wil be inversed on the x axis and I don`t know who this will make happy. Either taking notes and do it by hand or script it. In an experimaental stage the hand method is prolly better and will nt create so many unexpected new "features".

Xeash
10-23-2008, 02:27 PM
hi Xeash ,

you can use "renameAttr object.oldAttr newAttr;" to rename them !!!

but the attributeOrder will change , and the effect will only be seen after reselecting the object .

in order to "reOrderAttr" check out this script (http://www.highend3d.com/maya/downloads/mel_scripts/utility_external/misc/reOrderAttrs-2218.html)

Thanks,tonytouch
But this command renames custom attributes only


I don`t know the exact circumstance, but I don`t think that mirroring a rig is a good idea, at least if it is done brute force via scaleX = -1. Done on some parent node, it will affect all children and this will screw up stuf, for example rotating with the rotate manip wil be inversed on the x axis and I don`t know who this will make happy. Either taking notes and do it by hand or script it. In an experimaental stage the hand method is prolly better and will nt create so many unexpected new "features".
I respect your experience, Buexe, and I think you right...This is total mess:)
But for my experiments this is enough....
Hm...about controls mirroring...
I think more comfortable for animators when you rotate fk arm up second arm rotate up too(I think you knew about that I talking). So how you will get controls mirroring without negative scale?

thanks again for your replies

Buexe
10-23-2008, 03:50 PM
create an asymmetric joint hierarchy and mirror it with the behaviour option on. Check what Maya does to the values on the joint node and you`ll see how you can get the mirror behaviour without using the scale attribute. I hope this helps a little bit : )

Xeash
10-23-2008, 05:37 PM
create an asymmetric joint hierarchy and mirror it with the behaviour option on. Check what Maya does to the values on the joint node and you`ll see how you can get the mirror behaviour without using the scale attribute. I hope this helps a little bit : )
Thanks, I thought answer there too :)

CGTalk Moderation
10-23-2008, 05:37 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.