ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Continuous bounce

COW Forums : Adobe After Effects Expressions

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


Kenji Takahashi
Continuous bounce
on Jun 29, 2020 at 11:36:20 pm

Hi I need help with the "famous" bounce expression. It`s interesting problem and I`m scratched out.

Because frequence and decay are low ( I need it to be extra elastic) it only work for two keyframes.
On keyframe 3 it snaps in its value and sometimes on keyframe 4, 5, 7, 9.. depending on the nearest key index I presume
I`m trying valueAtTime but I`m limited with knowledge.

I need my keyframes not to be precise but relative to previous inherited velocity.

Thnx

freq = 0.5;
decay = 1;

n = 0;
if (numKeys > 0){
n = nearestKey(time).index;
if (key(n).time > time) n--;
}
if (n > 0){
t = time - key(n).time;
amp = velocityAtTime(key(n).time - .001);
w = freq*Math.PI*2;
value + amp*(Math.sin(t*w)/Math.exp(decay*t)/w);
}else
value


Posts IndexRead Thread 


Current Message Thread:





© 2020 CreativeCOW.net All Rights Reserved
[TOP]