PDA

View Full Version : Eye Blink


nottoshabi
01-26-2004, 03:55 AM
I would like to do a eye blink control for my set up, but I dont know how to aproach it. So maybe you guys could give me some ideas?

It would be kinda like an automated blink. That could also be used as an eye twich. What I would like is for the eyes to do a 3 frame blink. In wich an attribute in the chanell box will adjust the timing on how far apart the twich wold will animate by the number entered in the chanell box. And another that would adjust the frames in between the blink.

Any ideas?:)

john_homer
01-26-2004, 10:32 PM
this is very quick, and simple (some might say dirty..)
"blinkTime" is an attr you add to whatever... thats the interval...
this is for a 3 frame blink, but you get the idea, easy to change....


float $remainder = (frame % `getAttr geo.blinkTime` );

if ($remainder == 1)
blendShape1.weight[0] = 0.5;
else if ($remainder == 2)
blendShape1.weight[0] = 1.0;
else if ($remainder == 3)
blendShape1.weight[0] = 0.5;
else
blendShape1.weight[0] = 0.0;
dShape1.weight[0] = 0.0;

nottoshabi
01-27-2004, 02:34 AM
Wow thanks :beer: john_homer...

:applause:

CGTalk Moderation
01-17-2006, 07:00 AM
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.