Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Help!, with expression (layers)?

  • Help!, with expression (layers)?

    Posted by Jim Branstetter on December 16, 2005 at 2:46 am

    Hi All.

    Thanks in advance for any help or suggestions.

    What I want to do is randomly have different layers show up (opacity) at different times over time (kinda flickering) and then all show up at the end. There are a bunch of of these layers so I was thinking (DANGER! Will Robinson) that the easiest way might be to have an expression that would randomly access these layers for a short durration untill the end where they would reveal and then stay 100% (still randomly).

    I hope this makes some sense.

    Thanks, Jim

    Colin Braley replied 20 years, 4 months ago 2 Members · 1 Reply
  • 1 Reply
  • Colin Braley

    December 16, 2005 at 3:11 am

    Here is an expression for opacity that will do the flickering and the fading. Don’t give me any credit though, I copied and pasted some code used in an example on Dan Ebbert’s motionscript.com and added about 3 lines to it. 🙂

    //–Begin Expression
    segMin = .5; //minimum segment duration
    segMax = 1.5; //maximum segment duration
    flickerDurMin = .5;
    flickerDurMax = .8;
    timeToFadeIn = thisComp.duration – 1;
    //–
    if(time < timeToFadeIn) { 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
    }

    }else{//Don’t use Dan’s code if time >= timeToFadeIn
    ease(time, timeToFadeIn, thisComp.duration, 0, 100)
    }

    //–End Expression

    Colin

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