After Effects has real perspective, the kind with a camera, and fake perspective, the kind that moves four corners. Both are correct tools for different jobs, and most confusion comes from using the wrong one. This guide covers the 3D camera and its lens settings, the two corner-pin effects, the 3D Camera Tracker for matching footage, and how the perspective grids on this site fit in when you are designing rather than compositing.
Real perspective: 3D layers and a camera
Click a layer's 3D Layer switch in the Timeline (or Layer > 3D Layer). The layer gains a Z position, Orientation and X/Y/Z rotation, and Geometry and Material Options; turn the switch off again and those values are discarded. On its own, a 3D layer is viewed through a default camera; add your own with Layer > New > Camera (Ctrl + Alt + Shift + C, Cmd + Opt + Shift + C). The camera affects only 3D layers, so 2D layers in the same comp stay flat, which is useful for titles and overlays.
Camera Settings (double-click the camera layer, or Layer > Camera Settings) is where the perspective lives. Type: One-Node cameras move and rotate like a hand-held camera; Two-Node cameras have a point of interest they always look at, which is easier to animate around a subject. Preset / Focal Length / Zoom / Angle of View are one setting written four ways: pick a preset by focal length (50mm is neutral, 24mm dramatic, 85mm flat) or type a focal length and the angle of view updates. Film Size is the sensor the focal length is measured against; leave it at the 36 mm default so lens numbers match photographic ones. Enable Depth of Field with Focus Distance, Aperture, F-Stop and Blur Level adds the focus falloff a lens would have.
The rules from the perspective basics page apply exactly: the camera's height sets the horizon, its focal length sets how strongly layers at different depths converge, and moving the camera closer with a wider lens exaggerates depth while moving it back with a longer one compresses it, as in photography. Layers rotated in Y become receding planes with true vanishing points; stack several at different Z positions and the camera does the parallax.
Fake perspective: Corner Pin and CC Power Pin
For a single flat surface, a screen, a poster, a sign on a wall, a camera is more than you need. Effect > Distort > Corner Pin puts four pins on the layer's corners; drag each to where that corner of the plane should be and the layer is mapped into the quadrilateral, which is a true projective transform, so the result has the right convergence for a plane. Pins can be edited in the Composition panel, the Timeline or Effect Controls, and keyframed. CC Power Pin, in the same Distort submenu, does the same mapping with its own controls; Corner Pin works at 8, 16 and 32 bpc, CC Power Pin at 8 and 16.
The corner-pin effects are the After Effects version of the perspective warp tool here: if you need to preview a mapping or produce a still, the tool does the same four-corner homography in the browser and exports it.
Matching footage: the 3D Camera Tracker
For live footage, the camera already exists and the job is to recover it. Animation > Track Camera (also Effect > Perspective > 3D Camera Tracker, or Track Camera in the Tracker panel) analyses the clip in the background and solves a camera. Controls include Shot Type, the display of Track Points as 3D Solved or 2D Source, and Target Size. Right-click a set of points to create a Text, Solid, Null or Shadow catcher layer that sits on that surface in the scene's perspective; a matching camera layer is added automatically, and any 3D layer you parent to the null follows the shot.
For a single still frame, the vanishing point finder recovers the horizon and focal length from two pairs of edges, which is enough to set the After Effects camera by hand.
Designing with a grid
When the piece is designed rather than tracked, a title sequence with cards receding into space, a motion-graphics room, decide the camera before building it. The 2-point grid or 3-point grid here gives the horizon, vanishing points and one-metre floor for any lens; export a transparent PNG at the comp size and put it on a 2D guide layer above everything. Then set the After Effects camera to the same focal length, and the 3D layers will land on the exported grid. The CSS perspective generator is the same camera model expressed as perspective and rotateY values, which map directly onto an AE camera's zoom and a layer's Y rotation.
Common problems
A 3D layer does not respond to the camera. Its 3D switch is off, or the camera is above it in the stack with layers set to 2D between them; check the switch first.
Perspective looks too strong. The focal length is short. Move the camera back and increase the focal length; the layout keeps its framing and the convergence relaxes.
Corner-pinned screen looks wrong at the edges. The four pins are not at the true corners of the plane in the footage; zoom in and place them on the corners, not the bezel.
Tracked objects slide. The solve is poor: pick track points on the same plane, increase Target Size only for display, and check the Shot Type matches the lens (fixed angle of view vs. variable zoom).
Related
CSS perspective generator · perspective warp · vanishing point finder · perspective in photography · lens to field of view
Questions
How do I put a layer in perspective in After Effects?
Two ways. For a real camera: turn on the layer's 3D switch, add a camera with Layer > New > Camera, and rotate or move the layer in Z; the camera's focal length sets the perspective. For a quick flat distortion: Effect > Distort > Corner Pin and drag the four corners to where the plane's corners should be.
How do I add a camera in After Effects?
Layer > New > Camera (Ctrl + Alt + Shift + C, Cmd + Opt + Shift + C on Mac). Choose One-Node or Two-Node, a preset by focal length such as 50mm, and optionally Enable Depth of Field. Cameras only affect layers with the 3D switch on.
What is the difference between Corner Pin and CC Power Pin?
Both are under Effect > Distort and both map a layer's four corners to four new positions to fake a plane in perspective. Corner Pin is the plain version and works at 8, 16 and 32 bits; CC Power Pin adds its own controls for the distortion and works at 8 and 16 bits. For a screen replacement either does; for tracked footage the pins can be driven by track points.
How do I match a layer to the perspective of footage?
Use the 3D Camera Tracker: Animation > Track Camera (or Effect > Perspective > 3D Camera Tracker). It analyses the shot in the background, solves a camera, and lets you right-click track points to create a solid, null, text or shadow catcher that sits in the scene's perspective; a matching camera is added automatically.
What focal length should the After Effects camera be?
The one the footage was shot with, if you are matching footage; otherwise pick by look: 24–28 mm for dramatic depth, 50 mm for neutral, 85 mm and longer for flat, compressed layouts. The camera's Angle of View field shows the equivalent, and the lens to field of view calculator here converts between them.
Can After Effects do a fisheye or curvilinear camera?
Not natively; the camera is rectilinear. Widen the angle of view past about 100° and the edges stretch rather than curve. For a fisheye look, apply a lens-distortion effect afterwards, or design over a fisheye grid exported from this site.
A new lesson and a new grid, about once a month.
Each lesson arrives by email before it goes on the site, with the grid it was drawn on and the link to open it. Subscribers also get both free starter packs and the subscriber price on the paid ones. Never more than two emails a month; one click to leave.
Handled by Kit on our behalf. Your address is used for this letter and nothing else — see the privacy page.