1 / 10

Hidden Surface Removal

Hidden Surface Removal. Hidden Surface Removal . Object-Space and Image-Space Approaches Back-Face Culling Z-Buffer Algorithm Depth Sort and Painter’s Algorithm. Algorithm Classifications. Object-Space Methods: Visibility is decided by comparing objects in object-space.

kirkan
Download Presentation

Hidden Surface Removal

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Hidden Surface Removal

  2. Hidden Surface Removal • Object-Space and Image-Space Approaches • Back-Face Culling • Z-Buffer Algorithm • Depth Sort and Painter’s Algorithm

  3. Algorithm Classifications • Object-Space Methods: • Visibility is decided by comparing objects in object-space. • e.g. painter’s algorithm. • Image-Space Methods: • Visibility is decided at each pixel position in the projection plane. • e.g. Z-Buffer algorithm

  4. Back Face Culling x z

  5. Back Face Culling • A polygon is a back face if V • N > 0. • For OpenGL, V=(0,0,-1) x z

  6. Z-Buffer Algorithm • Most widely used Image-space algorithm. • Easy to implement, both in software and hardware. • Incremental computation. y (x, y) x z

  7. Z-Buffer Algorithm y (x, y) x z

  8. Z-Buffer Algorithm • Can be conducted with scan-conversion. Assume the plane equation of the triangle is ax + by + cz + d = 0 let (x1, y1, z1) and (x2, y2, z2) be two points on the triangle. x = x2 - x1 ,y = y2 - y1 ,z = z2 - z1 then a x + b y + c z = 0 since x = 1, y = 0, then z = - a/c.

  9. Painter’s Algorithm • Back-to-front rendering: polygons are sorted by z-coordinates in object space, and are rendered in back-to-front order. y C B A x z

  10. Painter’s Algorithm • Need to check for overlapping using BSP tree or Octree. • Overlapped triangles need to be spitted.

More Related