Visible Surface Detection Methods
Visible Surface Detection Methods
Contents
Abstract
Introduction
Classification of Visible-Surface
Detection Algorithms
Object-space methods vs. Image-space methods
• Object definition directly vs. their projected images
• Most visible-surface algorithms use image-space methods
• Object-space can be used effectively in some cases
Ex) Line-display algorithms
Object-space methods
• Compares objects and parts of objects to each other
Image-space methods
• Point by point at each pixel position on the projection plane
To improve performance
Sorting
• Facilitate depth comparisons
Ordering the surfaces according to their distance from
the viewplane
Coherence
• Take advantage of regularity
Epipolar geometry
Topological coherence
Back-Face Detection
Inside-outside test
V N 0 N = (A, B, C)
V
Advanced Configuration
Depth-Buffer Method
Characteristics
S1
(x, y)
Xv
• Refresh buffer
Stores the intensity values for each position
All positions are initialized to the background intensity
Algorithm
A-Buffer Method
Characteristics
Algorithm(1 / 2)
Algorithm(2 / 2)
Scan-Line Method
Characteristics
Edge table
• Coordinate endpoints for each line
• Slope of each line
• Pointers into the polygon table
Identify the surfaces bounded by each line
Polygon table
• Coefficients of the plane equation for each surface
• Intensity information for the surfaces
• Pointers into the edge table
Active list
• Contain only edges across the current scan line
• Sorted in order of increasing x
Flag for each surface
• Indicate whether inside or outside of the surface
• At the leftmost boundary of a surface
The surface flag is turned on
• At the rightmost boundary of a surface
The surface flag is turned off
Example
Scan line 3
H
Between AB and BC, only C
D
the flag for surface S1 is on G
xv
No depth calculations are necessary
Intensity for surface S1 is entered into the refresh buffer
Example(cont.)
Drawback
Depth-Sorting Method
Operations
Algorithm
Overlapping Tests
S’
xv xv
(1) (2)
zv zv
S S
S’ S’
xv xv
(3) (4)
zv zv
Surface Reordering
S’’
S
S’ S S’
xv xv
<S S’> <S S’’, then S’’ S’>
zv zv
Drawback
BSP-Tree Method
Characteristics
Process
Identifying surfaces
• “inside” and “outside” the partitioning plane
Intersected object
• Divide the object into two separate objects(A, B)
P2 P1 P1
C front back
D
A P2 P2
Area-Subdivision Method
Characteristics
Process
Identifying Tests
Octree Method
Characteristics
1
0
7 2
3
Jung Lee, Computer Graphics Laboratory 40
Korea University
Displaying An Octree
5
visible surfaces is loaded into the 4
framebuffer
1
0
7 2
3
Ray-Casting Method
Characteristics
Curved Surfaces
Abstract
Curved-Surface Representations
Wireframe Methods
Characteristics
In wireframe display
• Visibility tests are applied to surface edges
• Visible edge sections are displayed
• Hidden edge sections can be eliminated or
displayed differently from the visible edges
Procedures for determining visibility of edges
• Wireframe-visibility(Visible-line detection,
Hidden-line detection) methods
With depth-sorting
• Interiors are in the background color
• Boundaries are in the foreground color
• Processing the surfaces from back to front
Hidden lines are erased by the nearer surfaces
Jung Lee, Computer Graphics Laboratory 51
Korea University
Summary
Comparison(1 / 2)
Comparison(2 / 2)
A-buffer method
• An improvement on the depth-buffer approach
• Additional information
Antialiased and transparent surfaces
Other visible-surface detection schemes
• Scan-line method
• Depth-sorting method(painter’s algorithm)
• BSP-tree method
• Area subdivision method
• Octree methods
• Ray casting