Activity › Forums › Adobe After Effects › alarm clock wiggle effect?
-
alarm clock wiggle effect?
Posted by David Lieberman on December 16, 2007 at 6:07 pmhello all,
i’ve got a flat image of an alarm clock (PSD)… i was wondering if there’s any kind of effect or expression i could use to make the clock look like one of those traditinal animations where it jumps from side to side and fades when the alarm goes off??
thanx for the help in advance!
dave.
David Lieberman replied 18 years, 5 months ago 2 Members · 3 Replies -
3 Replies
-
Mike Clasby
December 16, 2007 at 7:05 pmTo get a Marker to trigger expressions, drop a marker where the alarm goes off (* on the numeric pad), then add the expression(s) below.
If you just want it to rattle around, jump up and down, put this expression on Position (Copy the expression, Alt-Click the Position Stopwatch, Paste, click outside the box):
amp=30; //amplitude (pixels)
freq=8; //frequency (cycles per second)
decay=0.8; //decay time (seconds)// find previous marker
n = 0; // assume haven’t reached a marker yet
if (marker.numKeys > 0){
n = marker.nearestKey(time).index;
if (marker.key(n).time > time){
n–;
}
}if (n > 0) t = time – marker.key(n).time else t =0;
a = amp*Math.sin(freq*t*Math.PI*2)/Math.exp(decay*t);
wiggle (a,a)And to give it a rocking, rotation, motion add this to rotation:
amp=30; //amplitude (pixels)
freq=8; //frequency (cycles per second)
decay=0.8; //decay time (seconds)// find previous marker
n = 0; // assume haven’t reached a marker yet
if (marker.numKeys > 0){
n = marker.nearestKey(time).index;
if (marker.key(n).time > time){
n–;
}
}if (n > 0) t = time – marker.key(n).time else t =0;
a = amp*Math.sin(freq*t*Math.PI*2)/Math.exp(decay*t);
aThese are Dan Ebberts’ expressions (or modified form sthereof), change the amp, freq, and decay as needed, but do it the same for both expressions… although that’s probably not necessary.
-
Mike Clasby
December 16, 2007 at 7:24 pmOK, thinking about it, the above is a bit overkill. You could simply use a wiggle expression, controlled by a slider. Here’s how:
https://forums.creativecow.net/readpost/227/8953
Key-framing the slider to zero, stops the wiggle.
-
David Lieberman
December 18, 2007 at 11:51 amthank you so much,
VERY HELPFUL!!! i’ve done a bit of action scripting on flash and was wondering how similar that is to AE expressions… is there any text source or good website where i can learn more about expressions for AE?
thanks again.
d
Reply to this Discussion! Login or Sign Up