Using Expression Text Selector Help
Copy link to clipboard
Copied
Hey everybody! I am wondering if you can help me out.
I am working on a project where I need to animate text. Usually I'd just use text selectors and keyframe the animation myself. As I'm sure you know this takes quite a bit of time. While looking around I found this expression on Videolancer.net.
delay = 0.03; // Delay
freq = 3; // Frequency
amp = 60; // Amplitude
decay = 10; // The smaller the value, the more fluctuations
Speed = 0.8; // The smaller the value, the slower the animation
myDelay = delay*textIndex;
t = (time - inPoint)*Speed - myDelay;
if (t >= 0){
freq;
amp;
decay;
s = amp*Math.cos(freq*t*2*Math.PI)/Math.exp(decay*t);
[s,s] }else{
value
}
That expression creates this effect.
This is pretty close to what I'm keyframing. My question is now how do I use that expression to animate the text out in reverse? I've tried adding another expression selector and that's not working. I've searched a ton of forums and can't find an answer anywhere. Any help you can offer is much appreciated.
Thanks guys!
Copy link to clipboard
Copied
So what the timeline look like? If just putting a minus sign in the speed doesn't make the motion run in reverse then I need to know a lot more about your project.
I haven't got time to try and figure out how to set up the animation or play with things but it won't work with a range selector because it returns an array.
Just select the text layer, press U twice to reveal all modified Properties of the text layer and then PrintScreen and Paste to the forum.
Wait, I just got it. Add a position animator, delete the Range Selector, add an Expression Selector...
To get the test to animate out you will either have to add a marker or keyframe and reference the marker time or just add duplicate the animator and monkey with the expression.
Personally, I'd probably just add a normal animator for position with a range selector and set a couple of keyframes to get the text to fly out. You don't need the bounce when it flies out.
The other option would be to split the layer where you want the text to fly out and change the position or anchor point value. That would take about 2 seconds.
Copy link to clipboard
Copied
Hey Rick. Thank you for taking the time to answer my questions. I tried a few things you suggested and they weren't quite what I was looking for. Here are the things you asked for. Hopefully this will better help you.
Here's my timeline.
I've used the expression from my first post in an expression selector. I've linked a few of the properties to sliders so I can change them more easily. Adding and modifying the position, scale, and rotation properties got me this result.
Now I want to animate it back down using almost the same look. Starting at 'C' The letters would pop up and then go back down. As far as I know I'd need to add a new selector and animation property for each part of the wave - essentially keyframing a sine wave. I'd much rather use an expression since it's much quicker. Splitting the layer and adding a negative sign to the speed expression didn't work. In fact the animation doesn't even happen.
My best guess as to what is happening is the expression is starting from the values I set and returning them to the default with the wave effect.
It goes from
Rotation: 33° to 0°
Scale: 40% to 100%
Position: 120 to 0
How do I get the expression to invert so it goes
Rotation: 0° to 33°
Scale: 100% to 40%
Position: 0 to 120
I'm still pretty new at expressions more complicated than linking properties and the wiggle effect. Again any and all help is appreciated.
Thank you!

