The Wiggle Expression: Creating Movement in After Effects
Wiggle Expression.jpg

In After Effects, use wiggle expression to create random motion by changing numbers, not keyframes.

Sometimes our animation lacks character or feels a little lifeless. What would fix the problem is a little exercise. The problem is that it is tedious to manually set the keyframes for an ongoing series of small adjustments, as you have to change the properties every few frames and with no real consistency to keep the movement organic.

To get around this tedious task, follow the tutorial below to learn how to use Wiggle Print to get rid of the tedious nature of this incremental movement.

What does the wiggle expression do?

Before we look at what the wiggle expression does, we must first ask: what is an expression? A phrase is a piece of JavaScript code that you can insert into the animated properties of your medium.

In contrast to a script that asks the application to do something, an expression informs the individual property to do something. For example, this script instructs the application (the application is After Effects) to position that layer's anchor point in the center, right, or top.

An example of a script – not an expression.

What about the wiggle expression? With a wobble we instruct the property, whether scaling, opacity or position, to wobble within the specified parameters.

This is much faster than laboriously animating the media element back and forth or continuously reducing the opacity or scaling.

After Effects: Wiggle Examples

As mentioned in the examples above, there are numerous uses for wiggle expression, although wiggle expression is typically applied to the position of an object. When you emulate the flicker of light from a candle with a solid color and adjust its opacity, wiggle expression is perfect for reproducing the sporadic nature of a flickering flame.

While the language is based on the JavaScript language, you don't need to know JavaScript to start expressing. I've got a lot of expressions in my head and I have no clue about JavaScript.

How to add a wiggle expression in After Effects

To show how to add a wobbly phrase, I created an end card that will appear at the end of a recycle commercial. In the composition we have a 3D camera that moves upwards with a visible parallax between the foreground and the mountains. We have the clouds in the background and then a 3D push-in. It looks pretty good. But this "YES!" recycling is a bit boring. I think a wiggle in position would be the perfect expression to give her more life.

After Effects: 3D CompositionBackground image about Man as Thep.

To do this, we select them YES shift and hit P. to open Position transformation Characteristics.

Beat Old (PC) or possibility (Mac) and click on the stopwatch to create the expression. The text rotates redand tells you that an expression is applied.

Art wiggle, Open the clamp, then it is first number (that's the frequency of the movement), so 2 would be two movements per second, comma, then 50 (that is the amplitude of the movement) and Close the bracket. So this expression is that 50 pixels wobble on the x and y axes twice per second.

After Effects: wiggle expression appliedBackground image about Man As Thep.

Let me sum that up. The first number indicates how often per second, the second the amount of pixel movement.

After Effects: Change WiggleChange the numbers to change the jiggle.

If you want to change the jiggle change the numbers. If we had done this with keyframes, we would have to change the keyframes every time the client wanted changes. No fun!

This can be done on several properties. We could wiggle the opacity and instead of the pixel movement it will be the transparency level – the same goes for the scaling and so on.

Here's how to make a wiggle expression with a keyframe

While the wiggle is mostly uncontrollable, as its movement repeats movement until something else is specified, we can add a personalized wiggle with keyframes.

To do this you want Open the accommodation with the wobbly expression (in our case the position), Right clickand select Convert expression to keyframes.

After Effects: Convert Expression to KeyframesAfter opening the property, select Convert expression to keyframes.

Now the printout is arranged as a series of keyframes so that you can adjust the position for specific areas and stop and start the printout at will.

After Effects: Expression ExampleNow you can adjust the position as you like.

However, stopping and starting such an expression is not an elegant method. Let's look at a more refined process that lets you adjust the speed at which the jiggle occurs.

How to stop an expression and change the speed of an expression

A common technique is to add an expression control to a null layer. This means that we are executing the parameters via the zero level and not via the level that the expression is at. While this seems complicated, it is more efficient when you are dealing with multiple expressions that you need to synchronize with a single host.

In our example we now state that the customer would like the movement area to say "Yes!" In the few seconds. is on the screen so we need to gradually increase the amplitude.

We have to do this first Add a null object. Then apply the effect Control slider to zero. This can be found in the Expressions controls Category.

After Effects: Slider Control EffectFirst add a null object and then apply the Sliders Control effect.

Choose Wobble control plane in the timeline and enter E. to reveal that Slider effect. Press the triangle for slider control to see the stopwatch.

Go to wiggle text expression and choose just that 5. With the 5 selected, click the Get a whip and pull the pick whip onto the Slide stopwatch.

After Effects: select whipNow pull the pick whip towards the slider stopwatch.

The slider now controls how much movement there is for the printout, or rather, the amplitude of the wobbling. Click the stopwatch and then create a keyframe at the beginning Move the playhead further in time and Change the amount for the slider to increase the wobble.

After Effects: sliderThe amplitude of the wobble increases with the slider.

Using a Null object in this way allows you to specify where and by how much to start the wobble.

Wiggle one dimension

What if you just want to move the x or y position? This expression is a little more complicated, but you don't have to write it. Copy and paste the following code and have it ready next time you need to wiggle an axis.

Just wiggle in x (horizontal): org = value; Temp = jiggle (5.50); (Temp (0), org (1));

Shorthand: (wiggle (5.50) (0), position (1))

Just wiggle in y (vertical): org = value; Temp = jiggle (5.50); (org (0), temp (1));

Copy and paste this text into your After Effects project and you are done!

For more information on After Effects, see the following articles

Cover cover photo over Man As Thep.

LEAVE A REPLY

Please enter your comment!
Please enter your name here