from-point occlusion culling

Download From-Point Occlusion Culling

Post on 03-Feb-2016

20 views

Category:

Documents

0 download

Embed Size (px)

DESCRIPTION

From-Point Occlusion Culling. Chapter 23. Talk Outline. Image space methods Hierarchical Z-Buffer Hierarchical occlusion maps Some other methods Object space methods General methods Shadow frusta, BSP trees, temporal coherent visibility Cells and portals. - PowerPoint PPT Presentation

TRANSCRIPT

  • From-Point Occlusion CullingChapter 23

    SIGGRAPH 2000, New Orleans

  • Talk Outline Image space methodsHierarchical Z-BufferHierarchical occlusion mapsSome other methodsObject space methodsGeneral methodsShadow frusta, BSP trees, temporal coherent visibilityCells and portals

    SIGGRAPH 2000, New Orleans

  • What Methods are Called Image-Space?Those where the decision to cull or render is done after projection (in image space)View volumeObject space hierarchyDecision to cull

    SIGGRAPH 2000, New Orleans

  • Ingredients of an Image Space MethodAn object space data structure that allows fast queries to the complex geometrySpace partitioningHierarchical bounding volumesRegular grid

    SIGGRAPH 2000, New Orleans

  • An Image Space Representation of the Occlusion Information

    DiscreteZ-hierarchyOcclusion map hierarchyContinuous BSP treeImage space extends

    SIGGRAPH 2000, New Orleans

  • General Outline of Image Space MethodsDuring the in-order traversal of the scene hierarchy do:compare each node against the view volumeif not culled, test node for occlusion if still not culled, render objects/occluders augmenting the image space occlusionMost often done in 2 passesrender occluders create occlusion structuretraverse hierarchy and classify/render

    SIGGRAPH 2000, New Orleans

  • Testing a Node for OcclusionIf the box representing a node is not visible then nothing in it is eitherThe faces of the box are projected onto the image plane and tested for occlusionoccluderhierarchicalrepresentation

    SIGGRAPH 2000, New Orleans

  • Testing a Node for OcclusionIf the box representing a node is not visible then nothing in it is eitherThe faces of the box are projected onto the image plane and tested for occlusionoccluderhierarchicalrepresentation

    SIGGRAPH 2000, New Orleans

  • Hierarchical Test

    SIGGRAPH 2000, New Orleans

  • Differences of AlgorithmsThe most important differences between the various approaches are: the representation of the (augmented) occlusion in image space and, the method of testing the hierarchy for occlusion

    SIGGRAPH 2000, New Orleans

  • Hierarchical Z-Buffer (HZB) (Greene and Kass, SIG 93)An extension of the Z-buffer VSD algorithm It follows the outline described aboveScene is arranged into an octree which is traversed top-to-bottom and front-to-backDuring rendering the Z-pyramid (the occlusion representation) is incrementally builtOctree nodes are compared against the Z-pyramid for occlusion

    SIGGRAPH 2000, New Orleans

  • The Z-PyramidThe content of the Z-buffer is the finest level in the pyramidCoarser levels are created by grouping together four neighbouring pixels and keeping the largest z-valueThe coarsest level is just one value corresponding to overall max z

    SIGGRAPH 2000, New Orleans

  • The Z-PyramidObjects arerenderedDepth takenfrom the z-bufferConstruct pyramid by taking max of each 4= furthest= closer= closest

    SIGGRAPH 2000, New Orleans

  • Using The Z-Pyramid= furthest= closer= closest

    SIGGRAPH 2000, New Orleans

  • Maintaining the Z-PyramidIdeally every time an object is rendered causing a change in the Z-buffer, this change is propagated through the pyramidHowever this is not a practical approach

    SIGGRAPH 2000, New Orleans

  • More Realistic ImplementationMake use of frame to frame coherenceat start of each frame render the nodes that were visible in previous frameread the z-buffer and construct the z-pyramid now traverse the octree using the z-pyramid for occlusion but without updating it

    SIGGRAPH 2000, New Orleans

  • HZB: DiscussionIt provides good acceleration in very dense scenesGetting the necessary information from the Z-buffer is costly A hardware modification was proposed for making it real-time

    SIGGRAPH 2000, New Orleans

  • Hierarchical Occlusion Maps (Zhang et al, SIG 97)Similar idea to HZB butthey separate the coverage information from the depth information, two data structureshierarchical occlusion mapsdepth (several proposals for this)Two passesrender occluders and build HOMrender scene hierarchy using HOM to cull

    SIGGRAPH 2000, New Orleans

  • What is the Occlusion Map Pyramid?A hierarchy of occlusion maps (HOM)At the finest level its just a bit map with 1 where it is transparent and 0 where it is opaque (ie occluded)Higher levels are half the size in each dimension and store gray-scale valuesRecords average opacities for blocks of pixelsRepresents occlusion at multiple resolutions

    SIGGRAPH 2000, New Orleans

  • Occlusion Map Pyramid64 x 6432 x 3216 x 16

    SIGGRAPH 2000, New Orleans

  • How is the HOM Computed?Clear the buffer to blackRender the occluders in pure white (no lighting, textures etc)The contents of the buffer form the finest level of the HOMHigher levels are created by recursive averaging (low-pass filtering) Construction accelerated by hardware - bilinear interpolation or texture maps / mipmaps

    SIGGRAPH 2000, New Orleans

  • Occlusion Map Pyramid

    SIGGRAPH 2000, New Orleans

  • Overlap TestsTo test if the projection of a polygon is occludedfind the finest-level of the pyramid whose pixel covers the image-space box of the polygonif fully covered then continue with depth testelse descend down the pyramid until a decision can be made

    SIGGRAPH 2000, New Orleans

  • Resolving DepthEither: a single plane at furthest point of occludersOr: uniform subdivision of image with separate depth at each partition

    Or even: just the Z-buffercontent

    SIGGRAPH 2000, New Orleans

  • Aggressive Approximate Culling

    SIGGRAPH 2000, New Orleans

  • HP Hardware implementationBefore rendering an object, scan-convert its bounding boxSpecial purpose hardware are used to determine if any of the covered pixels passed the z-testIf not the object is occluded

    SIGGRAPH 2000, New Orleans

  • Occluder Shadows (Wonka et al, EG 99)

    SIGGRAPH 2000, New Orleans

  • Occluder Shadows

    SIGGRAPH 2000, New Orleans

  • Simplified Occlusion MapRead top half of the buffer to use as an occlusion mapProject top of cell to image spaceSimplify projection to a lineTest if any pixel along line is visible

    SIGGRAPH 2000, New Orleans

  • Discussion on Image SpaceAdvantages (not for all methods)hardware accelerationgenerality (anything that can be rendered can be used as an occluder)robustness, ease of programmingoption of approximate cullingDisadvantageshardware requirementsoverheads

    SIGGRAPH 2000, New Orleans

  • Object Space MethodsVisibility culling with large occludersHudson et al, SoCG 97Bittner et al, CGI 98Coorg and Teller, SoCG 96 and I3D 97Cells and portals Teller and Sequin, Siggraph 91Luebke and Georges, I3D 95

    SIGGRAPH 2000, New Orleans

  • Occlusion Using Shadow Frusta(Hudson et al, SoCG 97)CBAViewpointOccluder

    SIGGRAPH 2000, New Orleans

  • Assuming we can Find Good OccludersFor each frameform shadow volumes from likely occludersdo view-volume cull and shadow-volume occlusion test in one pass across the spatial sub-division of the scene each cell of the sub-division is tested for inclusion in view-volume and non-inclusion in each shadow volume

    SIGGRAPH 2000, New Orleans

  • Occluder TestTraverse the scene hierarchy top downOverlap test (cell to shadow volume) is performed in 2Dwhen the hierarchy uses an axis-aligned scheme (eg kd-trees, bounding boxes etc) then a very efficient overlap test is presented

    SIGGRAPH 2000, New Orleans

  • Occlusion Trees (Bittner et al, CGI 98)Just as beforescene represented by a hierarchy (kd-tree)for each viewpointselect a set of potential occluderscompare the scene hierarchy for occlusionHowever, unlike the previous methodthe occlusion is accumulated into a binary treethe scene hierarchy is compared for occlusion against the tree

    SIGGRAPH 2000, New Orleans

  • Create shadow volume of occluder 1ViewpointO1O2Tree12O112

    SIGGRAPH 2000, New Orleans

  • Insert occluder 2 and augment tree with its shadow volumeViewpointO1O2Tree12O1out34O21234

    SIGGRAPH 2000, New Orleans

  • And so on until all occluders are addedViewpointO1O2Tree12O1out123456O3O4

    SIGGRAPH 2000, New Orleans

  • Check occlusion of objects T1 and T2 by inserting them in treeViewpointO1O2Tree12O1out123456O3T1T2

    SIGGRAPH 2000, New Orleans

  • Occluder selectionThis is a big issue relevant to most occlusion culling algorithms but particularly to the last twoAt pre-processing Identify likely occluders for a cell they subtend a large solid-angle Test likely occluders use a sample of viewpoints and compute actual shadow volumes resultingAt run timelocate the viewpoint in the hierarchy and use the occluders associated with that node

    SIGGRAPH 2000, New Orleans

  • Metric for Comparing Occluder Quality

    Occluder quality: (-A *(N V)) / ||D||2 A : the occluders areaN : normal V : viewing directionD : the distance between the viewpoint and the occluder center

    SIGGRAPH 2000, New Orleans

  • Cells and Portals(Teller and Sequin, SIG 91) Decompose space into convex cellsFor each cell, identify its boundary edges into two sets: opaque or portalPrecompute visibility among cellsDuring viewing (eg, walkthrough phase), use the precomputed potentially visible polygon set (PVS) of each cell to speed-up rendering

    SIGGRAPH 2000, New Orleans

  • Determining Adjacent Information

    SIGGRAPH 2000, New Orleans

  • For Each Cell Find Stabbing Tree

    SIGGRAPH 2000, New Orleans

  • Comp

Recommended

View more >