topic 9 visibility
play

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


  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

  2. Visibility Problem What is NOT visible?

  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

  4. Polygon Clipping (wrt to a single plane) p 3 p 2 OUT p 4 p 12 p 1 IN p 45 p 5 p 0 Input Output edge (p k , p k+1 ) in, in p k+1 in, out p intersect out, out out, in p intersect , p k+1

  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?

  6. Polygon Clipping (when to clip?)

  7. Backface culling

  8. Backface culling

  9. Backface culling N V E

  10. Backface culling N.V > 0 is a back face? N V

  11. Backface culling N.(P-E) >0 P N V E

  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

  13. Occluded faces Does backface culling always determine visibility completely for a single object?

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

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

  16. Painters Algorithm Problems • Large faces • Intersecting faces • Cycles

  17. BSP tree

  18. AABB tree

  19. OBB OBB AABB

  20. Octree

  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.

  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(n 2 )

Recommend


More recommend