PDA

View Full Version : Volume Scaling Expression


MikeRhone
01-29-2004, 05:53 PM
I was wondering if anyone here could help me out with the math on volume scaling.

I would like to scale down an object in Y, and have X and Z scale out accurately.

Im not sure what the expression would be, but I know it must be a quadratic because as Y aproaches 0, X+Z would approach infinity.

I hope what im trying to do makes sense. Any ideas???


Mike R

Mooncalf
01-29-2004, 06:01 PM
Hey Mike,

I'm not MEL enough to figure this out (can MEL be used as an adjective?), but I saw a tutorial here:

http://www.ice.org/tutorials.php?tutorial=10

that demonstrated using the connection editor for, I think, the opposite of what you're looking to do. (at the very least it's related, I believe) I wonder if it's possible to set up a "negative" connection?


Either way, good luck!


- M

mark_wilkins
01-29-2004, 11:50 PM
Originally posted by Mooncalf
I wonder if it's possible to set up a "negative" connection?

Use the multiplyDivide utility node to multiply by -1.

-- Mark

dwalden74
01-30-2004, 04:25 PM
Use the multiplyDivide utility node to multiply by -1.

...but that won´t help with Rhonedog´s question. For that he should use a multiplyDivide node (as mark said), but divide 1 by the scaling value (plug the y-scale into the second input), then plug the result into the x and z scale attrs. When you scale the y up by 2, x and z go down to 0.5, when y is 0.9, x and z are 1.1, etc... I use this directly in my own rigging scripts.

:beer:

mark_wilkins
01-30-2004, 04:53 PM
David, my response was in reply to Mooncalf's "negative connection" question, not the original poster, though as you point out that node can help with his problem too! :)

-- Mark

MikeRhone
01-30-2004, 05:21 PM
Thank you all very much.

And ye, Dwalden, once again you've come through. I knew it had to be a simple answer!!!

To clarify:

To have a sphere that squashes and stretches volumetrically in X and Z when Y is scaled:

Create a multiply divide node.

Set the operation to divide

Plug '1' into Input1 X and '1' into input1 Z

Plug sphere.scaleY into input2 X and Input2 Z

Plug outputX into sphere.scaleX and outputZ into sphere.scaleZ



Thanks again!

Mike R

dwalden74
01-30-2004, 05:26 PM
David, my response was in reply to Mooncalf's "negative connection" question, not the original poster

yeah, that´s what I figured. But at first I was like, "Whoa, you been workin´ to much overtime!" :cool:

cheers guys-
David

CGTalk Moderation
01-17-2006, 08:00 AM
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.