Friday 26 June 2009

Corrective morph-system

Sometimes. Most of the time. Two morphtargets will not play friends. Meaning that together they move same points in [X,Y,Z] When both are triggered the points get a double-translation that ends in PURE UGLINESS.
To ensure that the result is better, we apply a third morph that fixes the result
This morph is dedicated to only fix this coincidene and is called a corrective-morph

Morph1 + Morph2 = ugly
Morph1 + Morph2 +correction = nice


UGLY----->NICER

Thats all nice.
The problem i had was how to make this system automatic.
When the two morphs are triggered together i wanted a percentage of the third morph to be triggered. Doesnt sound hard? We are actually talking here about two values controlling one value. And there is no multiply/divide-node in max.
The resulting math would look something like this:

Morph1*morph2 = value of correctivemorph/2
But where to write this in max?

So i decided on fixing it on the face-gui level.



The yellow dot is the controller. When moved along Y. it triggers morph1. Along X, Morph2.
Since the extenct of values are [1,1] the diagonal would have to be 45-degrees.
So if i made a another "invisible shape"(the grey rectangle inside the yellow dot) 45 degrees on the controller...its local-axis X would always be defined by the controllers XY. Perfect. One value derived from TWO values.
Pointconstrain the "invisible shape" to the controller and voila!
This localX was easy enough to use to trigger the corrective morph through a ExposeTransform-node.




No comments:

Post a Comment