Pebellslearn by building
0%
RoadmapsMatrixCoursesSandboxSign in
Projection and Orientation  ›  Lesson

Orthographic Projection

Orthogonal 12 minOrthographic projection draws a 3D scene by dropping the depth coordinate, so objects keep their size at any distance and parallel lines stay parallel.

Orthographic Projection

Harbour Hopper has two ways to look at the harbour: the classic side view, and a 3D chase-camera mode that flies behind the drone. Both are cameras, and the screen is flat in both, but the harbour has depth: boats near the camera, the lighthouse far behind. Every frame, the renderer must squash 3D positions onto a 2D screen. That squash is a projection, and the simplest kind just throws the depth away.

The rule

Orthographic: drop the depth, keep the size.

Work in camera space: the camera sits at the origin, x points right, y points up, and z is depth, how far in front of the camera a point is. (Engines disagree about which way z points; in this section, bigger z means farther away.)

An orthographic projection sends (x,y,z)(x, y, z) to (x,y)(x, y). Depth is kept only to decide what is drawn in front of what. Because distance never enters the formula:

  • a crate 5 m away and a crate 50 m away are drawn the same size;
  • parallel lines stay parallel on screen.

The camera shows a rectangular view box, which the renderer stretches onto the screen. The side view shows 32 m × 18 m of harbour on a 1920 × 1080 screen: 60 pixels per metre in both directions. Pixel rows count down from the top of the screen, so y has to be flipped:

sx=60 (x−left),sy=60 (top−y)s_x = 60\,(x - \text{left}), \qquad s_y = 60\,(\text{top} - y)

Orthographic cameras suit 2D games, maps and minimaps, strategy views, level editors and interface panels: anywhere clear measurement matters more than realism. What they give up is the strongest depth cue there is. Nothing shrinks with distance.

The shortcut

Ignore z, subtract the box's corner, multiply by pixels per metre, flip y.

The drone on the side-view screenStep 1 of 4
  1. Pixels per metre

    The box is 32 m wide on 1920 pixels: 1920 ÷ 32 = 60. Down the screen, 1080 ÷ 18 = 60 too, so nothing is stretched.

The trap is a view box whose shape doesn't match the screen. Show the same 32 × 18 m box on a 4:3 screen and you get different pixels per metre across and down, so round buoys turn into ovals. Always match the box to the screen's aspect ratio.

Drills

Answer fast — trust the rule.

quick drill

Under an orthographic camera, a crate moves from 10 m to 40 m away. How does its size on screen change?

A view box is 40 m wide on a 1920-pixel-wide screen. How many pixels per metre is that?
1920÷40= ?1920 \div 40 = \,?
quick drill

Which Harbour Hopper view suits an orthographic camera best?

quick drill

The 32 × 18 m box runs from (0, 0) to (32, 18) on a 1920 × 1080 screen, 60 px per metre with y flipped. Where is a gull at (16, 9) drawn?

Remember

  • Orthographic projection drops depth: size doesn't change with distance, and parallel lines stay parallel.
  • Screen position: subtract the view box's corner, multiply by pixels per unit, flip y.
  • Match the view box's shape to the screen, or circles become ovals.

Practice — level up

0/1 solved

Write your answer, then compare it with a rubric and a model answer.

ExplainWhy the side view is orthographic

Explain why Harbour Hopper's 2D side view uses an orthographic camera, what happens to each point's depth value, and one thing the player loses compared with a perspective camera.