Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity › Forums › Adobe After Effects Expressions › Start random opacity fades of multiple layers at specific time

  • Start random opacity fades of multiple layers at specific time

    Posted by Al Mach on April 13, 2021 at 5:17 pm

    I’m currently using this expression to randomly fade multiple layers:

    fadeDuration = thisComp.frameDuration*10;

    maxDelay = .5;

    seedRandom(index,true);

    delay = random(maxDelay);

    t = time -(inPoint + delay);

    linear(t,0,fadeDuration,100,0);

    Is there a simple way to be able to adjust when in my timeline these fades will start? Right now it all happens at the beginning of the timeline.

    Al Mach replied 5 years, 5 months ago 2 Members · 4 Replies
  • 4 Replies
  • Al Mach

    April 13, 2021 at 10:04 pm

    Sorry, I should have said scale instead of opacity. But I think the principle of my question is the same, thanks.

  • Al Mach

    April 13, 2021 at 10:38 pm

    Please disregard my second post it was made in error. It IS opacity.

  • Dan Ebberts

    April 13, 2021 at 11:03 pm

    This change will add in a delay based on the first comp marker:

    m = thisComp.marker;

    mDelay = m.numKeys > 0 ? m.key(1).time : 0;

    fadeDuration = thisComp.frameDuration*10;

    maxDelay = .5;

    seedRandom(index,true);

    delay = random(maxDelay) + mDelay;

    t = time -(inPoint + delay);

    linear(t,0,fadeDuration,100,0);

  • Al Mach

    April 13, 2021 at 11:06 pm

    Brilliant, thank you!

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