Brain Dump

Perspective Projection

Tags
computer-graphics

Perspective projection adjusts the sizes of objects in the distance to appear smaller than those that're closer.

See more here.

The [perspective] projection matrix maps a given frustum range to clip space, but also manipulates the w value of each vertex coordinate in such a way that the further away a vertex coordinate is from the viewer, the higher this w component becomes. Once the coordinates are transformed to clip space they are in the range -w to w (anything outside this range is clipped). OpenGL requires that the visible coordinates fall between the range -1.0 and 1.0 as the final vertex shader output, thus once the coordinates are in clip space, perspective division is applied to the clip space coordinates.

Variants

There're [see page 13, two] kinds of projection:

ProjectionDescription
[see page 14, Orthographic/Parallel]Projected lines are parallel from where they start to where they meet the screen.
[see page 15, Perspective]Projected lines spread outwards from the center of projection, with them getting wider as you get further away.

The orthographic projection model guarantees the measurements of two objects are the same relative to each other (one gets small, the other gets proportionally smaller). This makes it useful in CAD.

Perspective projection incorporates foreshortening causing loss of relative dimensions but enables the perception of depth.

We can derive a [see page 16, perspective projection] using a [see page 18, matrix] \(T_{persp}\) which depends on the distance of the view space from the camera.

Links to this note