Mailing List AE-List@media-motion.tv ? Message #48123
From: Andrew Embury <aembury@gmail.com>
Subject: Divide by Zero Errors...
Date: Wed, 13 Mar 2013 20:55:57 -0400
To: After Effects Mail List <AE-List@media-motion.tv>
Hey guys/ gals!

Quick question....

Whilst animating in AE tonight I was using the following expression:

amp = .03;
freq = 4.0;
decay = 12.0;
n = 0;
if (numKeys > 0){
n = nearestKey(time).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);
value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
}else{value}


Never ever have I since have encountered so many "Divide by Zero" errors in my life with AE.

Currently working with CS6 and I am applying this expression to Scale, Position, and Rotation.

Any help would be greatly appreciated.

Thank you.

- Andrew
 
Subscribe (FEED) Subscribe (DIGEST) Subscribe (INDEX) Unsubscribe Mail to ListMaster