Page 1 of 1
Oscillating Popup
Posted: September 14th, 2006, 8:31 am
by Travis
I am a beginner and I would to create some popup text with an uniformly scaled oscillating
popup effect that stabilizes out quickly and smoothly, somewhat like a popping bubble.
I'm sure you have seen this effect applied to text or graphics before. If not, I can find
a reference somewhere.
How would I do this?
Try this
Posted: September 18th, 2006, 5:02 am
by gimmel
Put this code into the scale property:
Code: Select all
comein=Math.min(time*4,1)
decay=Math.exp(-time*4);
swing=Math.cos(time*24)*60;
sc=(100+swing*decay)*comein;
[sc,sc]
I hope that is what you were looking for.
Sorry, forgot something!
Posted: September 18th, 2006, 5:10 am
by gimmel
Sorry, forgot something!
The last script only works if the layer starts at the compositions beginning.
With this script you can move the layer in time. The animation will start at layer start.
Code: Select all
layertime=time-startTime;
comein=Math.min(layertime*4,1)
decay=Math.exp(-layertime*4);
swing=Math.cos(layertime*24)*60;
sc=(100+swing*decay)*comein;
[sc,sc]
Posted: September 20th, 2006, 12:29 pm
by Travis
Thanks, that's exactly what I was looking for!
I also placed the same expression in the Opacity property to make it appear a little bit smoother.
btw, I just recently discovered this page, and it has a jiggle expression,
which is somewhat what I was looking for, but not exactly:
http://www.motionscript.com/mastering-e ... ics-3.html
Code: Select all
freq = 3;
amplitude = 35;
decay = 1.0;
s = amplitude*Math.sin(freq*time*2*Math.PI)/Math.exp(decay*time);
scale + [s,s]
But your expression uses terms differently. I guess it doesn't matter if you're
using a sin or cos wave. They divide by exp(), while you multiply it.