Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Flickering Opacity Increment

  • Flickering Opacity Increment

    Posted by Ilya Sire on May 12, 2016 at 9:52 am

    Hello guys

    How to have a flicker opacity here with from 0 to 100 for just one time (flickering fade in)?
    I got Dan random motion here.

    Thanks
    Sire

    segMin = 1.0; //minimum segment duration
    segMax = 1.5; //maximum segment duration
    flickerDurMin = .5;
    flickerDurMax = .8;

    end = 0;
    j = 0;
    while ( time >= end){
    j += 1;
    seedRandom(j,true);
    start = end;
    end += random(segMin,segMax);
    }
    flickerDur = random(flickerDurMin,flickerDurMax);
    if (time > end - flickerDur){
    seedRandom(1,false);
    random(100);
    }else{
    100
    }

    Ilya Sire replied 10 years ago 2 Members · 2 Replies
  • 2 Replies
  • Xavier Gomez

    May 12, 2016 at 5:39 pm

    You can try this (it is built upon Dan’s code, with a 2 sec fadeIn):

    fadeInDur = 2;
    segMin = 1.0; //minimum segment duration
    segMax = 1.5; //maximum segment duration
    flickerDurMin = 0.5;
    flickerDurMax = 1.0;

    t = time-inPoint;
    if (t>=fadeInDur){100}else{
    end = inPoint;
    j = 0;
    while (time >= end){
    j += 1;
    seedRandom(j,true);
    start = end;
    end += random(segMin,segMax);
    };
    flickerDur = random(flickerDurMin,flickerDurMax);
    if (time > end - flickerDur){
    seedRandom(1,false);
    x = random();
    }
    else{
    x = 1;
    };
    linear(t, 0, fadeInDur, 0, 100) * x;
    };

    Xavier

  • Ilya Sire

    May 13, 2016 at 4:36 pm

    Thank you so much, it worked!
    Yey!

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