How to Create Basic Camera Shake in After Effects

After Effects 10/10/2019 5 min read

Adding camera shake to your footage is a technique that you will likely find yourself needing to implement as you continue to take on new video projects, clients, and styles. Whether it’s giving a bit of movement to boring tripod footage or selling the idea that your fake VFX elements are in the same world as everything else in the shot, being able to add camera shake can help take your video from good to great! The best part is that it’s relatively easy to do. While there are multiple different methods, we’re going to be creating our camera shake using expressions in After Effects. So let’s dive into the Creative Cloud together and take a look at how to get this effect!

Learning The Wiggle Expression

Inside After Effects we’re going to take a look at our footage, and the example we are using was a shot on a tripod with no movement whatsoever. So how do we add camera shake? We’re going to use what’s called a wiggle expression.   

An expression is basically a way that you can take an existing parameter, like position, scale, rotation, opacity, etc., and manipulate it in a very complex way very quickly. In order to use any sort of an expression, you’ll need to open up that parameter and have the stopwatch visible for that parameter. Next, hold alt and click the stopwatch for that parameter. What you’ll see appear is a box for text along the timeline for that specific parameter. Here is where you can input an expression with text and numbers. The expression we’re going to be inputting is called a wiggle expression, that’s because we’re going to tell the position parameter to wiggle.  

We actually literally do this by typing into this space here wiggle.  But that’s not it.  We have to tell After Effects how much we want the position to wiggle and how frequently. To do this we then separate what’s coming next from the wiggle text with an open bracket. Inside the open bracket we’re going to input two numbers separated by a comma with no space. What this does is tell After Effects how frequently we want the wiggle to happen, and then how much physical space we want our position to wiggle, in pixels.  

wiggle(A,B)

In the above expression, A represents the frequency of the movement while B represents the amount of movements in pixels.  The final expression replaced with numbers in our example looks as follows:

wiggle(2,40)

So for us we’re going to use the example where we ask After Effects to wiggle our video 2 times a second, and each of those times we want it to move 40 pixels.  Finish it off with a closed bracket and then click anywhere on the screen to exit out.  

What you should be left with is a movement to your video that results in what you asked for, 2 times every second the position moves a total of 40 pixels in any direction. By simply changing only those two numbers, you can really dial in a camera shake that looks close to what you envision. And what’s really nice is that this usually doesn’t take a lot of computing power, so you should be able to see results pretty quickly.

Fixing Scaling Issues

There’s a small problem though. The edges of our video are visible and you can see that it’s just a digital wobble because of it. The solution to this is simply to scale up your footage to hide the borders from entering the frame of our shot. Try to only scale up as little as necessary, because the more you scale up the more likely it is that your video quality will suffer.

Adding Wiggle Expressions to Multiple Parameters 

This is great, but it we want to take it to that next level of professional quality, we would realize that right now we’re only applying camera shake in lateral motion.  In real life, there’s going to be a little bit of wiggle in both the rotation as well as the relative size of the image from moving either closer towards it or farther away.

Let’s start with rotation.  To get to your rotation parameter, either click the dropdown and again under transform.  Or simply select your clip and hit the R key.  Now with rotation brought up, get to your wiggle expression again by holding alt and clicking the stopwatch.  Now we’re going to do the exact same thing as before except we’re going to be very very subtle with this one.  The reason is because the first parameter still stands for the number of times per second the movement is implemented, but the new second parameter controls the degrees of rotation.  This is a big difference because 90 pixels for example is a large but isn’t a crazy huge amount of movement.  But 90 degrees will literally turn your image to look like this.  Chances are you don’t want that much rotation.  So I’m personally going to go with a second number of 0.5 degrees.  It will end up just showing up as .5 and that’s okay.  Close the bracket, and there you go! You’ve added another layer of depth to your shot!

Adding Special Wiggle To Scaling

This is good, but we also want to add a tiny little bit of scaling wiggle to give the impression that someone has a full 3D range of movement.  Because we unfortunately can’t digitally move around in the 3D space of our subject, we’re going to settle for scaling.  This is technically a digital zoom and not getting closer or further away from our subject, but if we keep this to a very small degree of movement, it shouldn’t be too noticeable.  

Bring up your scaling parameter like we’ve done for the others except this time with the shortcut s.  Now if we just try to type in a wiggle expression like before, we’re met with a strange problem.  Our horizontal and vertical scaling aren’t uniform and we get a weird stretching of our image.

It looks gross, so how do we make our scaling completely uniform? We do this by telling After Effects to keep them the same through our wiggle expression formula. We’re simply going to start by giving it a value that will be used on a separate line.  We’re going to take the wiggle expression that we want and leave it as it is, but before it we’re going to add w (space) = (space). What this does is tell After Effects that the constant w is equal to this expression. Then we’re going to add a semicolon and add one additional line. We’re going to use square brackets for this new expression [w[0],w[0]].

Basically what this does is tell After Effects that this is the overall expression we want to apply and that we want to apply it equally to the horizontal and vertical scaling parameters. If you simply want to copy and paste, the expression is typed out here:  

w = wiggle(1,3);
[w[0],w[0]]

And what we’re left with is a manufactured camera wiggle that goes a little above and beyond the common method.  Whenever you’re trying to re-create something realistically in post production, it’s important to think through what that effect would really look like in real life.  This sort of thought process will help to make your work stand out above the rest of the competition if you apply it to everything you do.

But that’s it for me.  Guys I hope you found this tutorial helpful.  If you still aren’t satisfied with this method of adding camera shake, well then check out this other video we’ll be releasing a few days after this one on Advanced Camera Shake In After Effects.


Also, if you just wanted an easier solution to use with Adobe Premiere Pro, we actually have a free camera shake preset pack that you can download and use and the link for that is in the description too:

https://motionarray.com/premiere-pro-templates/handheld-camera-presets-25054

If you still aren’t satisfied with this method of adding camera shake, check out our other video on adding REAL camera shake in After Effects here.

We hope you found this tutorial helpful.  If you did, we’ve got lots of other tutorials for Premiere Pro, After Effects, and filmmaking in general! If you have any questions, let us know in the comment section below.