FORUMS: list search recent posts

Random loop expression for mask path

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Rens Wegerif
Random loop expression for mask path
on Apr 3, 2014 at 7:47:50 pm

Hello everybody,

This is a thing I've been searching for quite some time. I've made a simple eye with a shape layer, and want te make it blink by pulling the top point of a circle mask to the bottom one and back. I find this prettier than a blink expression, since you get these nice moon shape that suggest the eye lid. The mask has three keyframes. I want to randomly loop these keyframes, so that the character blinks her eyes randomly.

The other eye is situated in another precomp. The mask of this left eye I can parent to the mask of the first eye.

Is there someone out there who can figure out a way to randomly loop keyframes? I've searched the site of our all time Guru Dan Ebberts but no succes yet...

Stumbled upon this as wel..:

But I don't get any inbetweens..

Thanks everybody!

Return to posts index

Dan Ebberts
Re: Random loop expression for mask path
on Apr 3, 2014 at 10:20:40 pm

Try this:

if (numKeys > 1){
minDelay = .4;
maxDelay = 1.0;
blinkTime = key(numKeys).time;
t = inPoint;
while (t <= time)
t += blinkTime + random(minDelay,maxDelay);
t = t - time;
if (t <= blinkTime)


Return to posts index

Rens Wegerif
Re: Random loop expression for mask path
on Apr 4, 2014 at 1:53:04 pm

Yeah, that's the trick:

Awesome. Thanks Dan!

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved