Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Fade out after falling

  • Fade out after falling

    Posted by Topher Blair on April 3, 2017 at 9:12 pm

    Hi,
    I am trying to put together a video of leaves falling off of a dying tree. The leaves all fall at a random time whose range is determined by sliders. The position is changed by a “transform” effect, whose code is pasted below.

    What I want to do is to make it so after the leaves start falling, they fade out over the course of five seconds. I’ve been trying to trigger the fade based on whether the position has fallen 60 below what it originally was, using the code:

    f = effect(“Transform”)(“Position”)[1] – thisLayer.transform.position[1];

    I know that f crossing 60 needs to trigger the fade, but I haven’t gotten any farther than that.

    Thanks!

    seedRandom(index, timeless = true);
    minFallStart = thisComp.layer("Leaf Falling Slider").effect("Min Fall Start")("Slider");
    maxFallStart = thisComp.layer("Leaf Falling Slider").effect("Max Fall Start")("Slider");
    fallStart = random(minFallStart, maxFallStart);
    fallRate = fallStart + thisComp.layer("Leaf Falling Slider").effect("Time Fall")("Slider")
    startPos = thisLayer.transform.position[1];
    endPos = startPos + thisComp.layer("Leaf Falling Slider").effect("Distance to Fall")("Slider")
    t = time;

    [
    0,
    easeIn(t, fallStart, fallRate, startPos, endPos)
    ]

    Topher Blair replied 9 years, 4 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

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