Learn the Wiggle Expression early in your After Effects career; I presented my own tutorial about it on YouTube! However, making your Wiggle loop may prove more challenging than first anticipated.
To do this, we must create an expression. Specifically, two wiggle expressions will be created and switched between using linear expressions.
As our first step, we must set variables. These will include frequency, amplitude and duration variables – these represent frequency of wiggles per second as well as amount of pixels moved, or “wiggled”, and duration refers to loop time in seconds.
We can have something similar:
Frequency =4; Amp=50.
Next we create two Wiggle variables and assign them a Wiggle expression. Wiggle typically features two values in its expression – frequency and amplitude – in parenthesis; however, up to five variables may appear here including frequencies/amplitudes/octaves/multiples/time. Octaves corresponds to noise value or complexity of wiggle path complexity. Multiples provide strength while time acts as an offset value.
As part of the Wiggle Expressions and for our final Linear Expression, we require a variable to represent time. Here is an option:
Time, by using its remainder operator (%). A remainder operator returns any remaining remainder after one operand has been divided by another operand.
At this point, we write out both Wiggle variables. For instance:
Wiggle1 = Wiggle(freq, amp, 2, 1, t).
Wiggle2 = Frequency Amplitude 2 1 T-Duration.
Finally, we write a linear expression to tie everything together. Our linear expression can be written as:
Linear (var, varmin, varmax and values1,2 are not equal.
Here, in our case, we’ll have:
linear(t, 0, dur, wiggle1, and wiggle2)