keyframing a wiggle expression tutorial by Graham Quince

How to Keyframe a Wiggle in Adobe After Effects

Use Expressions Controls effects to set keyframes for your wiggle expression.

Here’s a quick tutorial video covering one of the most frequently asked questions about expressions in @AdobeAE. Using the Expressions Controls effects you can link values to keyframeable sliders. This allows you to increase or decrease wiggle values with keyframes.

The tutorial also includes how to include the Transform effect so that you can save a Fading (reducing) Wiggle as a preset.

Some contents or functionalities here are not available due to your cookie preferences!

This happens because the functionality/content marked as “Google Youtube” uses cookies that you choosed to keep disabled. In order to view this content or use this functionality, please enable cookies: click here to open your cookie preferences.

One frequently asked question that I see on the forums is “How do I keyframe a wiggle expression?” 

There’s a straightforward method for doing this, but it’s not obvious.

With a comp featuring a square solid in the middle, we want to wiggle it, but only as the blue circle zooms past.

So before I dig into expressions, make sure the red square is selected, and then go into Effect > Expression Controls > Slider Control. Hit enter and rename the effect “Amplitude”.

Now, re-select red square and tap “P” on the keyboard to expose the position keyframes. Now click on the stopwatch to open the expressions area and type in the regular wiggle expression.

wiggle(5,100);

That means “reposition the solid 5 times per second within 100 pixels of the original position.”

A quick playback sees the solid wobbling constantly. Not what we want!

So now expand the layer properties so we can see both the amplitude effects, slider value, and position property. Click into the expression, highlight the 100 value, and using the pickwhip select the slider.

A quick playback, and the solid isn’t moving. That’s because our amplitude slider now sets the value for the wiggle amplitude and it’s set to 0. And look! The slider has a stopwatch, meaning we can keyframe it. So using the current time indicator, scrub along until the blue circle is just before the red square, and set a keyframe on the slider.

Use the Page Down key to move a couple of frames forward, and now use the slider to set a maximum wiggle amplitude.


Recreating Star Trek Phasers in After Effects
In this tutorial, I show how to build a reusable phaser effect, …
How to fix common After Effects crashes
Don't panic, crashes happen and knowing how to resolve them so they …

Quick aside: If you right-click on the slider value and choose Edit Value, you can change the minimum and maximum values of the slider.

Back to the comp, drag the current time indicator to the point we want the wobble to stop, and set a new keyframe back to 0. Right-click on the keyframe on the timeline, and in Keyframe Assistant choose Easy Ease In.

A quick playback, and the solid is not moving frequently enough. I can edit the expression to change the 5 to 15, or I could add a new expression control to keyframe the frequency too. Same procedure: Effect > Expression Controls > Angle Control.

Hit enter and rename this frequency, and then expand it on the timeline. Click to edit the expression and replace the 5 with the frequency value.

Quick aside: if you can’t see the pickwhip, right click in the area and choose Columns > Parent & Link.

Playing back, the frequency set to 0 makes one weird bounce in the red square solid, and messing with the two slider values gets you a pretty good fading wiggle.

Now, if you’re not keen on having to use expressions each time you want to do something, you can always make a preset. Go to Effect > Distort > Transform. Edit your position expression so that you can copy it – just CTRL + A to select all and CTRL + C to copy. Then Alt-click on the Transform effects position and CTRL + V to paste in the expression.

Then, either click on the Position property’s Equals sign to disable the expression there, or edit the expression to delete it.

The transform effect does the same job, but this time, it’s an effect, meaning we can save it. Select the Effects Controls panel and CTRL + A to highlight all the effects, then go to Animation > Save Animation Preset to save your wiggle fade for next time.

Next, learn How to Get Uniform Scale Wiggle in After Effects.


Enjoying this tutorial? Sign up for the Creative COW Newsletter!

Sign up for the Creative COW newsletter and get weekly updates on industry news, forum highlights, jobs, inspirational tutorials, tips, burning questions, and more! Receive bulletins from the largest, longest-running community dedicated to supporting professionals working in film, video, and audio.

Enter your email address, and your first and last name below!

Sign up:

* indicates required

Responses

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