Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Custom ease via an Expression or copy ease from keyframes to expression

  • Custom ease via an Expression or copy ease from keyframes to expression

    Posted by Jacob Resch on July 13, 2018 at 11:59 am

    Hi there,

    I want to automate the Position of a Text Layer via markers.
    That already works via the expression below

    But instead of easeOut i want a custom ease.
    I already have the ease i want on some keyframes, but is t here a way to convert that specific ease into an expression i could then use here instead of easeOut ?
    Or reference these keyframes in the expression and let the expression only use the ease of these keyframes.
    Is that possible ?

    Any help is appreciated! Thank you :)!

    zeit = framesToTime(20,25)
    sx = 62.25; // slide distance
    sd = zeit; // slide duration

    m = thisLayer.marker;
    y = 0;
    if (m.numKeys > 0){
    n = m.nearestKey(time).index;
    if (time < m.key(n).time) n--;
    if (n > 0){
    t = time - m.key(n).time;
    y = easeOut(t,0,sd,(n-1)*sx,n*sx);
    }
    }
    value + [0,-y]

    Alex Printz replied 7 years, 9 months ago 2 Members · 1 Reply
  • 1 Reply
  • Alex Printz

    July 16, 2018 at 2:20 pm

    You would need to create some additional lines of code to convert a variable over time into your values. If you had something keyed, you could measure the first and last keyframes and scale proportionately to the keyframe value.
    You could also write a bezier equation to pass the value through.

    Then use the output of your equation/property scale as an input on a linear function.

    I can’t be more specific than that because we have no idea of knowing what your easing output looks like.

    -Alex

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