Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions creating a LOOPED wiggle with RANGE SELECTION

  • creating a LOOPED wiggle with RANGE SELECTION

    Posted by Tomer Katzir on December 5, 2020 at 10:53 am

    Let’s say I want to create a looped wiggle on the rotation property, but I only want it to move between two values (let’s say, -35, 40). how can I do something like this?

    I would love to have a global wiggle expression that will give me maximum control (min value, max value, loop time).

    Thanks a lot for the help 🙂

    Dan Ebberts replied 5 years, 8 months ago 2 Members · 1 Reply
  • 1 Reply
  • Dan Ebberts

    December 5, 2020 at 5:46 pm

    The best I could come up with is something like this. It will be approximate because you never know exactly what you’ll get min and max wise with wiggle. You’ll need to tweak ampAdjust (an amplitude multiplier) and offsetAdjust (to move the whole waveform up or down) after you see what you get if you need it to run exactly from minVal to maxVal.

    freq = 10;

    maxVal = 40;

    minVal = -35;

    loopTime = 3;

    ampAdjust = 1.25;

    offsetAdjust = -2;

    t = time % loopTime;

    amp = (maxVal - minVal)/2

    wiggle1 = wiggle(freq, amp, 1, 0.5, t) - valueAtTime(t);

    wiggle2 = wiggle(freq, amp, 1, 0.5, t - loopTime) - valueAtTime(t);

    w = linear(t, 0, loopTime, wiggle1, wiggle2)*ampAdjust;

    offset = (maxVal + minVal)/2;

    value + w + offset + offsetAdjust

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy