Visible Surface Detection All
Visible Surface Detection All
Detection
Method
2
Mr. Dhiraj Rane Computer Graphics
3
Classification of Visible- Surface Detection Algorithms
2 approaches
Object-Space Method
Compares objects and parts of objects to each other
within the scene
Determine surface as a whole
Image-Space Method
Visibility is decided point by point at each pixel position on
the projection plane
Most visibility-surface algorithms use image-space
methods
Vview
.N>0
Back-face test by considering the direction of the normal vector for a
polygon surface
A polygon is a back face if
y yview xview
zvie
N(3,2,6)
B(0,3,0)
3x+2y+6z -6=0
C(0,0,1) A(2,0,0)
z x
Image-space approach
Compares surface depth
values throughout a
scene from each pixel
position on the projection
plane
Also called the z-buffer
method
Depth is measured along
the z-axis
Calculate the depth of any point on the plane containing the polygon
A surface position (x, y) from plane equation
z = (-Ax-By-D)/C
Depth z’ of (x+1, y)
z’ = [-A(x+1)-By-D]/C, z’ = z-A/C
Depth z’ of (x-1/m, y-1)
z’ = [-A(x-1/m)-B(y-1)-D]/C, z’ = z+(A/m+B)/C
Depth z’ of (x, y-1)
z’ = [-Ax-B(y-1)-D]/C, z’ = z+B/C
5 3
5a
2
5b
3 4
1
1
2 5b
4
5a
5 3
5a front back
2
5b
3 2 4
1 front back
5b
4
5a 1
5 3
5a front back
2
5b
3 2 4
1 front back back
4
5a 1 5b
Image-space method
Take advantage of coherence, by locating projection