ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Fade out after falling

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Topher Blair
Fade out after falling
on Apr 3, 2017 at 9:12:43 pm

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.


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;

easeIn(t, fallStart, fallRate, startPos, endPos)

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 All Rights Reserved