FORUMS: list search recent posts

Wiggle Y loop

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Warren Aspeling
Wiggle Y loop
on Apr 19, 2017 at 3:47:51 pm

I'm trying to get an vertical bar to seamlessly loop on the y axis, I have this expression but it's just not working properly.

Any help would be appreciated! ☺


freq = 2;
amp = 150;
w = wiggle (freq ,amp);

startFrame = framesToTime(20);
stopFrame = framesToTime(200);
easeOver = framesToTime(20);

if((time >= startFrame)&&(time < stopFrame)){


if((time >= startFrame)&&(time <= startFrame+easeOver))
linear(time, startFrame, startFrame + easeOver, [value[0], w[1]]);
else

if(time >= stopFrame - easeOver)
linear(time, stopFrame - easeOver, stopFrame, [value[0], w[1]]);

else [value[0], w[1]];
}

else value


Return to posts index

Kevin Camp
Re: Wiggle Y loop
on Apr 19, 2017 at 4:51:52 pm

here's a link that describes how to create looping wiggle:
http://motionscript.com/design-guide/looping-wiggle.html
modifying dan's code to fit what you are trying to do, i came up with this which creates looping vertical wiggle:
freq = 2;
amp = 150;
loopTime = thisComp.duration;
t = time % loopTime;
wiggle1 = wiggle( freq, amp, 1, 0.5, t );
wiggle2 = wiggle( freq, amp, 1, 0.5, t - loopTime );
w = linear( t, 0, loopTime, wiggle1, wiggle2 );
[ value[0], w[1] ]

if you need it to start and stop, like in your current expression (which wouldn't exactly be looping anymore), it would need further modification.

Kevin Camp
Art Director
KCPQ, KZJO & KRCW


Return to posts index

Warren Aspeling
Re: Wiggle Y loop
on Apr 19, 2017 at 5:00:55 pm

Thanks Kevin.

Yeah sorry maybe my wording was misleading.

I need the start and end positions as it forms a logo...


Return to posts index


Kevin Camp
Re: Wiggle Y loop
on Apr 19, 2017 at 5:28:27 pm

got it, try this:
freq = 2;
amp = 150;

startFrame = framesToTime( 20 );
stopFrame = framesToTime( 200 );
easeOver = framesToTime( 20 );

w = wiggle( freq, amp );

if( time >= startFrame && time < stopFrame ) {
if( time >= startFrame && time <= startFrame + easeOver ) {
linear( time, startFrame, startFrame + easeOver, value, [ value[0], w[1] ] );
} else {
if( time >= stopFrame - easeOver ) {
linear( time, stopFrame - easeOver, stopFrame, [ value[0], w[1] ], value );
} else {
[value[0], w[1]];
}
}
} else {
value;
}

you were very close, you just needed to interpolate from the wiggle position back to the original value in line 15, also start with the original value in line 12.

Kevin Camp
Art Director
KCPQ, KZJO & KRCW


Return to posts index

Warren Aspeling
Re: Wiggle Y loop
on Apr 20, 2017 at 4:45:14 pm

Kevin you are a legend! That worked perfectly, thank you so much!


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]