Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Occlusion Culling ©Yiorgos Chrysanthou, 1999-2001, Anthony Steed, 2004.

Similar presentations


Presentation on theme: "1 Occlusion Culling ©Yiorgos Chrysanthou, 1999-2001, Anthony Steed, 2004."— Presentation transcript:

1 1 Occlusion Culling ©Yiorgos Chrysanthou, 1999-2001, Anthony Steed, 2004

2 2 Overview n Graphics Pipeline Problems Speed up techniques n Occlusion Culling Image-based Object-based

3 3 What’s wrong with the standard graphics pipeline? n It processes every polygon therefore it does not scale Sometimes polygons than pixels Pixels are being drawn multiple times n According to the statistics, the size of the average 3D model grows more than the processing power

4 4 Speed Up Techniques n Roughly three classes: Visibility culling –Avoid processing anything that will not be visible in (and thus not contribute to) the final image Levels of detail –Generate several representations for complex objects are use the simplest that will give adequate visual result from a given viewpoint Image based rendering –Replace complex geometry with a texture

5 5 The Visibility Problem n Select the (exact?) set of polygons from the model which are visible from a given viewpoint n Average number of polygons, visible from a viewpoint, is much smaller than the model size

6 6 Visibility Culling n Avoid rendering polygons or objects not contributing to the final image n We have three different cases of non-visible objects: those outside the view volume (view volume culling) those which are facing away from the user (back face culling) those occluded behind other visible objects (occlusion culling)

7 7 Visibility Culling

8 8 View Volume Culling n If a spatial subdivision exists, it can be used for view volume culling

9 9 Occlusion Culling n Image-space methods Generally analyse the partially completed image to determine whether or not to render complete objects n Object-space methods Provide methods for determining if sections of the model need rendering due to what can be seen in the view volume n A very active topic of research in last 5 years, so there are many, many techniques

10 10 Image-Based Occlusion n Occlusion maps If you can order the polygons front to back, then the image on the screen tells you areas which are obscured If, e.g. we find that one quarter of the screen is covered then we need not render anything in that quarter The problem devolves to finding good occluders, and occludees

11 11 Testing for Occlusion n If the box surrounding a node is not visible then nothing in it is either n The faces of the box are projected onto the image plane and tested for occlusion occluder

12 12 In Image Space n Render some set of objects as normal (foreground) n Read the image back n For other objects Find bounding box Test if those pixels covered yet or not

13 13 In Practice n Reading back the image is very slow with current graphics hardware n Fortunately recent graphics hardware can do occlusion queries for you Instead of rendering it tells you whether or not any pixels would be drawn n Of course have to make sure that doing the occlusion test is no more expensive that rendering the actual object!

14 14 Cells and Portals (Teller and Sequin, SIGGRAPH 91) n Decompose space into convex cells n For each cell, identify its boundary edges into two sets: opaque or portal n Precompute visibility among cells n During viewing (eg, walkthrough phase), use the precomputed potentially visible polygon set (PVS) of each cell to speed-up rendering

15 15 Determining Adjacency Information

16 16 For Each Cell Find Stabbing Tree

17 17 Compute Cell Visible From Each Cell SL  0,  L  L SR  0,  R  R Linear programming problem: Find_Visible_Cells(cell C, portal sequence P, visible cell set V) V=V  C for each neighbor N of C for each portal p connecting C and N orient p from C to N P’ = P concatenate p if Stabbing_Line(P’) exists then Find_Visible_Cells (N, P’, V)

18 18 Eye-to-Cell Visibility n A cell is visible if cell is in VV all cells along stab tree are in VV all portals along stab tree are in VV sightline within VV exists through portals n The eye-to-cell visibility of any observer is a subset of the cell-to-cell visibility for the cell containing the observer

19 19 Image Space Cells and Portals (Luebke and Georges, I3D 95) n Instead of pre-processing all the PVS calculation, it is possible to use image-space portals to make the computation easier n Can be used in a dynamic setting

20 20 Top View Showing the Recursive Clipping of the View Volume

21 21 Summary n Faster hardware encourages big models n Real-time is maintained by visibility culling, level of detail, image-based rendering n Occlusion, part of visibility culling relies on either Being able to identify good occluders (image-based occlusion) Being able to structure the model to allow analytic solutions (object-based occlusion)


Download ppt "1 Occlusion Culling ©Yiorgos Chrysanthou, 1999-2001, Anthony Steed, 2004."

Similar presentations


Ads by Google