Computer Graphics 15: More Surface Detection Methods: Course Website
Computer Graphics 15: More Surface Detection Methods: Course Website
z z
zmax zmax
S S
z’max
zmin S’
z’max zmin
S’
z’min z’min
x x
No Depth Overlap Depth Overlap
6
of
11
Depth-Sorting Method (cont…)
When there is depth overlap, we make the
following tests:
– The bounding rectangles for the two surfaces
do no overlap
– Surface S is completely behind the
overlapping surface relative to the viewing
position
– The overlapping surface is completely in front
of S realtive to the viewing position
– The boundary edge projections of the two
surfaces onto the view plane do not overlap
7
of
11
Depth-Sorting Method (cont…)
The tests are performed in the order listed
and as soon as one is true we move on to
the next surface
If all tests fail then we swap the orders of the
surfaces
8
of
11
Other Techniques
There are a number of other techniques all
based around are division
– BSP-Tree Method
– Area-Subdivision Method
– Octree Methods
Raycastig can also be used
9
of
11
Ray-Casting
10
of
Comparison Of Visibility-Detection
11 Methods
When few surfaces are present either the
depth sorting algorithm or the BSP tree
method tend to perform best
Scan-line also performs well in these
situations – up to a several thousand
polygon surfaces
The depth buffer method tends to scale
linearly, so that for low numbers of polygons
its performance is poor, but it is used for
higher numbers of polygons.
11
of
11
Summary
We need to make sure that we only draw
visible surfaces when rendering scenes