Camera Smoothing in After Effects

1 Introduction

Instead of stabilizing a shaky camera movement completely it is in many cases better to just smooth out high-frequency jitter. Apart from artistic decisions this has several reasons:

This article covers After Effects 6.5 but is of course also applicable to other packages. In fact, this article is based on Steve Wright's book "Digital Compositing For Film and Video" (Focal Press, 2002). The only requirement is some kind of way to smooth a tracker's path. If there's no proper scripting functionality maybe there's a way to "bake" a smoothed copy of the tracker's path. You'd have to redo part of the process when you redo your tracking.

2 Tracking and Smoothing

The first step is very similar to using the built-in stabilize functionality of the tracker. Drag your clip into a new composition and open the tracker panel. Due to the way the script works it is recommended that you start tracking at the first frame of your composition. Trim your layer accordingly if you want to skip into the clip.

Select a suitable pattern to track and off you go. If your camera is panning you will have to switch to another pattern during the process as your original marker leaves the frame. You can do this by holding down the ALT key while you reposition your tracker. Take great care to select a new pattern which is at the same distance from the camera as your old one.

Once the tracker has finished, do not apply the data. Instead, close the tracker's panel. Reveal the tracker's key frames by pressing "U" as well as the position property by pressing "Shift-P". Add the following script to the layer's position property. The first line will vary depending on your composition and which language version of After Effects you're using. So either adjust the "XXX" parts or drag the pickwhip tool to the tracker's attach point property:

TRK1 = thisComp.layer("XXX").motionTracker("XXX")("XXX").attachPoint; cam_smooth = TRK1.smooth(width = 1, samples = 19, t = time); diff = sub(TRK1, cam_smooth); diff = mul(diff, -1); diff = add(diff, TRK1.valueAtTime(0));

That's all. Here are some ways to fine-tune the smoothed movement:

comparison of jittery and smoothed camera movecomparison of jittery and smoothed camera move

3 About the Author

Stefan Ihringer is a freelance motion graphics and VFX artist currently located in Stuttgart, Germany. His portfolio includes trade show work for Daimler-Chrysler and Lexus as well as TV commercials and corporate movies. Take a peek at