Perspective projection is the mathematical mapping that turns points of a three-dimensional scene into a two-dimensional image by drawing rays toward a single center of projection, so that objects farther from the viewer appear smaller. Among the 3D fundamentals of 3D graphics & animation, it is the default view of a virtual camera and the reason rendered images show convincing depth.
Every rasterizer, game engine and offline renderer applies perspective projection after the scene has been placed in camera space. The mapping is described by a projection matrix and a perspective divide, and its behavior is controlled by a small set of parameters: field of view, aspect ratio and the near and far clipping planes.
How perspective projection maps points to the image
Perspective projection divides each point’s horizontal and vertical position by its distance along the viewing axis. A point at coordinates (x, y, z) in camera space lands on the image plane at roughly (x/z, y/z), scaled by the focal length. This division by depth is what makes parallel lines converge and distant objects shrink.
In real-time graphics the operation is split into two steps. First, a 4×4 projection matrix transforms camera-space coordinates into clip space and copies the depth into the fourth component, w. Second, the GPU performs the perspective divide, dividing x, y and z by w to produce normalized device coordinates (NDC). Only then are triangles clipped, rasterized and mapped to pixels by the viewport transform.
The following table traces a single vertex through the stages of the pipeline that involve projection.
| Stage | What happens | Typical range |
|---|---|---|
| Camera space | Scene expressed relative to the camera | Unbounded, camera looks along -z or +z |
| Clip space | Projection matrix applied, w holds depth | Visible points satisfy -w to w |
| NDC | x, y and z divided by w | -1 to 1 (z 0 to 1 in Direct3D and Vulkan) |
| Screen space | Viewport transform to pixels | 0 to image width and height |
Because the divide happens per vertex, attributes such as texture coordinates must be interpolated in a perspective-correct way. Modern GPUs do this automatically by interpolating attribute/w and 1/w and then dividing, which prevents the warped textures seen in early software renderers that used simple screen-space interpolation.
Parameters of the viewing frustum
The visible region of a perspective camera is a truncated pyramid called the viewing frustum. Its apex sits at the camera, its sides are defined by the field of view and aspect ratio, and it is cut by the near and far clipping planes. Anything outside the frustum is clipped or culled and never reaches the image.
| Parameter | Typical values | Effect on the image |
|---|---|---|
| Vertical field of view | 40 to 90 degrees | Wider angles exaggerate depth and edge stretching |
| Focal length | 18 mm to 200 mm (35 mm equivalent) | Longer lenses flatten depth and compress distance |
| Aspect ratio | 16:9, 4:3, 2.39:1 | Sets horizontal extent relative to vertical |
| Near clipping plane | 0.01 to 1 scene unit | Too small a value wastes depth precision |
| Far clipping plane | 100 to 100,000 units | Too large a ratio to near causes z-fighting |
Field of view and focal length describe the same property. Digital content creation tools usually expose focal length and a sensor width to match real cameras, while game engines expose the vertical or horizontal field of view directly. Converting between them uses the relation FOV = 2 x atan(sensor size / (2 x focal length)).
Perspective compared with orthographic projection
Perspective projection differs from orthographic projection in one essential way: orthographic projection uses parallel projection rays and no division by depth, so object size on screen does not depend on distance. Both are standard camera modes in a 3D viewport, and each suits different tasks.
| Property | Perspective projection | Orthographic projection |
|---|---|---|
| Projection rays | Converge at the camera | Parallel to the view direction |
| Size with distance | Shrinks with depth | Constant |
| Parallel lines | Meet at vanishing points | Stay parallel |
| Depth buffer distribution | Nonlinear, dense near the camera | Linear |
| Typical use | Final renders, games, VR | Modeling views, technical drawings, isometric games |
Artists usually model in orthographic front, side and top views to measure proportions, then switch to perspective to judge the form as an audience will see it. A related variant, weak perspective, scales a whole object by one average depth and is used in computer vision when depth variation within the object is small.
Setting up a perspective camera in practice
Good camera setup starts with the intended viewing distance and mood. A narrow field of view suits portraits and product shots because it avoids enlarged noses and bulging edges, while a wide field of view creates speed and scale in action scenes and first-person games.
| Situation | Recommended setting | Reason |
|---|---|---|
| Character close-up | 50 to 85 mm focal length | Natural facial proportions |
| Architectural interior | Wide lens with vertical lines kept vertical | Shows space without converging walls |
| First-person game | Horizontal FOV of 90 to 110 degrees | Peripheral awareness on flat screens |
| Large open world | Reversed depth with a floating-point buffer | Reduces z-fighting at long range |
| VR headset | FOV taken from the headset’s own optics | Prevents discomfort and scale errors |
Depth precision deserves particular attention. With a standard depth mapping, most precision is concentrated close to the near plane, so pushing the near plane outward helps far more than pulling the far plane inward. Many engines now use reversed-Z, which maps the near plane to 1 and the far plane to 0, pairing well with floating-point depth buffers.
Limitations and common mistakes
Perspective projection is a planar projection, so it cannot represent a field of view approaching 180 degrees without extreme stretching at the image edges. Fisheye, panoramic and equirectangular cameras use different, nonlinear mappings that a single projection matrix cannot express.
- Extreme wide angles distort spheres into ovals near the frame edges; this is correct geometry, not a rendering bug.
- A near plane set too close causes flickering surfaces where geometry overlaps, known as z-fighting.
- Mismatched aspect ratio between camera and output stretches every object horizontally or vertically.
- Matching a background photo fails when focal length and sensor width do not match the real camera.
The simple explanation
Perspective projection is how a computer draws a 3D world the way your eyes see it. Things far away look smaller. Train tracks seem to meet at the horizon. The computer copies this effect with simple math.
Imagine looking through a window at a street. Each point you see travels in a straight line to your eye. If you traced every point on the glass, you would get a perspective picture. The computer does the same tracing for every corner of every object, millions of times per second.
How it is used in practice
A visualization artist is placing a computer-generated building into a drone photograph of an empty lot. The drone camera recorded a 24 mm lens on a sensor about 13.2 mm wide. The artist sets the virtual camera to the same focal length and sensor width, then aligns its position and rotation until the rendered ground grid follows the real road edges.
The first test render looks wrong because the default 36 mm sensor width produced a narrower field of view. After correcting the sensor value, the building’s roof lines converge at the same vanishing points as the neighboring houses. The final composite reads as one photograph, and the client approves it without asking for further perspective corrections.