/* */

Tuesday 11 May 2010

Toxic Boy MEL

mel commands utilised during the creation of this rig:                                                                                                                                          


arclen -ch1
Creates the node which acquires information about the spline ik's length to be plugged into a multiply divide node.


CreateNode multiplyDivide;
Creates the Multiply/Divide node.


$Scale = arc Length / original length
$invScale = 1/sqrt ($Scale)
Variable declared to execute volume preservation expression. The first line declares the variable $Scale, which gives the X scale factor of each joint (the same as the multiply divide node, I used the node because it evaluates quicker). 


The second line declares the variable "$invScale", which is 1 divided by the square root of scale.
For example: 
if $Scale = 2 
invScale = 1/ 1.414 
invScale = 0.70 


-This value is then plugged into the scale Y and scale Z of each joint.-


createNode frameCache
The above expression will give a uniform stretch down the spine that doesn't maintain volume, meaning as the spine extends it goes off model. The frame Cache node uses an animation curve to acquire information to plug into the above expression. Now the animator can alter the value of volume at each joint by simply editing the curve and not the expression. Very quick and very useful.

aliasAttr globalScale toxic_body_anim.scaleY;
creates an alias for the name of the attribute in the channel box - in this case the Scale Y attribute was changed to "globalScale".

No comments:

Post a Comment