Anatomy and Art

a blog by Sara Egner

The Wiggle Expression

without comments

Recently at work, I’ve had cause to use the wiggle expression in After Effects.  If you’ve never done this, it’s pretty simple to set up.  First, open up the transform controls in your timeline for the object to which you intend to apply the effect.  Then alt-click the position stopwatch.  You’ll be prompted to add an expression in the timeline under the layer, and there you’ll write wiggle(1,20).  Actually, the numbers will be whatever you want them to be.  The first specifies how many wiggles per second you want to apply.  The second specifies the amplitude of the wiggle in pixels.

In my case, this effect was really great for bobbing around a bunch of molecules in a scene.  But I ran into trouble when I wanted to ease up the effect for more control.  To use my example again, I needed molecules to bob around in liquid, and then pass through a semi-permeable membrane, which required more control over them, and then go back to bobbing about.

screen shot of water molecules moving across a semi-permeable membrane

So, to do this, you need a slider control layer.  So you’ll create a new adjustment layer.  Then under the effects pull-down, up top, go to expression controls, and then slider control.  Then you’ll highlight the number on your expression that you’d like slider control over.  In my case it was the amplitude (see the 20 in the example).  With that number highlighted, you’ll grab the pickwick (looks like a swirl) and literally pull it up toward the slider stopwatch.  You’ll see your code change it it’s worked.

Your wiggle expression will then be defaulted to zero until you dial the slider control up.  Now you can keyframe that feature to begin slowly, or to reduce mid animation for greater position control when you need it.

Some of this is easier to understand when you see it, and doesn’t really lend itself well to explanatory screen shots.  This YouTube video by Ian Killick does a great job of showing the process…

Written by Sara

September 30th, 2017 at 10:19 am

Posted in Uncategorized

Tagged with ,