0% found this document useful (0 votes)
59 views24 pages

CG Unit 7 Full

This document discusses several image-space and object-space visibility algorithms: 1. Object-space methods compare objects within a scene to determine visible surfaces, while image-space methods determine visibility point-by-point at each pixel. 2. Depth-buffer and A-buffer methods use z-values to determine visibility for each pixel, with A-buffer able to accumulate intensities for transparent surfaces. 3. Scan-line and depth-sorting methods sort polygons for each scan line or in depth order before rendering visible portions, while BSP-trees and octrees recursively subdivide space to simplify visibility testing.

Uploaded by

venkyn88
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views24 pages

CG Unit 7 Full

This document discusses several image-space and object-space visibility algorithms: 1. Object-space methods compare objects within a scene to determine visible surfaces, while image-space methods determine visibility point-by-point at each pixel. 2. Depth-buffer and A-buffer methods use z-values to determine visibility for each pixel, with A-buffer able to accumulate intensities for transparent surfaces. 3. Scan-line and depth-sorting methods sort polygons for each scan line or in depth order before rendering visible portions, while BSP-trees and octrees recursively subdivide space to simplify visibility testing.

Uploaded by

venkyn88
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 24

object-space methods and image-space methods.

An object-space method compam objects and parts of objects to each


other within the scene definition to determine which surfaces, as a whole, we
should label as visible.

 In an image-space algorithm, visibility is decided point by


point at each pixel position on the projection plane.
BACK-FACE DETECTION
A point (x, y,z) is "inside" a polygon surface
if Ax+By+Cz+D < 0

If V.N > 0 then this polygon is back faced


BACK-FACE DETECTION
DEPTH-BUFFER METHOD
(Z-Buffer)

With object descriptions converted to projection coordinates, each (x, y, z )


position on a polygon surface corresponds to the orthographic projection point
(x, y) on the view plane.
DEPTH-BUFFER METHOD
Plane Value of Z
Back plane 0
Front plane Zmax

Types of Buffers
Depth Buffer
Refresh Buffer
Algorithm
1. Initialize the depth buffer and refresh buffer so that for all buffer
positions(x, y),
depth(x,y)=0 and refresh(x,y)=Ibground
2. For each position on each polygon surface, compare depth values
to previously stored values in the depth buffer to determine visibility.

- Calculate the depth t for each (x, y) position on the polygon.


- If z > depth(x, y), then set
depth(x,y)=Z and refresh(x,y)=Isurface(x,y).

where Ibground is the value for the background intensity, and Isurface(x,y) is
the projected intensity value for the surface at pixel position (x,y).
After all surfaces have been processed, the depth buffer contains
depth values for the visible surfaces and the refresh buffer contains
the corresponding intensity values for those surfaces.
• Depth values for a surface position (x, y)
are calculated from the plane equation for
each surface:
A-BUFFER METHOD
• An extension of the ideas in the depth-buffer method is the A-buffer method.
• it deals only with opaque surfaces and cannot accumulate intensity values
for more than one surface.
• Each position in the A-buffer has two fields:
1.depth field - stores a positive or negative real number
2. intensity field - stores surface-intensity information or a pointer value.

Background
opaque
surface Foreground
Transprent
surface
A-BUFFER METHOD

Data for each surface in the linked list includes


• RGB intensity components
• opacity parameter (percent of transparency)
• depth
• percent of area coverage
• surface identifier
• other surface-rendering parameters
• pointer to next surface
SCAN-LINE METHOD
• It is an image-space technique.
• It is an extended form of the scan-line fill alg.
• Visible surface can be calculated by finding
the intersection between scan line and polygon surface.
• Two tables are maintained
– Edge table
– Polygon table
SCAN-LINE METHOD

• For positions along this scan line between edges AB and BC, only
the flag for surface Sl is on.
• Similarly, between edges EH and FG, only the flag for surface S2 is
on.
• For scan lines 2 and 3 the active edge list contains edges AD, EH,
BC, and FG.
• But between edges EH and BC, the flags for both surfaces are on.
DEPTH-SORTING METHOD
• Using both image-space and object-space
operations, the depth-sorting method
performs the following basic functions:
1. Surfaces are sorted in order of decreasing
depth.
2. Surfaces are scan converted in order,
starting with the surface of greatest depth.
DEPTH-SORTING METHOD
9

5
4
3
2

Triangle Behind counter List of triangles in front of it


1 2 5
2 0 4,3,1
3 2 1,5
4 1 3
5 2
6 0
DEPTH-SORTING METHOD
Triangle Front List Behind counter output New Behind
counter
1 5 2
1

2 4,3,1 0
-1
9
3 1,5 2
1

4 3 1
2
0

5 2
2

6 0
-1
DEPTH-SORTING METHOD
Triangle Front List Behind counter output New Behind
counter
1 5
1 1

2 4,3,1
-1 -1
9
3 1,5
1 0
4
4 3 2
0 -1

5
2 2

6
-1 -1
DEPTH-SORTING METHOD
Triangle Front List Behind counter output New Behind
counter
1 5
1 0

2 4,3,1
-1 -1
9
3 1,5
0 -1
4
2
4 3
-1 3 -1

5
2 1

6
-1 -1
DEPTH-SORTING METHOD
Triangle Front List Behind counter output New Behind
counter
1 5
0 -1

2 4,3,1
-1 -1
9
3 1,5
-1 -1
4
2
4 3
-1 3 -1
1
5
1 0

6
-1 -1
DEPTH-SORTING METHOD
Triangle Front List Behind counter output New Behind
counter
1 5
-1 -1

2 4,3,1
-1 -1
9
3 1,5
-1 -1
4 35
4 3 2
-1 -1
1
5
0 -1

6
-1 -1
BSP-TREE METHOD
• binary space-partitioning (BSP)
AREA-SUBDIVISION
b1ETHOD
No further sub division is needed if

1.All surfaces are outside surface with


respect to the area.
2.Only one inside , overlapping, or
surrounding surface is in the area.
3.A surrounding surface obscures all
other surfaces within the area boundaries.
AREA-SUBDIVISION METHOD
• Surrounding surface-One that
completely encloses the area.
• Overlapping surface-One that is partly
inside and partly outside the area.
• Inside surface-One that is completely
inside the area.
• Outside surface-One that is completely
outside the area.
AREA-SUBDIVISION METHOD

Overlapping surface
inside surface

Surrounding surface
Outside surface
OCTREE METHODS
RAY-CASTING METHOD

You might also like