Seamless Loop Wiggle

A wiggle that loops perfectly — essential for MOGRTs, GIFs, and looping backgrounds.

Expression Code
// Seamless Loop Wiggle
// Apply to Position (works on any property)
freq = 2; // Wiggles per second
amp = 30; // Wiggle amount
loopTime = 4; // Loop length in seconds — match your comp or MOGRT duration
seedRandom(index, true);
t = time % loopTime;
w1 = wiggle(freq, amp, 1, 0.5, t);
w2 = wiggle(freq, amp, 1, 0.5, t - loopTime);
linear(t, 0, loopTime, w1, w2);
Apply to Position, Rotation, Scale, or Opacity. Set loopTime to your comp's duration and the wiggle will land back exactly where it started at the loop point — no visible jump. It works by cross-fading between the wiggle sampled now and the same wiggle sampled one loop earlier, so both ends of the loop agree.
Back to Looping & Cycles