Activity › Forums › Adobe After Effects Expressions › “Inertial Bounce” expression in text layer
-
“Inertial Bounce” expression in text layer
Caitlin Mckenna replied 9 years, 7 months ago 8 Members · 23 Replies
-
Dan Ebberts
October 4, 2011 at 9:45 pmThe first expression derives its amplitude and timing from the velocity at the most recent keyframe. What would trigger your text animation?
Dan
-
Peter Zeet
October 4, 2011 at 9:59 pmmm, right now I was testing it on a new comp, just with a text layer… and just animating the x rotation animator (setting it to 90, and then animating the “amount” param.)
I`m guessing I`m totally mistaken with this approach… -
Dan Ebberts
October 4, 2011 at 10:48 pmTry setting the x rotation to 90, and keyframing the Amount from 100 to 0 (over about 10 frames). Then apply this Amount expression:
delay = .1;
tDelay = delay*textIndex;
n = 0;
if (numKeys > 0){
n = nearestKey(time-tDelay).index;
if (key(n).time > time) n--;
}
if (n == 0){
t = 0;
}else{
t = time - key(n).time - tDelay;
}if (n > 0){
v = velocityAtTime(key(n).time - thisComp.frameDuration/10);
amp = .05;
freq = 4.0;
decay = 2.0;
valueAtTime(time-tDelay) + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
}else{
value;
}
See if that gets you close.
Dan
-
Derek Deal
February 3, 2012 at 5:46 pmthis thread has been insanely useful!
I am having an issue with Dan’s solution though where the characters are reacting before the peak of their action. Especially if the amplitude is higher than say 1. Any ideas on why that would be?
-
Paul Belliveau
December 12, 2012 at 6:38 pmHi Dan,
I’m trying to duplicate this effect and when I drop in the script I get an error:
“Class ‘global’ has no property or method named ‘textIndex'”
Any suggestions? Thanks!
P -
Dan Ebberts
December 12, 2012 at 7:34 pmDid you apply the expression to the Amount property of an Expression Selector? That’s the only place it will work.
Dan
-
Paul Belliveau
December 12, 2012 at 11:17 pmThat’s the part that tripped me up. Got it now. Thanks, Dan!
-
Andres Torres
May 21, 2015 at 4:54 pmI agree..this expression is insanely useful!
I’d like to alter the expression to begin with the last letter and end
on the first letter. -
Eduardo Oliveira
February 24, 2016 at 5:23 pmi have managed to find the problem in the expression. the corrected version should be like this:
delay = .1;
tDelay = delay*textIndex;
n = 0;
if (numKeys > 0){
n = nearestKey(time-tDelay).index;
if (key(n).time > time) n--;
}
if (n == 0){
t = 0;
}else{
t = time - key(n).time;
}if (n > 0){
v = velocityAtTime(key(n).time - thisComp.frameDuration/10);
amp = .05;
freq = 1.0;
decay = 2.0;
valueAtTime(time-tDelay) + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
}else{
value;
}
Reply to this Discussion! Login or Sign Up