Notes on Visible -Surface Detection - Computer Graphics | ECS 175, Study notes of Computer Graphics

Material Type: Notes; Class: Computer Graphics; Subject: Engineering Computer Science; University: University of California - Davis; Term: Unknown 1989;

Typology: Study notes

Pre 2010

Uploaded on 07/31/2009

koofers-user-igu-1
koofers-user-igu-1 🇺🇸

10 documents

1 / 17

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Visible−Surface Detection
Identifying those parts of a scene that
are visible from a chosen viewing position,
and only process (scan−convert) those parts
Two approaches:
1. Object−space methods
2. Image−space methods
Two main strategies:
1. Sorting
2. Coherence
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download Notes on Visible -Surface Detection - Computer Graphics | ECS 175 and more Study notes Computer Graphics in PDF only on Docsity!

Visible−Surface Detection

Identifying those parts of a scene that are visible from a chosen viewing position, and only process (scan−convert) those parts

Two approaches:

  1. Object−space methods
  2. Image−space methods

Two main strategies:

  1. Sorting
  2. Coherence
  1. Back−face detection
  2. Z−buffer
  3. A−buffer
  4. Scan−line method
  5. Painter’s algorithm
  6. BSP−tree method
  7. Area−subdivision method
  8. Octree methods
  9. Ray−casting method
  10. Wireframe methods

Visible −Surface Detection Algorithms:

Back−face detection

V

N 1 N^2

V N1 > 0

V N2 < 0

Z−buffer (cont’d)

z values can be calculated incrementally

x x+

y y−

Ax + By + Cz + D = 0

z’ = −A(x+1) − By −D C

= z −

A

C

top

y scan line

bottom

x’ = x −

m

z’ =

A/m + B

C

−A(x−(1/m)) − B(y−1) −D C

= z +

− Large amount of memory space is needed. What to do if short of memory space?

Z−buffer (cont’d)

− Aliasing problem!

− Handle only opaque surfaces

− Other use of z−buffer

Scan−Line Algorithm:

− combine polygon scan conversion with hidden surface removal

− scanline by scanline rather than polygon by polygon

a (^) b

c

d

A

B

i

j

− perform depth calculation only when more than one polygon intersects with the current scanline

− require sophisticated data structures to quickly locate the polygon/edges intersecting with current scanline

Painter’s algorithm:

− depth sort the polygons

− an object space algorithm

− analogous to the way an oil painter might render a scene

− scan−convert polygons in back−to−front order

How to depth sort?

  1. sort all polygons according to the minimum z coordinate of each
  2. resolve any ambiguities this may cause when polygons’ z extents overlap (splitting polygons if necessary)

p

p

zmin zmax

p

p xmax xmin

BSP−tree Method

− binary space partitioning tree

− storing relative positioning information

A

B

C

D

B

C D

A

− applicable to data of arbitrary dimensions

− at each stage, the space is partitioned into two parts of arbitrary size

− each subdivision plane (or line) can have an arbitrary orientation

− view−dependent operations can be applied apropriately to the resulting two half−spaces

Area Subdivision (Warnock’s algorithm)

− try to make an easy decision about which polygon is visible in a section of the image. If a decision cannot be made, subdivide the area recursively until one can be made.

− work at image precision for subdivision, and at object precision for depth comparison

3 4

Octree Methods

− an octree is constructed by recursively partitioning the space into eight subspaces each of which is called an octant.

− regular partitioning

− spatial presorted and octants can be visited with a tree traversal

− back−to−front or front−to−back

− hierarchical Z−buffering for occlusion culling

Wireframe Methods

− may still want to draw the hidden lines!

− for drawing polygon mesh, computational mesh, outline of an object, illustration, ...

− visibility testing can be achieved with variations of clipping methods and other visible−surface methods

Coherence

− Object coherence 2 entirely separated objects can be compared at the object level

− Face coherence surface properties typically vary smoothly across a face

− Edge coherence an edge may change visibility only where it crosses behind a visible edge or penetrates a face

− Scan−line coherence the set of visible object spans determined for consecutive scanlines are often the same

− Area coherence a group of adjacent pixels is often covered by the same visible face

− Depth coherence adjacent parts of the same surface are typically close in depth

− Frame coherence two consecutive frames are likely to be similar

the degree to which parts of an environment or its projection exhibit local similarities