ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Fade in and out on each marker

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Andrei Popa
Fade in and out on each marker
on Oct 10, 2018 at 5:06:56 pm

I need an expression that i thought would be simple but it seems i can't get it. I want the opacity to go 0-100 in 10 frames, hold 10, fade out in 10. And all these before each marker.

Basically the animation starts one second before each marker, split in 3. Fade in, stay, fade out. And stays zero for the rest of the duration.

Andrei
My Envato portfolio.


Return to posts index

Dan Ebberts
Re: Fade in and out on each marker
on Oct 10, 2018 at 5:28:42 pm

Try this:


m = marker;
n = 0;
if (m.numKeys > 0){
n = m.nearestKey(time).index;
if (m.key(n).time <= time){
n++;
if (n > m.numKeys) n = 0;
}
}
if ( n > 0){
t = m.key(n).time - time;
if (t > .6667){
linear(t,.6667,1,100,0);
}else if (t > .3333){
100;
}else{
linear(t,0,.3333,0,100);
}

}else
0;



Dan



Return to posts index

Andrei Popa
Re: Fade in and out on each marker
on Oct 11, 2018 at 7:40:17 am

Magic, again. Thank you very much.

Andrei
My Envato portfolio.


Return to posts index

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