visibility culling

Post on 22-Feb-2016

33 views

Category:

Documents

Tags:

• portal sequences

Embed Size (px)

DESCRIPTION

Visibility Culling. David Luebke Computer Science Department University of Virginia . Motivation. Like most other rendering acceleration techniques, the goal is to avoid rendering redundant geometry The basic idea: don’t render what can’t be seen - PowerPoint PPT Presentation

TRANSCRIPT

• Visibility CullingDavid LuebkeComputer Science DepartmentUniversity of Virginia

• MotivationLike most other rendering acceleration techniques, the goal is to avoid rendering redundant geometryThe basic idea: dont render what cant be seenOff-screen: view-frustum cullingOccluded by other objects: occlusion culling

• MotivationThe obvious question: why bother?Off-screen geometry: solved by clippingOccluded geometry: solved by Z-bufferThe (obvious) answer: efficiencyClipping and Z-buffering take time linear to the number of primitives

• The GoalOur goal: quickly eliminate large portions of the scene which will not be visible in the final imageNot the exact visibility solution, but a quick-and-dirty conservative estimate of which primitives might be visibleZ-buffer& clip this for the exact solutionThis conservative estimate is called the potentially visible set or PVS

• Visibility CullingThe remainder of this talk will cover:View-frustum culling (briefly)Occlusion culling in architectural environments General occlusion culling

• View-Frustum CullingAn old idea (Clark 76):Organize primitives into clumpsBefore rendering the primitives in a clump, test a bounding volume against the view frustumIf the clump is entirely outside the view frustum, dont render any of the primitivesIf the clump intersects the view frustum, add to PVS and render normally

• Efficient View-Frustum CullingHow big should the clumps be?Choose minimum size so: cost testing bounding volume
• Efficient View-Frustum CullingWhat shape should bounding volumes be?Spheres and axis-aligned bounding boxes: simple to calculate, cheap to testOriented bounding boxes converge asymptotically faster in theoryLots of other volumes have been proposedCapsules, ellipsoids, k-DOPsbut most use spheres or AABBs.

• Cells & PortalsGoal: walk through architectural models (buildings, cities, catacombs)These divide naturally into cellsRooms, alcoves, corridors Transparent portals connect cellsDoorways, entrances, windows

Notice: cells only see other cells through portals

• Cells & PortalsAn example:

• Cells & PortalsIdea: Cells form the basic unit of PVSCreate an adjacency graph of cellsStarting with cell containing eyepoint, traverse graph, rendering visible cells A cell is only visible if it can be seen through a sequence of portalsSo cell visibility reduces to testing portal sequences for a line of sight

• Cells & PortalsView-independent solution: find all cells a particular cell could possibly see:

C can only see A, D, E, and HADHE

• Cells & PortalsView-independent solution: find all cells a particular cell could possibly see: