Back To Listings RSS Print

Inside the After Effects camera

A technical overview for scripters and expressioneers

By ChrisZwar | May 18, 2014

One of the most powerful features of After Effects is the ability to work with 3D layers and a virtual camera.  While it is simple to add a camera to a composition and animate it, greater creative control over the end result can be achieved with a basic technical understanding of how cameras work, and what the various settings mean.

The aim of this article is to try and bridge some of the gaps between the creative and technical aspects of the After Effects camera.  It is probably most useful for those writing scripts and expressions that use the camera settings.  If you want to skip to the end, then there are a few copy & paste expressions on the last page.

When you’re using a virtual camera - in any graphics application, not just After Effects - it can be confusing to understand the slightly different terminologies in use.  Unfortunately there are several cases where different applications use different names for the same thing, so to begin with we’ll run through the basic principles of cameras and then we’ll discuss the way they apply to After Effects.

 

Background – Real Cameras 101

At the most basic level, a camera is a lens that focuses an image onto a surface.  The simplest type of camera is a “camera obscura”, which is basically a box with a hole in it.  There are a few famous examples of camera obscuras open to the public, and recently there’s been a lot of attention given to the theory that the Dutch artist Vermeer used one to compose his paintings.

Camera obscuras don’t offer any control over the image they produce, and so one of the biggest advances with the invention of the modern camera was the introduction of a lens to replace the small hole.

The lens is the most fundamental control we have over an image produced by a camera.  The lens governs exactly how much of an overall scene is ‘captured’ or recorded.  Choosing a lens, and describing the attributes of a given lens, is one of the most important parts of working with cameras.

Most of this article is about measuring and controlling the camera lens, but while it’s easy to list the maths involved, it’s far more difficult to explain the creative importance that a lens has when using a camera.  There are many resources available the explain the way that different lenses perform, and professional photographers spend a lot of time discussing and comparing real-world lenses that can cost tens of thousands of dollars.

Wikipedia is as good a place as any for an overview of the effect that different lenses can have on an image, and there are many other similar resources that focus on the creative side.

So before we delve into it, trust me – the lens is a big deal.

 

Understanding – and misunderstanding - perspective foreshortening

There are many creative reasons for choosing a particular lens, but there's one thing that’s often taught about lenses which is slightly wrong.

In practically all photography textbooks you will find some sort of statement about how telephoto lenses compress the background, or that wide angle lenses increase the apparent distance between objects, or something to that effect.  It doesn’t matter how the statement is worded, it’s generally taught that the lens you choose will determine how close objects appear together.

This is not exactly right.  It’s not completely wrong, either, but the lens is only half the equation.  Understanding this misunderstanding is important when animating a camera.

If you frame the same shot with a wide angle and a telephoto lens, then they will indeed look different.  As the textbooks say, the telephoto version will look “flatter”, and objects will appear closer together than they do in the wide angle version.  This difference is one of the key creative considerations when choosing or animating a lens.

Here’s an example from After Effects, where 7 rectangles have been arranged in 3d space, each of them 200 pixels apart.  The same composition has been rendered out with 3 different camera lens settings – 24mm, 50mm and 135mm.

Different lenses and the

You can clearly see the difference.  And so it would appear that the textbooks are correct – compared to the lens in the middle, the wide angle lens has increased the distance between the rectangles, while the telephoto lens has flattened them together.

So if the effect is real, why are the textbooks slightly wrong?

The answer is because it’s not just the lens itself.  It’s actually the different distances from the camera to the subject matter – when the lens is changed, the camera position changes too in order for the framing to stay the same.

If we consider three lenses – a wide angle lens, a telephoto lens, and a “normal” lens that is in between – then every time we change between these lenses that camera will see a different result.  The wide angle lens will show us more of the scene than the “normal” lens and the telephoto lens will show us less.

But changing the lenses changes the framing of the shot – and that’s not what we said we’re doing.  We said we’re framing all three versions the same, and in order to do that we need to move the camera to compensate for the different lenses.  We need to move the camera forward when we use the wide angle lens, and backwards when we use the telephoto lens.

Camera positions for different lenses

Side view of the scene, showing the 3 camera positions and the 7 rectangles.

By the time we have framed up our scene so that the three shots look the same, our camera is in three different positions. 

It’s the difference in the relative position of the subject matter to the camera’s position that causes the shots to look different, not just the lens itself.

As I said earlier – the difference in perspective is there, and this is something that is often used as a tool by photographers.  Two objects which are very far away can be made to appear a lot closer by shooting them with a telephoto lens from a far distance.  It’s something that is often taken advantage of in films, when the safety of the actor is important. 

For example - in the freeway scene from the film Bowfinger, Director Frank Oz needed to create the impression that Eddie Murphy was surrounded by speeding cars.  By shooting the closeups and cutaways from a long way away but using a powerful telephoto lens, the cars could be a safe distance away from Murphy while appearing to be very close.  This meant the close ups and cutaways could be filmed in-camera, without the need for either a stunt double or additional expensive greenscreen visual effects.

 

The idea that lens choice governs how foreground and background objects appear is so pervasive that it’s easy to overlook that it’s actually the relationship between lens choice and the distance to the camera which is important.

 

The distance from the subject matter to the camera needs to be considered for unusually tall or narrow compositions.  If a wider angle lens is used with the camera close to the scene, then the sides of the scene will show warping and distortions because they’re a lot further away from the camera than the middle.  The solution to this problem is to move the camera further away and use a less-wide lens, so the objects at the edges of frame are a more similar distance to the camera as the ones in the centre.

 

Page 1 of 6 pages 1 2 3 4 5 6 Next »

Editor's Choice
PVC Exclusive
From our Sponsors

Share This

Back To Listings RSS Print

Get articles like this in your inbox: Sign Up

Comments

Please login or register to comment