ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Fade up opacity on layer for first 20% of an interval, then repeat.

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Darryl Torke
Fade up opacity on layer for first 20% of an interval, then repeat.
on Nov 27, 2017 at 4:54:21 pm

Simple Version:

I have a layer that I want to fade up in Opacity from 0%-100% for the first 2 seconds of a 10 second interval. I want this to then repeat, the layer would snap back to 0% on the next 10 second interval, and go up to 100% over the course of 2 seconds, etc etc.

Complex Version:

That said, what I *really* want is not a fixed 10 second interval. I would like the interval tied to when a digit changes on a text layer. I have a separate text layer with the source text tied to a simple slider/rounded expression:

Math.round(effect("Slider Control")("Slider"));

What I would really love is that the interval length is determined every time the number changes. So, when the above sourcetext changes digits, I would like a new interval to start. And instead of a fixed 2 seconds of fading up, just the first 20% as the interval of fading up would be preferable. Does this make sense? Unfortunately this far beyond my expression understanding so I'm not even sure if it's possible.

Math.round(effect("Slider Control")("Slider"));


Return to posts index

Dan Ebberts
Re: Fade up opacity on layer for first 20% of an interval, then repeat.
on Nov 27, 2017 at 6:08:52 pm

The trick with any triggered expression is always how to figure out how long ago the triggering event happened, (and in your case, how long until the next one). When the triggering event is a value changing, you're probably stuck looking for the frame where the triggering change happens by searching backwards in time, frame-by-frame. If the value is keyframed, you can optimize the search somewhat by eliminating any frames before the first keyframe and after the last keyframe, but it will still be quite inefficient. The exact expression depends on how you have things set up.

Dan



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]