Visible Surface Detection

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 15

VISIBLE SURFACE

DETECTION
PRESENTED BY
R.BRAHANA
II-MCA
INTRODUCTION
 Whenever we want to generate some realistic
images, we need to find out what part of the
scenes should be displayed
 To identify what parts of the scenes are visible,
we have certain methods called Visible surface
detection.
OBJECT-SPACE METHODS VS.
IMAGE-SPACE METHODS

 Object definition directly vs. their projected images


 Object-space methods
 Image-space methods
SORTING AND COHERENCE METHODS

 To improve performance
 Sorting
Facilitate depth comparisons
• Coherence
 Take advantage of regularity
BACK FACE DETECTION
 A point (x, y, z) is “inside” a surface with plane
parameters A, B, C, and D if
 The polygon is a back face if
V N 0 N = (A, B, C)

• V is a vector in the viewing direction from the


eye(camera)
• N is the normal vector to a polygon surface
DEPTH BUFFER METHOD
 Commonly used image-space approach
 Compares depths of each pixel on the projection
plane
 Referred to as the z-buffer method
 Usually applied to scenes of polygonal surfaces
 Depth values can be computed very quickly
 Easy to implement
 Two buffer areas are required
Depth buffer
 Store depth values for each (x, y) position
 All positions are initialized to minimum depth
Refresh buffer
 Stores the intensity values for each position
 All positions are initialized to the background
intensity
ALGORITHMS
 Initialize the depth buffer and refresh buffer
depth(x, y) = 0, refresh(x, y) = Ibackgnd
 For each position on each polygon surface
 Calculate the depth for each (x, y) position on
the polygon
 If z > depth(x, y), then set
depth(x, y) = z, refresh(x, y) = Isurf(x, y)
 Advanced
 With resolution of 1024 by 1024
 Process one section of the scene at a tim
SCAN-LINE METHOD
 Extension of the scan-line algorithm for
filling polygon interiors
 For all polygons intersecting each scan line
Processed from left to right
 Depth calculations for each overlapping surface
 The intensity of the nearest position is entered into the
refresh buffer
A-BUFFER METHOD
 Extends the depth-buffer algorithm so that each
position in the buffer can reference a linked list
of surfaces.
 More memory is required.
 However, we can correctly compose different
surface colors and handle transparent surfaces.
TABLES FOR VARIOUS SURFACES
 Edge table
 Coordinate endpoints for each line
 Slope of each line
 Pointers into the polygon table
 Polygon table
 Coefficients of the plane equation for each
surface
 Intensity information for the surfaces
 Pointers into the edge table
Image-Space Method vs.
Object-Space Method
 Image-Space Method  Object-Space Method
 Depth-Buffer  Back-Face Detection
Method  BSP-Tree Method
 A-Buffer Method  Area-Subdivision
 Scan-Line Method Method
 Area-Subdivision  Octree Methods
Method  Ray-Casting Method
Summary
 Back-face detection methods
 Fast and effective as an initial screening
 In general, this can’t completely identify all
hidden surfaces
 Depth-buffer(z-buffer) method
 Fast and simple
 Two buffers
 Refresh buffer for the pixel intensities
 Depth buffer for the depth of the visible
surface
 A-buffer method
 An improvement on the depth-buffer approach
 Other visible-surface detection schemes
 Scan-line method
 Depth-sorting method(painter’s algorithm)
 BSP-tree method
 Octree methods
 Ray casting

You might also like