ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

bounce text effect

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Ermal Koci
bounce text effect
on Dec 18, 2017 at 6:06:48 pm

Hello,

I was looking at the bounce code from Dan, and couldn't wrap my head around it (maybe mr. Dan should make an extensive tutorial about expressions like these)
the expressions takes the value from layer keys and bounces that value back.
How do you convert this expression so that it doesn't use keys but text Amount values from text "Animators"?

Thanks.

e =0.7;
g = 3000;
nMax = 12;

n = 0;
if (numKeys > 0){
n = nearestKey(time).index;
if (key(n).time > time) n--;
}
if (n > 0){
t = time - key(n).time;
v = -velocityAtTime(startVal )*e;
vl = length(v);
if (value instanceof Array){
vu = (vl > 0) ? normalize(v) : [0,0,0];
}else{
vu = (v &lt; 0) ? -1 : 1;
}
tCur = 0;
segDur = 2*vl/g;
tNext = segDur;
nb = 1; // number of bounces
while (tNext &lt; t && nb &lt;= nMax){
vl *= e;
segDur *= e;
tCur = tNext;
tNext += segDur;
nb++
}
if(nb &lt;= nMax){
delta = t - tCur;
value + vu*delta*(vl - g*delta/2);
}else{
value
}
}else
value


Return to posts index

Andrei Popa
Re: bounce text effect
on Dec 19, 2017 at 8:13:11 am

Is this what you are looking for?
delay = .03;
myDelay = delay*textIndex;
t = (time - inPoint) - myDelay;
if (t >= 0){
freq =3;
amplitude = 100;
decay = 6.0;
s = amplitude*Math.cos(freq*t*2*Math.PI)/Math.exp(decay*t);
[s,s]
}else{
value
}

The expression is not mine, I have it from a project I bought a long time ago, so I guess its an anonimous author.

Andrei
My Envato portfolio.


Return to posts index

Ermal Koci
Re: bounce text effect
on Dec 26, 2017 at 4:45:39 pm

Yeah,
I have seen this script before. Problem is that this is not exactly bounce, is more an "overshoot" effect. Bounce should bounce to an invisible plane and return, with the frequency going smaller until it stops.
Thanks.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]