Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Pixel Per second Expression with manual stop at the end

  • Pixel Per second Expression with manual stop at the end

    Posted by Scott Smith on March 11, 2018 at 1:03 pm

    Hi
    I was using this expression to create a slideshow of images moving across the screen

    veloc = 150; //Move object 150 pixel on x axis per second
    x = position[0] + (time – inPoint) *veloc;
    y = position[1];
    [x,y]

    However I would like to be able to come to a stop at the end, I tried linking the 150 to a slider but when i animate this to zero it sends the whole thing back to the beginning.

    Reason for this is that I want consistent speed of images in different comps, however some comps have more or fewer images.

    Thanks in advance

    Walter Soyka replied 8 years, 4 months ago 3 Members · 2 Replies
  • 2 Replies
  • Cassius Marques

    March 12, 2018 at 12:03 pm

    Use a slider control to drive a linear expression to transition between that value and another one of your choosing.

    something like:
    veloc = 150; //Move object 150 pixel on x axis per second
    x = 0 + (time - inPoint) *veloc;
    y = position[1];
    v1=[x,y];
    v2=[value[0],y];
    linear(effect("Slider Control")("Slider"),1,0,v1,v2)

    You can then move it to where you want it to stop and just animate a slider going from 0 to 1 to make it stop there. Change the “0” value in line 2 to set where it starts.

    Cassius Marques
    http://www.zapfilmes.com

  • Walter Soyka

    March 13, 2018 at 3:24 am

    I would probably precompose and manually keyframe Time Remapping, so I could get exactly the easing curve I wanted.

    Walter Soyka
    Designer & Mad Scientist at Keen Live [link]
    Motion Graphics, Widescreen Events, Presentation Design, and Consulting
    @keenlive   |   RenderBreak [blog]   |   Profile [LinkedIn]

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