Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Ease in to and out of a sin wave position move via layer marker??

  • Ease in to and out of a sin wave position move via layer marker??

    Posted by Gerald mark Soto on December 9, 2017 at 6:35 am

    So I want a an object to be stationary then it eases into a sin wave up and down motion(position). Then eases back into its original stationary position. And it should be activated with 2 layer markers. First one starts the ease motion then the second one eases it back into rest. And also an option for how long the ease would last. From 10 frame ease or a 30 frame ease into a sin wave that can be controlled based on Frequency and amplitude. Can you help?

    Dan Ebberts replied 8 years, 5 months ago 2 Members · 3 Replies
  • 3 Replies
  • Dan Ebberts

    December 10, 2017 at 12:06 am

    Something like this maybe:


    easeFrames = 10;
    freq = 5;
    amp = 50;
    if (marker.numKeys > 1){
    t1 = marker.key(1).time;
    t2 = marker.key(2).time;
    easeSec = framesToTime(easeFrames);
    if (time < t2)
    a = ease(time,t1,t1+easeSec,0,amp)
    else
    a = ease(time,t2,t2+easeSec,amp,0);
    y = a*Math.sin(freq*(time-t1)*Math.PI*2);
    value + [0,y]
    }else
    value

    Dan

  • Gerald mark Soto

    December 10, 2017 at 6:45 am

    Okay this is working but is it possible to have the ease finish before the second marker. Currently where the 2nd marker is placed it starts to ease after the marker. I essential would like all the animation to occur within the inside range of the 1st & 2nd marker. Thanks.

  • Dan Ebberts

    December 10, 2017 at 8:16 am

    Like this, I guess:


    easeFrames = 10;
    freq = 5;
    amp = 50;
    if (marker.numKeys > 1){
    t1 = marker.key(1).time;
    t2 = marker.key(2).time;
    easeSec = framesToTime(easeFrames);
    if (time < (t1+t2)/2)
    a = ease(time,t1,t1+easeSec,0,amp)
    else
    a = ease(time,t2-easeSec,t2,amp,0);
    y = a*Math.sin(freq*(time-t1)*Math.PI*2);
    value + [0,y]
    }else
    value

    Dan

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