Perspective Projection
In chase-camera mode, a boat sailing away from the drone should dwindle toward the horizon, and one heading toward it should swell until it fills the view. An orthographic camera can't do that; it keeps every size fixed. Perspective projection does it with one division.
The rule
Perspective: divide by depth, so twice as far looks half as big.
Picture the camera as a single point, with a flat screen at distance in front of it. The straight line from the camera to a point crosses the screen somewhere, and similar triangles tell you where:
With , a crate corner at lands at . Move it back to and it lands at : twice as far, half the size, and slid toward the centre of the view. That is exactly how an eye or a lens sees.
The field of view sets . If the screen runs from −1 to 1 across, then , so a 90° view gives . Widening the view makes smaller: more of the world fits on the screen, and everything in it looks smaller.
In a real renderer the GPU does the division. A 4×4 projection matrix copies each point's depth into its coordinate, and after the multiplication the hardware divides by , a step called the perspective divide. The same that told points from vectors now carries depth.
The shortcut
On-screen size = f × real size ÷ depth. You rarely need the full coordinates: halve the distance and the size doubles; triple it and the size drops to a third.
The rule
Screen size = f × real size ÷ depth. The boat is 6 m long and f = 1.
The trap is points behind the camera. With z = −5 the division flips the signs, and something behind the drone is drawn, mirrored, in front of it; at z = 0 the division blows up. Renderers therefore clip geometry against a near plane just in front of the camera before they divide.
Drills
Answer fast — trust the rule.
With f = 1, where does the point (6, 3, 12) land on screen?
A gull looks 0.2 screen units wide at 30 m. It flies in to 10 m. How wide does it look now?
Widening the chase camera's field of view from 60° to 90° does what to a boat on screen?
Why must the renderer clip a point at z = −5 before the divide?
Remember
- Perspective: screen position = f × (x, y) ÷ depth; twice as far looks half as big.
- On-screen size ∝ 1 ÷ distance; a wider field of view means a smaller f and smaller objects.
- Clip at a near plane before dividing, or things behind the camera appear mirrored in front.
