Activity › Forums › Adobe After Effects Expressions › wiggler
-
wiggler
Posted by Clyde Villegas on December 16, 2008 at 12:09 pmwiggle(.25,20)
I’m just starting out on expressions. I used wiggle(.25,20) to put random movements to my layer. How do I make it stop after a certain number of seconds or frames?
ut in omnibus glorificetur Deus
Clyde Villegas replied 17 years, 6 months ago 3 Members · 10 Replies -
10 Replies
-
Kevin Camp
December 16, 2008 at 2:05 pmi’d probably try adding a slider control (effects>expression controls) and link that slider value to the second wiggle value (the amount) in your expression. the slider value can be key framed, so you can set the value to zero at a certain point in the timeline.
so after adding the slider control, your expression might look something like this:
amount=effect(“Slider Control”)(“Slider”);
wiggle(.5,amount)then you can keyframe the slider value to go from 20 to 0 when you need it. you can also take advantage of keyframe interpolation between those values, ie. you could use ease keyframes or hold keyframes, etc, to create a different effect as the layer stops wiggling (stops slowly, stops suddenly…).
Kevin Camp
Senior Designer
KCPQ, KMYQ & KRCW -
Dan Ebberts
December 16, 2008 at 2:09 pmThis example stops after 3 seconds:
stopTime = 3;
t = Math.min(time,stopTime);
wiggle(.25,20,1,.5,t)Dan
-
Clyde Villegas
December 17, 2008 at 3:26 amwiggle(.25,20,1,.5,t)
Thanks! But what do 1 and .5 in the expression mean?
ut in omnibus glorificetur Deus
-
Dan Ebberts
December 17, 2008 at 5:07 amThose parameters are the number of octaves of noise to use and the weighting of each successive octave. I hardly ever use those parameters but you have to specify them to get at the fifth parameter, time. So in this example, I just specified the default values (1 and .5).
Dan
-
Clyde Villegas
December 17, 2008 at 6:51 amThanks Kevin. I had so much control with your expression.
ut in omnibus glorificetur Deus
-
Clyde Villegas
December 17, 2008 at 7:25 amBoth the position and rotation properties were animated with keyframes. I typed the expression in the position property and the animation (of the position) froze. The rotation property, however, was working and stopped after 3 seconds. What will I do so that the position will continue to animate and only stop after 3 seconds?
ut in omnibus glorificetur Deus
-
Dan Ebberts
December 17, 2008 at 2:17 pmIt works for me (and stops after 3 seconds). The amplitude is only 20 pixels, so is it possible you’re just not noticing the wiggle on top of your keyframed movement?
Dan
-
Clyde Villegas
January 26, 2009 at 10:06 amamount=effect("Slider Control")("Slider"); wiggle(.5,amount)I have another question. What if I want to use your expression but would like to add that the wiggler only affects the x axis, or both x and y only?
ut in omnibus glorificetur Deus
-
Dan Ebberts
January 26, 2009 at 2:08 pmX only (assuming 3D):
amount=effect(“Slider Control”)(“Slider”);
w = wiggle(.5,amount);
[w[0],value[1],value[2]]X and Y only:
amount=effect(“Slider Control”)(“Slider”);
w = wiggle(.5,amount);
[w[0],w[1],value[2]]Dan
-
Clyde Villegas
January 27, 2009 at 2:05 amX only (assuming 3D): amount=effect("Slider Control")("Slider"); w = wiggle(.5,amount); [w[0],value[1],value[2]] X and Y only: amount=effect("Slider Control")("Slider"); w = wiggle(.5,amount); [w[0],w[1],value[2]]Thanks Dan. I’ll try those.
Clyde
ut in omnibus glorificetur Deus
Reply to this Discussion! Login or Sign Up