Hidden Surface Removal
If each surface has its own color and so does the
background, you must make sure only the visible
surfaces are displayed.
An example with many
faces
or
the famous teapot
Backface removal
- get
camera normal
- get
surface normal
- take dot product
- positive dot product is a back face (not visible)
- zero dot product is a face on edge to viewer (not visible)
- negative dot product is facing to viewer (may be visible)
Depth buffer method (also known as z-buffer)
- image space approach
- uses extra memory - the depth buffer or z-buffer
For each display pixel also have a z-buffer with the current
depth of displayed image.
- on a pixel by pixel bases,
find closest face (record distance to face or z-distance)
Scan line based
- find surfaces crossing current scan line
- determined intersections
- take lowest z for each segment
- fill regions
Depth Sorting (painter's algorithm)
(
example)
- object-space (operations)
- sort faces into decreasing depth order
- scan-convert each face,
working from deepest to closest
- sorting may require re-ordering
Area subdivision (subdivide until simple surface)
break at boundaries in view
Octree
- process front to back order
- if you find something, stop search and display
- done in the convert-oct-to-quad processing
The following are the same images, but you can write on them: