1 / 24

Hidden Surface Removal

Hidden Surface Removal. Fall, 2011. Visibility. Surface may be back-facing Surface may be occluded Surface may overlap in the image plane Surface may intersect. Visibility Culling & Hidden Surface Removal. Determine which parts of which surfaces should be scan converted.

satya
Télécharger la présentation

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 Fall, 2011

  2. Visibility • Surface may be back-facing • Surface may be occluded • Surface may overlap in the image plane • Surface may intersect

  3. Visibility Culling & Hidden Surface Removal • Determine which parts of which surfaces should be scan converted

  4. Visibility Culling & Hidden Surface Removal • Visibility Culling • Back Face Culling • View Frustum Culling • Occlusion Culling • Hidden Surface Removal • Object space • Polygon Clipping • Depth sort • Screen space • Ray casting • Scan-line • Z-buffer • Area subdivision

  5. 3D Rendering Pipeline Somewhere in here we have to decide which objects are visible, and which objects are hidden

  6. Back-Face Culling Q: How do we test for back-facing polygons? A: Dot product of the normal and viewing direction

  7. 3D Rendering Pipeline

  8. View Frustum Culling • Do not draw polygons outside the view frustum • Accelerate checks with bounding volume hierarchies or spatial data structures (e.g., octree)

  9. Occlusion Culling • Cell & Portal

  10. Hidden Surface Removal Algorithm • Object space • Polygon Clipping • Depth sort • Screen space • Ray casting • Scan-line • Z-buffer • Area subdivision

  11. Weiler-Atherton Polygon Clipping • Clip to polygons overlapping and in front of them • Computes exact visible areas of every polygon • Way slow!

  12. Depth sort • “Painter’s algorithm” • Sort surface in order of decreasing maximum depth • Scan convert surfaces in back-to-front order

  13. 3D Rendering Pipeline

  14. BSP Tree • Binary space partition with solid cells labeled • Constructed from polygonal representations • Provides linear-time depth sort for arbitrary view

  15. Hidden Surface Removal Algorithm • Object space • Polygon Clipping • Depth sort • Screen space • Ray casting • Scan-line • Z-buffer • Area subdivision

  16. Ray Casting • Fire a ray for every pixel • If ray intersects multiple objects, take the closest

  17. Ray Casting Pipeline

  18. Z-Buffer • Color & depth of closest object for every pixel • Update only pixels whose depth is closer than in buffer • Depths are interpolated from vertices, just like colors

  19. 3D Rendering Pipeline

  20. Scan-line Algorithm • For each scan line, construct spans • Sort by depth

  21. 3D Rendering Pipeline

  22. Area Subdivision • Warnock’s algorithm • Fill area if: • All surfaces are outside area, or • Only one surface intersects area, or • One surface occludes other surfaces in area • Otherwise, subdivide

  23. 3D Rendering Pipeline

  24. Summary • Find visible surfaces • Visibility Culling • Back Face Culling • View Frustum Culling • Occlusion Culling • Hidden Surface Removal • Object space • Polygon Clipping • Depth sort • Screen space • Ray casting • Scan-line • Z-buffer • Area subdivision

More Related