Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Dynamic, Multi-Point, Marker-Triggered Timeline

  • Dynamic, Multi-Point, Marker-Triggered Timeline

    Posted by Tyson Frantz on October 27, 2020 at 2:41 am

    Ok, this one has me stumped. I’m attempting to build a dynamic timeline animation that will allow me to move linearly through multiple points along the timeline using expressions. I’d like to trigger the animation from point 1 to 2, 2 to 3, etc. with layer or timeline markers, but the expression needs to reference the X position of the next point so that the animation smoothly starts and stops (hopefully with organic ease out/in) at the next position point. I’m hoping all of this could be dynamic so that I can move both the trigger markers AND the position points along the time. I’ve attached a visual diagram of what I’m trying to accomplish for reference. Any advice would be greatly appreciated!

    Tyson Frantz replied 5 years, 6 months ago 2 Members · 2 Replies
  • 2 Replies
  • Filip Vandueren

    October 27, 2020 at 10:02 am

    – Make the timeline and all the event circles the child of a Null Layer.

    – We will give the anchorPoint of this Null Layer this expression:

    m=thisLayer.marker;

    slideTime = 0.6;

    if (m.numKeys>1) {

    nk = m.nearestKey(time-slideTime);

    nextKeyIndex = Math.min(m.numKeys, nk.index + (nk.time < time-slideTime));

    prevKeyIndex = Math.max(1 , nextKeyIndex-1);

    fromP = thisComp.layer(m.key(prevKeyIndex).comment).position;

    toP = thisComp.layer(m.key(nextKeyIndex).comment).position;

    animTime = m.key(nextKeyIndex).time;

    ease(time, animTime, animTime+slideTime, fromP, toP);

    } else {

    value

    }

    The markers are supposed to go on the null layer, and have the same names as the (unique) layernames of the event circles.

    By animating the anchorpoint, not the position of the null, you can still animate position and scale of the null.

  • Tyson Frantz

    October 27, 2020 at 5:51 pm

    WOW. Just… W-O-W. My jaw is on the floor. I couldn’t even begin to wrap my head around this, and you’ve managed build exactly what I was looking to accomplish in a single, elegant Expression. I can’t even begin to thank you enough, Filip!

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