Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Keyframe with value offset

  • Keyframe with value offset

    Posted by Tepi Kuncoro on August 25, 2024 at 3:44 am

    Hello, hope everyone doing great!

    I have 3 animated position keyframes (or maybe more) that have to be linked with 3 different sliders as an offset for the position,
    1. keyframe 1 -> Offset position 1
    2. keyframe 2 -> Offset position 2
    2. keyframe 3 -> Offset position 3

    Is there any way to do this?

    Thanks,

    Tepi Kuncoro replied 2 weeks ago 2 Members · 4 Replies
  • 4 Replies
  • Dan Ebberts

    August 25, 2024 at 6:10 am

    With linear keyframes, a position expression like this should work:

    n = nearestKey(time).index;
    if (time < key(n).time)n--;
    if (n < 1){
    key(1).value + effect("Position 1 Offset")("Point").value;
    }else if (n == numKeys){
    key(numKeys).value + effect("Position " + numKeys + " Offset")("Point").value;
    }else{
    offset1 = effect("Position " + n + " Offset")("Point").value;
    offset2 = effect("Position " + (n+1) + " Offset")("Point").value;
    linear(time,key(n).time,key(n+1).time,key(n).value + offset1 ,key(n+1).value + offset2);
    }
  • Tepi Kuncoro

    August 25, 2024 at 6:30 am

    How about when I have ease in the keyframe? that’s also different?

  • Dan Ebberts

    August 25, 2024 at 11:55 am

    If the ease is AE’s standard easy ease, and you use it on all keyframes, you can probably just replace linear with ease in the expression. If it’s custom easing, that’s a different story.

  • Tepi Kuncoro

    August 25, 2024 at 3:19 pm

    Alright I got it, thank you so much Dan, as always!

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