Volume Preservation via Utility Nodes

Become a member of the CGSociety

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

Thread Tools Search this Thread Display Modes
  09 September 2012
Volume Preservation via Utility Nodes


I'm watching Jason Schleifers AFR to catch up on some stuff.

I'm trying to do volume preservation with a translate driven stretch/squash spine. He does it with expressions and I'm doing it with utility nodes.


MultiplyDivide - Arc length divided by absolute length.

Then that would drive the scale, except that it'd drive it in reverse... Putting a output x -1 MD would cause the scale to just invert rather than only scaling it by -1 and I don't think a condition would solve it?

So of course there's also the inverse scale but when I use that things go strange as if the inversscale has become disconnected between joints - which it has because obviously I just overwrote them...

I will work on how to change the quantity of preservation once I know what to do here, but until then I'm stuck.

Does anyone have any suggestions?
  09 September 2012
Maybe there're more simple ways to do this, but this is how I do it. Works fine on ik spline.

After the devide,
- subtract the value by 1 so it's 0 at normal state.

- Split the value to 2 channals, X(or R) for stretch and Y(or G) for squash
multiply them by 2 scalar values

MD input2X=-1 input2Y=1

**multiply values don't have to be 1 and -1. You can try multiple value to maximize your deformation.**
***This part is up to you, if you want some fall off on the deformation you can add another MD that does power the values before this one.***

- Limit the value using clamp node.
clamp minR=-1 maxR=0
clamp minR= 0 maxR=1

- 2 condition nodes, one for stretch and one for squash
stretch condition// secondTerm=1 op=greather, clamp.outputR>>colorIfTrue, colorIfFalse=0
squash condition// secondTerm=1 op=less than, clamp.outputG>>colorIfTrue, colorIfFalse=0

- addDoubleLiear or +-Average
//add the outColorR and G together

- addDoubleLiear or +-Average
//add with the value 1

- connect to joint scale

hope this helps

Last edited by nuternativ : 09 September 2012 at 10:04 AM.
  09 September 2012
Hey mate,

That worked wonders. Thanks lots for that! Took a bit of tweaking but it got there, had to change around the scalar values and condition operation.

Adding power MD seems to make the mesh collapse :x

Last edited by JaredTaylor : 09 September 2012 at 08:38 PM.
  09 September 2012
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
Society of Digital Artists

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

All times are GMT. The time now is 10:31 PM.

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