Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Random Blinking

  • Posted by Ben Tillett on August 19, 2011 at 12:25 pm

    Hi,

    I’m creating a character in after effects and i’ve got a simple “blink” set up as 10frame precomp. I can get the comp to loop, but that gives me a consistent blink rate. what I’d like is to get the character to blink randomly over the duration of the master comp. I’d like to do this with an expression so I can duplicate the character in the scene, and have each character blinking independently.

    I guess what I’m really trying to do is to get a looped precomp to play randomly, but always from the start frame through to the end of the precomposed animation.

    Can anyone help?

    Thanks!

    Ben

    Ben Tillett replied 14 years, 11 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    August 19, 2011 at 6:04 pm

    Enable time remapping on your precomp and try this time remapping expression:


    minDur = 2;
    maxDur = 3;
    seedRandom(index,true);
    t0 = inPoint + random(maxDur);
    t1 = t0 + random(minDur,maxDur);
    while(t1 < time){
    t0 = t1;
    t1 = t0 + random(minDur,maxDur);
    }
    t = time - t0;

    That should give you a blink every few seconds.

    Dan

  • Ben Tillett

    August 21, 2011 at 3:25 pm

    Thanks Dan!

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy