FORUMS: list search recent posts

Using markers to control animation

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Dennis Cheung
Using markers to control animation
on May 1, 2018 at 5:30:07 pm
Last Edited By Dennis Cheung on May 1, 2018 at 6:25:31 pm

Hi all
I've seen a few variation of this question posted here. I'm close to a solution for my problem, but not quite.
I'm trying to use markers to control a layer's animation using the linear(time, t1, t2, p1,p2) technique. Essentially I want four keyframes' worth of motion packed in two markers. The duration of the motion is set with a slider control. At the first marker, I want the motion (opacity) to fade on at "duration." At second marker, I want the opacity to fade out at the same duration.

While the code works for the most part, I'm getting a sudden dip in opacity (3%) at the second marker before resuming to animate from 100%-0%.

Below is my code:

L = thisComp.layer("Control");
dur = thisComp.layer("Control").effect("duration")("Slider");
t3 = L.marker.key(2).time;
if (time < t3){
t1 = L.marker.key(1).time;
t2 = t1 + dur;
p1 = key(1);
p2 = key(2);
ease(time,t1,t2,p1,p2);
}
else
if (time > t3){
t4 = t3 + dur;
p3 = key(2);
p4 = key(1);
ease(time,t3,t4,p3,p4);
}


Thanks in advance for your time,
Dennis


UPDATE:
I solved the issue by changing (time < t3) to (time <= t3)

Thanks for reading


Return to posts index

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