-
Squash and Stretch – Random Seed?
Hello expression experts!
I’m using this wonderful set of expressions for a “Squash and Stretch” animation but I need to know how to modify them to create a random offset. When I duplicate the layers they are applied to, the animation remains the same for each. Many thanks in advance!
-Steve//Bouncing ball with squash and stretch
//Apply to Position
freq = 1.0; //oscillations per second
amplitude = 90;
decay = .5;
posCos = Math.abs(Math.cos(freq*time*2*Math.PI));
y = amplitude*posCos/Math.exp(decay*time);
position - [0,y]//and here's the expression for the scale parameter.
freq = 1.0;
squashFreq = 4.0;
decay = 5.0;
masterDecay = 0.4;
amplitude = 25;
delay = 1/(freq*4);
if (time > delay){
bounce = Math.sin(squashFreq*time*2*Math.PI);
bounceDecay = Math.exp(decay*((time - delay)%(freq/2)));
overallDecay = Math.exp(masterDecay*(time - delay));
x = scale[0] + amplitude*bounce/bounceDecay/overallDecay;
y = scale[0]*scale[1]/x;
[x,y]
}else{
scale
}Steven Kutny
Designer/Compositor
http://www.stevenkutny.com