Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Delayed Opacity Rampdown

  • Delayed Opacity Rampdown

    Posted by Sebastian Martinez on June 2, 2010 at 11:03 am

    hi guys,
    here this one:

    i have a slider controle from 0 to 100. from the point of time that slider reaches 100 the opacity of another layer ramps down from 100 to 0 over 1 sec.

    i went a whole day through the ae expression forum and didn’t find anything that combines an if/else function with a rampdown.

    very difficult, i’m still a newbe to expressions.

    respects
    sebastian

    Sebastian Martinez

    Sebastian Martinez replied 16 years, 2 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    June 2, 2010 at 3:13 pm

    Triggers are not as simple as you would think they should be. Basically you need to construct a loop that goes back in time, frame by frame, until you find the time where the value went from below 100 to 100. Something like this should work:


    slider = thisComp.layer("Other Layer").effect("Slider Control")("Slider");
    above = false;
    f = timeToFrames();
    while (f >= 0){
    t = f*thisComp.frameDuration;
    if (above){
    if (slider.valueAtTime(t) < 100){ f++; break; } }else if (slider.valueAtTime(t) >= 100){
    above = true;
    }
    f--;
    }
    if (above){
    t = time - f*thisComp.frameDuration;
    linear(t,0,1,100,0);
    }else{
    value
    }

    Dan

  • Sebastian Martinez

    June 4, 2010 at 12:51 pm

    wow!

    thank’s dan, you are a hero.
    sebastian

    Sebastian Martinez

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