C481 B581 Computer Graphics
Dana Vrajitoru

Hidden Surfaces

Determine which parts of the scene are seen by the viewer (camera) and which are not. Allows the user to create a mental 3D spatial representation of the 2D image.

For an object, determine the point of view and orientation
 

For several objects, determine their position with respect to each other:
 

Depth Comparison If two points P1(x1, y1, z1) and P2(x2, y2, z2) result in the same projection, compare the distance between each of them and

If we project on the 0xy plane, we just have to compare z1 and z2: the point with smaller depth is visible.

Detection algorithms:

General Idea

Back-Face Detection

Z-Buffer Algorithm

A-Buffer Algorithm

Hidden Surfaces in OpenGL

Painter's Algorithm

Example

Depth Sorting