Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Blinking expression for random characters of a text

  • Blinking expression for random characters of a text

    Posted by Sebastien Bruzzo on April 12, 2023 at 8:14 pm

    Hello there !

    On a text layer Animator, I’d like to adapt Dan’s good old blinking effect expression :

    minSeg = 1.5; //minimum interval (must be > 0)

    maxSeg = 2.5; //maximum interval (must be > minSeg)

    minFlicker = .5; //must be less than minSeg

    maxFlicker = 1; // must be less than minSeg

    segStartTime = 0; //initial conditions

    segEndTime = 0;

    i = 1;

    while (time >= segEndTime){

    i += 1;

    seedRandom(i,true);

    segStartTime = segEndTime;

    segEndTime = segEndTime + random(minSeg,maxSeg);

    }

    flickerDur = random(minFlicker,maxFlicker);

    seedRandom(1,false);

    if (time > segEndTime – flickerDur){ random(0,100) }else{ 100 }

    Which, applied to an expression selector with the opacity property, makes the entire text blinking.

    I’d like to have each character blinking randomly.

    The desired effect is that of a neon text whose letters start to blink a little from time to time, randomly. I haven’t been able to find on the forum although I’m pretty that question has been asked already.

    Thank you all !

    Brie Clayton replied 3 years, 1 month ago 3 Members · 5 Replies
  • 5 Replies
  • Dan Ebberts

    April 12, 2023 at 8:40 pm

    If you add an expression selector and delete the range selector, and apply this to expression selector’s Amount property, it might get you close to what you’re after:

    minSeg = 1.5; //minimum interval (must be > 0)
    maxSeg = 2.5; //maximum interval (must be > minSeg)
    minFlicker = .5; //must be less than minSeg
    maxFlicker = 1; // must be less than minSeg
    segStartTime = 0; //initial conditions
    segEndTime = 0;
    i = textIndex*1103;
    while (time >= segEndTime){
    i += 1;
    seedRandom(i,true);
    segStartTime = segEndTime;
    segEndTime = segEndTime + random(minSeg,maxSeg);
    }
    flickerDur = random(minFlicker,maxFlicker);
    seedRandom(textIndex,false);
    time > segEndTime - flickerDur ? random(0,100) : 100
  • Sebastien Bruzzo

    April 13, 2023 at 8:30 am

    Thank you so much Dan ! It’s perfect.

    Just one more detail, is there a way to invert the result ?

    The current result shows flashing letters from 0% opacity text, and I would like the text to be 100% visible and some letters to go out. Thanks !

  • Dan Ebberts

    April 13, 2023 at 12:59 pm

    You could change the last line to:

    time > segEndTime - flickerDur ? random(0,100) : 0
  • Sebastien Bruzzo

    April 13, 2023 at 1:11 pm

    Oh ! Thanks Dan 😅

  • Brie Clayton

    April 13, 2023 at 7:21 pm

    Thank you, Dan, for providing this solve!

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