ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Expressions: bounce version of this overshoot Expression Selector code for text?

COW Forums : Adobe After Effects

FAQ   •   VIEW ALL   •   ADD A NEW POST   •   PRINT
Respond to this post   •   Return to posts index   •   Read entire thread


Paul Hasas
Expressions: bounce version of this overshoot Expression Selector code for text?
on Sep 29, 2019 at 6:33:39 pm

Hi all. I'm taking an online AE course, and I picked up this very useful code for auto-animating overshoot, when using an Expression Selector on a text layer. There are no keyframes, and no other selectors aside from the Expression Selector. You simply choose a property to animate (e.g. Scale, set to 0%), and add this code to the selector's Amount property. The problem is, the course doesn't supply a "bounce" variant of this code, just the overshoot. I've tried adapting this code myself, using some of the standard auto-bounce expressions snippets floating around online as reference, but my results are buggy and unpredictable, and I don't know enough Expressions / math to fix. Can anyone help? Here's the original overshoot code:

freq = 2;
decay = 4;
delay = .05; // delay between animation of nearest units
dur = .12; // unit animation duration

myDelay = (textIndex - 1) * delay;
t = time - (inPoint + myDelay);
startVal = 100;
endVal = 0;

if (t < dur) {
linear(t, 0, dur, startVal, endVal);
} else {
amp = (endVal - startVal) / dur;
w = freq * Math.PI * 2;
endVal + amp * (Math.sin(t * w) / Math.exp(decay * t) / w);
}


Posts IndexRead Thread 


Current Message Thread:





© 2020 CreativeCOW.net All Rights Reserved
[TOP]