Activity › Forums › Adobe After Effects Expressions › A pulsing wiggle?
-
A pulsing wiggle?
Posted by Darryl Torke on March 3, 2011 at 5:32 amI’m sorry, I wasn’t sure how to phrase it. What I’d like to do is add a wiggle to an object, but I’d like the object to only wiggle on an approximate pulse. So for example: Approximately every 3 seconds, lets say, for approximately 1 second, there is a (12,50) wiggle…Is this possible?
-Darryl
Anders Hattne replied 15 years, 2 months ago 3 Members · 4 Replies -
4 Replies
-
Anders Hattne
March 4, 2011 at 11:36 pmthis is not a solution but hey, I’d love to know how to do this too..
I’ve spent > half an hour trying to figure that out but to no avail.
This is my attempt (well modified to work in a text layer that way I can see what numbers I get, once that works, I figured I’d paste it into a solid..)
It’s late and it’s been a long week…
var start=0;
wigg=0;
pos=transform.position;
duration=thisComp.frameDuration*effect("Slider Control")("Slider");
if (time%6==0) {start=duration;if (start>0)
{wigg=ease(time,time,time+start,100,0);
start=start-thisComp.frameDuration;}}
start+"+"+wigg+"+"+duration
The problem is it won’t go into the second if part. I’m really currious to know how you solve that.. Start goes straight to zero, no slow decline as I had hoped, and start–; doesn’t work either..
If someone could enlighten me.. I’d be.. happier!
Thanks!
(I’ve figured out that a problem is that start is given the value 0 at the beginning, but if I don’t define it I get an error message too..) -
Dan Ebberts
March 5, 2011 at 12:09 amSomething like this, I think:
minDelay = 2.5;
maxDelay = 3.5;
minDur = .75;
maxDur = 1.25;wigFreq = 12;
wigAmp = 50;t1 = inPoint;
seedRandom(index,true);
delay = 0;
while (t1 <= time){
delay = random(minDelay,maxDelay);
t1 += delay;
}
t1 -= delay;
seedRandom(t1,true);
dur = random(minDur,maxDur);
t2 = t1 + durif (time < (t1+t2)/2)
easeIn(time,t1,t2,value,wiggle(wigFreq,wigAmp))
else
easeOut(time,t1,t2,wiggle(wigFreq,wigAmp),value);
Dan
-
Dan Ebberts
March 5, 2011 at 4:38 amThis is better for a couple of reasons. For one thing, it has a delay at the start, so the random wiggle doesn’t always start at the layer’s In Point.
minDelay = 1.5;
maxDelay = 2.5;
minDur = .75;
maxDur = 1.25;
fadeTime = .1;wigFreq = 12;
wigAmp = 50;seedRandom(index,true);
t0 = inPoint;
t1 = t0 + random(maxDelay);
t2 = t1 + random(minDur,maxDur);while(t2 < time){
t0 = t2;
t1 = t0 + random(minDelay,maxDelay);
t2 = t1 + random(minDur,maxDur);
}if (time < (t1+t2)/2)
linear(time,t1,t1+fadeTime,value,wiggle(wigFreq,wigAmp))
else
linear(time,t2-fadeTime,t2,wiggle(wigFreq,wigAmp),value);
Dan
-
Anders Hattne
March 5, 2011 at 9:39 amWow, that works..
It will take a while until I can get my head round that expression. I guess I have to ditch my approach of assigning a value to a variable and while that variable decreases make the layer wiggle.
it’s all part of the learning curve..
Reply to this Discussion! Login or Sign Up