Thursday, March 12, 2009

It's all in the eyes

I work best around the house when something triggers an OCD episode. Some days I just want cereal. Realizing that none of the cereal bowls are clean and there are a sink full of dishes I go into a cleaning frenzy. After cleaning all the dishes, vacuuming the floor and taking out the trash I pour myself a bowlful of tasty empty calories. Why didn't I clean the house earlier? I didn't want cereal.

I'm finding that I work the same in all aspects of my life. I've been storyboarding my short film and fleshing out timing in the animatic, but I really got an itch to animate something. I started to animate a short 40 second acting sequence as an exercise. Now that I'm to the point of animating the face I realized I need a face rig proper to get more facial expression. Another week later and I've learned the ins and outs of building a face rig UI.

Having worked as a programmer for over 5 years now I've realized that I need to script in 3D more because that would be the next evolutionary step for me. Now that I understand Maxscript a whole new world has opened up. I told my wife it's as if I understand the Matrix.

Eye Rig Test


It's simple really, here's the expression to control the upper left eyelid:
brow_factor = brow * .16
angle = (-(top_lid*1.9)+70) +
((-(eye_ctrl_x - eye_ctrl_home_x)) * .03)

if (brow < 0) then angle -= brow_factor

degToRad(
amin#(
if top_lid < -28 then
124
else
amax#(angle,40 - brow_factor),
124)
)
The take away lesson is that Float Script controllers are the way to go. Forget Reaction Manager (if you know how write Maxscript), forget Wire Parameters and forget Float Expressions.

No comments:

Post a Comment