Move certain amount of pixels with expression
by Stefan Vlemmix on Sep 8, 2016 at 9:26:00 am Last Edited By Stefan Vlemmix on Sep 8, 2016 at 9:32:56 am
After plowing through Google for several hours and checking a lot of websites I've decided to create an account here because I have no clue how to solve my problem.
Here's the thing: for my work I create video's with text flying in and out of frame based on what the person in the video is saying. Currently I'm keyframing everything which is quite a drag. So I thought, why not use a simple expression and create a preset from that? The thing is... I can't find out how to do it.
What I want is the text flying into frame with a bounce at the end at the in point of a layer, and go back to where it came from at the out point. Always a given amount of pixels, 300 for instance and always over a given amount of time, say, 15 frames. I can't imagine this isn't possible since you can create some really awesome stuff with expressions.
Movement should be on one axis. If anyone can point me into a good direction, then I'll try to figure out how to change the direction of the movement, the axis and maybe add sliders for some extra control. Thanks in advance!
Here's an example of the text animation I want to create using expressions (only the text moving into frame):
If you want to do this with an expression, here's the general idea:
Test to see if the current time is within the layer's In transition. If it is, calculate the movement plus overshoot as a function of time. If not, test to see if the current time is within the layer's Out transition. If it is, calculate the movement the other way as a function of time.
You might also try Ease and Wizz, either as a replacement tool, or as inspiration for managing the bounce/overshoot. These expressions are built to use keyframes, but you can adapt them to use values instead. http://aescripts.com/ease-and-wizz/