PDA

View Full Version : Creating a Maya Muscle and need an Add / subtract node


a3dmonkey
08-20-2002, 07:54 PM
Hello there all,

I'm a grad student at the School of Visual Arts and working on becoming a Character Rigger. One of the things I've been working on from time to time is a muscle sytem that you can create using intool features of Maya. I used a technique similar to Yaron Canetti's from this years SIGGRAPH "02" rigging course for those familiar with it.

To explain to for the rest I'm taking nurbs spheres shaping them to the desired muscle shape. Creating a 1 degree EP curve from the top point to the bottom point of the nurb sphere and then placing the CV's of the curve into clusters. Then making the curve a wire deformer for the sphere. This part all works fine and dandy but I need to add scaling for the muscle as the curve changes shape.

To control the scale I'm currently checking the arc length of the curve compairing it to its original length and then piping it back into the scale value of the nurb sphere. The problem with this is Its creating the reverse scale...

IE when the muscle expands the muscle will scale up and when it contracts the muscle will scale down.

After kicking myself in the butt for doing something so silly I came up with a way to convert the information from the compared info in too the info I need but I need an add and subtract node to do it. If anyone knows what render node I can use to just add or subtract please let me know.

Any suggestions would be appeciated.

Thankx,

Michael Ware
a3dmonkey
SVA :buttrock:

alexx
08-20-2002, 07:59 PM
emm.. the add/subtract node?

but why a node for something so easy? a line of mel will help for sure.

or did i completely misunderstand you?

cheers

alexx

a3dmonkey
08-20-2002, 09:33 PM
Yes I could use an expression and it would be easy but I'm trying to force myself to use Maya nodes exculsively. I'm trying to find out if nodes are faster than expressions as well as making a working muscle. So no expression for me. Until I get fed up break down and have to save my ass with one.

:)

As for the add / subtract node it still illudes me. There's a plusMinus node which takes 1d 2d and 3d values. I'll work with this one and see what I get. Its a sign that I need to take a break when I miss something like that. So off to my second cup of coffee and a 10 min break so theres hope for me yet.

Michael Ware
a3dmonkey

SVA :buttrock:

PS: Thanks for the reply Alexx. Cheers

MCronin
08-21-2002, 02:49 AM
Originally posted by a3dmonkey
Yes I could use an expression and it would be easy but I'm trying to force myself to use Maya nodes exculsively. I'm trying to find out if nodes are faster than expressions

You need to invert the scale value you are getting, right? Using MEL, and the magic of twos compliment, the value can be inverted in less than a nano second. I don't know if sticking with nodes would yield quicker performance but I doubt anyone could even tell.

a3dmonkey
08-21-2002, 06:19 AM
With one muscle maybe it wouldn't make a difference but how about with 30 to 40 muscles on one character and 50 on another? My guess is there will be a hit but who knows how much of one as compared with a node driven one?

As for the muscle scale problem I ended up fixing the muscle with an expression that took 15 sec to write ( 2 expressions mind you ). For some reason I couldn't get the result out of the PlusMinus node. I thought that piping the Output3d as awhole would spit out the resulting value but it never seemed to work for me and piping the Output3dX , Y or Z would just spit out the input values, odd aye?

What I did to get the scale was

1. compare the arc length of the original curve to the current
2. take that divided result and

subtract 1
multilpy by neg 1
add 1 back to it.

This allowed me to have the muscle expand as the curve contracts and shrink as the muscle expands. I've yet to see how heavy it is as I haven't implemented it on my rig yet. I'm starting by doing 1 arm so the biscep / tricep and the Extensors.

The above works but it doesn't allow for twisting ( as occurs int he foram and chest ) and it also has problems with extreme contraction. The research continues I guess.

Ciao,

Michael Ware
a3dmonkey

SVA :buttrock:

CGTalk Moderation
01-13-2006, 02:00 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.