What It Does
The "Loop a Wiggle" expression in After Effects is a method to make the popular Wiggle expression loop seamlessly. Here's a breakdown based on the sources provided:
The Wiggle Expression is a widely-used tool in After Effects to introduce randomness and variation to properties. However, by default, it doesn't loop seamlessly.
This expression aims to create a looping wiggle by smartly transitioning between two different wiggle expressions.
When applied to a property, it produces a random wiggle value that loops every specified number of seconds.
Parameters include:
- frequency: Defines the number of wiggles per second.
- amplitude: Specifies the range (in pixels, percent, etc.) by which the wiggle should vary.
- secondsToLoop: Determines the duration of the loop.
How To Use It
- Access the Expression Controls: Start by selecting the layer you want to apply the wiggle to. In the Timeline panel, hit the small triangle next to the layer name to expand it. Here, you'll see various properties like Position, Scale, and Rotation. Decide which property you want the wiggle on. For our example, let's choose Position. Hold down the 'Alt' key (or 'Option' key on Mac) and click on the stopwatch icon next to Position. This opens up the expression controls.
- Input the Basic Wiggle: Type in wiggle(5,30). This means the position will change randomly 5 times every second, moving up to 30 pixels in any direction. Play it back. Notice how it doesn’t loop? Let's fix that.
- Introduce the Loop: To make the wiggle loop, we need to blend two wiggles together. Think of it as mixing two colors to get a third, unique shade. In the expression controls, you'll use a function called linear(). This function will help us blend two separate wiggle expressions.
- Quantitative Example: Let's say you want the wiggle to loop every 3 seconds. You'd use the linear() function to blend the wiggle from the first second with the wiggle from the third second. This ensures that at the end of the third second, the animation is back where it started, ready to loop seamlessly.
- Finding the Right Tools: To access the linear() function, you don’t need to search through menus. Just type it right into the expression controls where you typed the wiggle. After Effects is smart and will recognize it.