Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Using a 0-100 slider to keyframe from one position to another

  • Using a 0-100 slider to keyframe from one position to another

  • Arvin Bautista

    September 25, 2021 at 9:19 pm

    I’m doing a lot of comps where a map starts out from some wide point (which we’ll call point A) and zooms into a different point (we’ll call point B). The spatial animation from point A to point B is a straight line, but the timing needs to be keyframed as it’s not a simple linear or ease timing.

    I’d love to be able to input the x,y coordinates of Point A and Point B using 2 Point Selectors, and then use a slider control to keyframe the timing of going from Point A to Point B, from 0 (Point A’s position) to 100 (Point B’s position).

    Is this possible?

    (As a side note, I was also thinking of something like this if I wanted to manually control the “strength” of a parent’s influence on its child, where 100 means the child follows the parent’s position perfectly, 0 means it doesn’t follow it at all, and 50 means it only follows at 50% strength)

  • Arvin Bautista

    September 25, 2021 at 10:29 pm

    I figured it out:

    Two Point Controllers: Point A (x,y) and Point B (x,y)

    One Slider Control from 0-100

    Camera null with separate dimensions.

    On x position:

    var ax = effect(“Point A”)(“Point”)[0]
    var bx = effect(“Point B”)(“Point”)[0]

    ax-((ax-bx)*effect(“Slider Control”)(“Slider”)/100)

    On y position:

    var ay = effect(“Point A”)(“Point”)[1]
    var by = effect(“Point B”)(“Point”)[1]
    ay-((ay-by)*effect(“Slider Control”)(“Slider”)/100)

    Keyframing slider from 0-100 tweens the camera null from Point A to Point B, even if Point A and Point B move also.

Viewing 1 - 2 of 2 posts

Log in to reply.

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