CLICK HERE TO DOWNLOAD PPT ON Surface Detection Methods
Surface Detection Methods Presentation Transcript
1.Surface Detection Methods
2.Today we will start to take a look at visible surface detection techniques:
Why surface detection?
Back face detection
Depth-buffer method
A-buffer method
Scan-line method
Why surface detection?
Back face detection
Depth-buffer method
A-buffer method
Scan-line method
3.We must determine what is visible within a scene from a chosen viewing position
For 3D worlds this is known as visible surface detection or hidden surface elimination
For 3D worlds this is known as visible surface detection or hidden surface elimination
4.Two Main Approaches
Visible surface detection algorithms are broadly classified as:
Object Space Methods: Compares objects and parts of objects to each other within the scene definition to determine which surfaces are visible
Image Space Methods: Visibility is decided point-by-point at each pixel position on the projection plane
Image space methods are by far the more common
Visible surface detection algorithms are broadly classified as:
Object Space Methods: Compares objects and parts of objects to each other within the scene definition to determine which surfaces are visible
Image Space Methods: Visibility is decided point-by-point at each pixel position on the projection plane
Image space methods are by far the more common
5.Back-Face Detection
The simplest thing we can do is find the faces on the backs of polyhedra and discard them
The simplest thing we can do is find the faces on the backs of polyhedra and discard them
6.Ensure we have a right handed system with the viewing direction along the negative z-axis
Now we can simply say that if the z component of the polygon’s normal is less than zero the surface cannot be seen
Now we can simply say that if the z component of the polygon’s normal is less than zero the surface cannot be seen
7.In general back-face detection can be expected to eliminate about half of the polygon surfaces in a scene from further visibility tests
More complicated surfaces though scupper us!
We need better techniques to handle these kind of situations
More complicated surfaces though scupper us!
We need better techniques to handle these kind of situations
8.The depth-buffer algorithm proceeds by starting at the top vertex of the polygon
Then we recursively calculate the x-coordinate values down a left edge of the polygon
The x value for the beginning position on each scan line can be calculated from the previous one
Then we recursively calculate the x-coordinate values down a left edge of the polygon
The x value for the beginning position on each scan line can be calculated from the previous one
9.Surface information in the A-buffer includes:
RGB intensity components
Opacity parameter
Depth
Percent of area coverage
Surface identifier
Other surface rendering parameters
The algorithm proceeds just like the depth buffer algorithm
The depth and opacity values are used to determine the final colour of a pixel
RGB intensity components
Opacity parameter
Depth
Percent of area coverage
Surface identifier
Other surface rendering parameters
The algorithm proceeds just like the depth buffer algorithm
The depth and opacity values are used to determine the final colour of a pixel
10.An image space method for identifying visible surfaces
Computes and compares depth values along the various scan-lines for a scene
Computes and compares depth values along the various scan-lines for a scene
11.To facilitate the search for surfaces crossing a given scan-line an active list of edges is formed for each scan-line as it is processed
The active list stores only those edges that cross the scan-line in order of increasing x
Also a flag is set for each surface to indicate whether a position along a scan-line is either inside or outside the surface
The active list stores only those edges that cross the scan-line in order of increasing x
Also a flag is set for each surface to indicate whether a position along a scan-line is either inside or outside the surface
12.Pixel positions across each scan-line are processed from left to right
At the left intersection with a surface the surface flag is turned on
At the right intersection point the flag is turned off
We only need to perform depth calculations when more than one surface has its flag turned on at a certain scan-line position
13.We need to make sure that we only draw visible surfaces when rendering scenes
There are a number of techniques for doing this such as
Back face detection
Depth-buffer method
A-buffer method
Scan-line method
Next time we will look at some more techniques and think about which techniques are suitable for which situations
At the left intersection with a surface the surface flag is turned on
At the right intersection point the flag is turned off
We only need to perform depth calculations when more than one surface has its flag turned on at a certain scan-line position
13.We need to make sure that we only draw visible surfaces when rendering scenes
There are a number of techniques for doing this such as
Back face detection
Depth-buffer method
A-buffer method
Scan-line method
Next time we will look at some more techniques and think about which techniques are suitable for which situations
0 comments