Activity › Forums › Adobe After Effects › Rubber band effect
-
Rubber band effect
Posted by Dan Huber on February 13, 2007 at 10:35 pmI need to create an animation in which an Illustrator file is gradually stretched until it snaps back into place like a rubber band. Thanks,
Heather Crank replied 18 years, 3 months ago 3 Members · 7 Replies -
7 Replies
-
Mike Clasby
February 13, 2007 at 10:46 pmHere’s an earlier post for a Rubber Band Transition, sound like you just want one layer stretched:
https://forums.creativecow.net/cgi-bin/new_read_post.cgi?forumid=2&postid=718459&archive=T
The 4th and 7th replies are best (Dan’s), the 7th is for multiple snaps across the screen. There’s two expressions, one for Position, one for Scale.
Might help.
-
Dan Huber
February 14, 2007 at 2:40 pmThanks for the help.
I don’t really need a transistion since the stretched file remains visible after the snap back. It’s actually an illustration of a child who is resilient so that she snaps back in the face of adversity. I played with various scale settings (using negative settings to emphasize the recoil) but the snapping back into to position after stretching doesn’t look organic.
-
Mike Clasby
February 14, 2007 at 5:10 pmAhhhh… OK, try this.
Marker Triggers Rubberband Oscillation
amp=50; //amplitude (pixels)
freq=10; //frequency (cycles per second)
decay=1.5; //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);
aOr this…
Marker Triggers Squish and Squash
n = 0;
if (marker.numKeys > 0){
n = marker.nearestKey(time).index;
if (marker.key(n).time > time){
n–;
}
}if (n == 0){
value;
}else{
max_dev=20; // max deviation in pixels
spd=35; //speed of oscillation
decay=10; //how fast it slows down
t = time – marker.key(n).time;
s = max_dev*Math.sin(spd*(t))/Math.exp(decay*t);
value + [s,s];
}These expressions are on Scale and will go off where a Marker is set, kinda handy, set a marker when your character survivs adversity. Adjust numbers as needed.
-
Dan Huber
February 14, 2007 at 6:59 pmThanks again for the help. Expressions are really powerful.
The first expression gives me a dimension error message.
The second expression provides a very nice, natural feeling bounce back and is a significant improvement over my efforts but how can I gradually scale the illustration over time (indicating a build up of stress) and then have it bounce into its normal shape? It would also be useful if the effect only stretched horizontally as that would allow me to use it with text (RESILIENCE) later in the program.
-
Mike Clasby
February 14, 2007 at 7:40 pm1) As far as scaling up slowly, then snapping back to it’s original size, try this; set keyframes for the scale up, at the max size keyframe (2nd keyframe) set your marker to trigger the rubberband snap, then move down 3 frames (“Page Down” 3 times) and paste in that first (original size) keyframe. The expression adjusts to the values, snapping along with the keyframes. You might want to change that 3 frames to more or less.
2) To get your scale to just Rubberband Horizontally, change the next to last line to this:
value + [s,[1]];
-
Heather Crank
January 25, 2008 at 9:21 amHi,
I’m a newbie with expressions (please forgive my ignorance), and am looking forward to being able to use them more! The above post describes what I’m looking for (have a psd that is with a phone line that is cut with scissors, and then one section on the right is supposed to spring back and then forward, like a rubber-band). I just tried pasting in the expression into scale, and then into position. For some strange reason, nothing happened. Does anyone know what I’m doing incorrectly?
Thank you!
H
Reply to this Discussion! Login or Sign Up