1 / 12

Hidden Surfaces Removal

Hidden Surfaces Removal. Prof. Ravindra R Patil (15CS62). Visible-Surface Detection. Problem: Given a scene and a projection, what can we see?. Visible-Surface Detection. Two main types of algorithms: Object space: Determine which part of the object are visible

Download Presentation

Hidden Surfaces 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 Surfaces Removal Prof. Ravindra R Patil (15CS62)

  2. Visible-Surface Detection Problem: Given a scene and a projection, what can we see?

  3. Visible-Surface Detection Two main types of algorithms: Object space: Determine which part of the object are visible Image space: Determine per pixel which point of an object is visible Object space Image space

  4. Visible-Surface Detection Four algorithms: • Back-face elimination • Depth-buffer • Depth-sorting • Ray-casting But there are many other.

  5. N V Back-face elimination 1 We cannot see the back-face of solid objects: Hence, these can be ignored

  6. Back-face elimination 2 We cannot see the back-face of solid objects: Hence, these can be ignored V N

  7. Partially visible front faces Back-face elimination 3 • Object-space method • Works fine for convex polyhedra: ±50% removed • Concave or overlapping polyhedra: require additional processing • Interior of objects can not be viewed

  8. Normalized view volume front = visible pixel Depth-Buffer Algorithm 1 • Image-space method • Aka z-buffer algorithm Algorithm: Draw polygons, Remember the color most in front. yv xv zv View plane

  9. Sorting Depth-Buffer Algorithm 2 varzbuf: array[N,N] ofreal; { z-buffer: 0=near, 1=far } fbuf: array[N,N] ofcolor; { frame-buffer } For all 1<= i, j <=N do zbuf[i,j]:= 1.0; col[i,j]:= BackgroundColour; For all polygons do { scan conversion } For all covered pixels (i,j)do Calculate depth z; If z < zbuf[i,j]then { closer! } zbuf[i,j] := z; fbuf[i,j] := surfacecolor(i,j);

  10. polygon scan line y x x+1 Depth-Buffer Algorithm 3 Fast calculation z: use coherence. display

  11. Depth-Buffer Algorithm 4 + Easy to implement + Hardware supported + Polygons can be processed in arbitrary order + Fast: ~ #polygons, #covered pixels - Costs memory - Color calculation sometimes done multiple times - Transparancy is tricky

  12. END

More Related