Topic 9: Visibility Elementary visibility computations: Clipping - - PowerPoint PPT Presentation

topic 9 visibility
SMART_READER_LITE
LIVE PREVIEW

Topic 9: Visibility Elementary visibility computations: Clipping - - PowerPoint PPT Presentation

Topic 9: Visibility Elementary visibility computations: Clipping Backface culling Algorithms for visibility determination Z-Buffer Painters algorithm Space partitions: BSP, AABB, OOBB, octrees Visibility Problem What is NOT


slide-1
SLIDE 1

Topic 9: Visibility

  • Elementary visibility computations:

Clipping Backface culling

  • Algorithms for visibility determination

Z-Buffer Painter’s algorithm Space partitions: BSP, AABB, OOBB, octrees

slide-2
SLIDE 2

Visibility Problem

What is NOT visible?

slide-3
SLIDE 3

Visibility Problem

What is NOT visible?

primitives outside of the field of view back-facing primitives primitives occluded by other objects closer to the camera

slide-4
SLIDE 4

Polygon Clipping (wrt to a single plane)

p0 p1 p2 p12 p3 p4 p45 p5 IN OUT in, in edge (pk, pk+1) Input Output pk+1 in, out pintersect

  • ut, out
  • ut, in

pintersect , pk+1

slide-5
SLIDE 5

Polygon Clipping (wrt to a volume)

Clip with respect to each plane of the volume in sequence! Does the order of the planes matter? Does it work for concave polygons? Does it work for concave volumes?

slide-6
SLIDE 6

Polygon Clipping (when to clip?)

slide-7
SLIDE 7

Backface culling

slide-8
SLIDE 8

Backface culling

slide-9
SLIDE 9

Backface culling

V N E

slide-10
SLIDE 10

Backface culling

N.V > 0 is a back face? V N

slide-11
SLIDE 11

Backface culling

N.(P-E) >0 V N E P

slide-12
SLIDE 12

Backface culling (when to cull?)

Where in the graphics pipeline can we do backface culling? canonical projection

@alec: Would be nice to redo this image

slide-13
SLIDE 13

Occluded faces

Does backface culling always determine visibility completely for a single object?

slide-14
SLIDE 14

Occluded faces

In typical scenes some polygons will overlap, we must determine which portion of each polygon is visible to eye!

slide-15
SLIDE 15

Painters Algorithm

Sort primitives in Z. Draw primitives back to front (CBA). A B C

slide-16
SLIDE 16

Painters Algorithm

Problems

  • Large faces
  • Intersecting faces
  • Cycles
slide-17
SLIDE 17

BSP tree

slide-18
SLIDE 18

AABB tree

slide-19
SLIDE 19

OBB

AABB OBB

slide-20
SLIDE 20

Octree

slide-21
SLIDE 21

Visibility Problem: Z-buffer, A-buffer

Z-buffer: rasterize each polygon in the scene, keeping track of the polygon closest to the eye at each pixel. A-buffer: accumulate pixel contribution to handle transparent polygons.

slide-22
SLIDE 22

Visibility Algorithms

Image space algorithms

  • Operate in display terms pixels.
  • Visibility resolved to display resolution
  • Examples: Z-buffer, ray-tracing
  • O(n*resolution)

Object Space algorithms

  • Analytically compute visible fragments
  • Examples: painters algorithm, BSP
  • O(n2 )