Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions opacity=time*index

  • opacity=time*index

    Posted by Richard Herd on November 27, 2009 at 8:48 pm

    I cannot get the syntax correct. So any help is highly appreciated.
    Thanks.

    Basically–very basic!–the circles will fade in over a few seconds, then when opacity = 100, it should fade out.

    Thanks again!

    Richard Herd replied 16 years, 5 months ago 2 Members · 5 Replies
  • 5 Replies
  • Dan Ebberts

    November 27, 2009 at 9:22 pm

    Something like this should do the trick:

    fadeInTime = 3; // duration of fade in (sec)
    fadeOutTime = 1; // duration of fade out (sec)

    if (time < inPoint + fadeInTime){ linear(time,inPoint,inPoint+fadeInTime,0,100) }else{ linear(time,inPoint+fadeInTime,inPoint+fadeInTime+fadeOutTime,100,0) } Dan

  • Richard Herd

    November 27, 2009 at 10:56 pm

    Yep, it works!

    If you wouldn’t mind, taking a second to explain the expression, so that I can learn what’s happening, rather than just copy-paste.

    Additionally, I was hoping it would loop this effect too, with some kind of random number, as in fadeInTime = x, where it’s a slider.

    Thanks for your patience and help!
    Rich

  • Dan Ebberts

    November 28, 2009 at 12:14 am

    What do you mean by loop? Continuously fade in and out? Is the random number is the same for each fade in, but different for each layer, or different for each fade in? How do you see a slider involved in all this?

    Dan

  • Richard Herd

    November 28, 2009 at 1:17 am

    Thanks!

    I think this is correct-ish:

    seedRandom(thisComp.layer(“Null 11”).effect(“Random Helper”)(“Slider”),true)

    But I’m not sure it answers all your questions, sorry:(

    Otherwise, yes — different for each fade in. I was hoping to make one layer and then duplicate it 5 or 6 times. Also slider plus the index, so that layer 1 and layer 2 differ but are still very similar.

    There’s also a position expression that I deleted by accident. Very simple though, the position moved time*index.

  • Richard Herd

    November 29, 2009 at 12:14 am

    It’s going very slowly, runs out of memory, and crashes. Somewhere I read the proper order of things, how things should be nested, and I believe I’ve got it all wonky.

    Any help is greatly appreciated.
    Thanks

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