MAINTAIN
VOLUME Sample Project
This
project demonstrates the use of expressions to maintain the volume of
a
character. It relates three properties,
which are sub-properties of the same transform. When expressions occur on a subproperty they are evaluated last.
In this
case there is a simple channel controlling the y-scale of the model.
The
x-scale and z-scale are each computed with an expression. In this case
the x
and z use the identical expression.
Since the volume stays constant as
if the
model was scaled to 100% which equals 1.
The formula uses the equation:
x-scale
* y-scale * z-scale = 1
In this
case the y-scale is the known value, and the x-scale is the unknown. We
will
assume that the x-scale and z-scale
will be equal to one another. So
x-scale
* y-scale * x-scale = 1
Where
x-scale is what we want to solve for, so:
x-scale
^ 2 * y-scale = 1
Divide
both sides by y-scale yields:
x-scale
^ 2 = 1 / y-scale
Now
take the square root:
x-scale
= Sqrt( 1 / y-scale )
Since
z-scale is the same:
z-scale
= Sqrt( 1 / y-scale )
Have
fun with expressions, Bob
Click
here to d/l sample project(If project shows up in brower and doesn't save you can right click on link and select "save As"