Visibility Culling III: Image-Space Occlusion David Luebke Computer Science Department University of Virginia

Slides:



Advertisements
Similar presentations
Christian Lauterbach COMP 770, 2/16/2009. Overview  Acceleration structures  Spatial hierarchies  Object hierarchies  Interactive Ray Tracing techniques.
Advertisements

N-Buffers for efficient depth map query Xavier Décoret Artis GRAVIR/IMAG INRIA.
Visibility Culling David Luebke Computer Science Department University of Virginia
Visibility in Games Harald Riegler. 2 / 18 Visibility in Games n What do we need it for? u Increase of rendering speed by removing unseen scene data from.
David Luebke5/11/2015 CS 551 / 645: Introductory Computer Graphics David Luebke
Two Methods for Fast Ray-Cast Ambient Occlusion Samuli Laine and Tero Karras NVIDIA Research.
Occlusion Culling Fall 2003 Ref: GamasutraGamasutra.
Visibility Culling. Back face culling View-frustrum culling Detail culling Occlusion culling.
Visibility Culling Back face culling View-frustrum culling Detail culling Occlusion culling.
Visibility Culling using Hierarchical Occlusion Maps Hansong Zhang, Dinesh Manocha, Tom Hudson, Kenneth E. Hoff III Presented by: Chris Wassenius.
Object-Space Visibility Culling Anthony Steed University College London Based upon material presented by Claudio T. Silva at Eurographics 1999 Slides,
Chapter 6: Vertices to Fragments Part 2 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley Mohan Sridharan Based on Slides.
Tomas Mőller © 2000 Speeding up your game The scene graph Culling techniques Level-of-detail rendering (LODs) Collision detection Resources and pointers.
Shadow Silhouette Maps Pradeep Sen, Mike Cammarano, Pat Hanrahan Stanford University.
Parallel Occlusion Culling for Interactive Walkthrough using Multiple GPUs Naga K Govindaraju, Avneesh Sud, Sun-Eui Yoon, Dinesh Manocha University of.
Image-Based Techniques Hierarchical Image Caching Michael Chung.
1 From-Point Occlusion Culling From-Point Occlusion Culling Chapter 23.
Hidden Surface Removal
1 Occlusion Culling ©Yiorgos Chrysanthou, , Anthony Steed, 2004.
Roger A. Crawfis CIS 781 The Ohio State University
Afrigraph 2004 Massive model visualization Tutorial A: Part I Rasterization Based Approaches Andreas Dietrich Computer Graphics Group, Saarland University.
NVIDIA PROPRIETARY AND CONFIDENTIAL Occlusion (HP and NV Extensions) Ashu Rege.
Visibility Queries Using Graphics Hardware Presented by Jinzhu Gao.
The Visibility Problem In many environments, most of the primitives (triangles) are not visible most of the time –Architectural walkthroughs, Urban environments.
Culling Techniques “To cull” means “to select from group” In graphics context: do not process data that will not contribute to the final image The “group”
Visibility Culling David Luebke Computer Science Department University of Virginia
C O M P U T E R G R A P H I C S Guoying Zhao 1 / 14 C O M P U T E R G R A P H I C S Guoying Zhao 1 / 14 Going-through.
Week 2 - Friday.  What did we talk about last time?  Graphics rendering pipeline  Geometry Stage.
Computer Graphics 2 Lecture 8: Visibility Benjamin Mora 1 University of Wales Swansea Pr. Min Chen Dr. Benjamin Mora.
Real-Time Rendering SPEEDING UP RENDERING Lecture 04 Marina Gavrilova.
Visible-Surface Detection Jehee Lee Seoul National University.
Visibility III: Occlusion Queries CS 446: Real-Time Rendering & Game Technology David Luebke University of Virginia.
Visibility Culling II: Beyond Cells & Portals David Luebke Computer Science Department University of Virginia
Occlusion Query. Content Occlusion culling Collision detection (convex) Etc. Fall
2 COEN Computer Graphics I Evening’s Goals n Discuss application bottleneck determination n Discuss various optimizations for making programs execute.
Real-time Graphics for VR Chapter 23. What is it about? In this part of the course we will look at how to render images given the constrains of VR: –we.
1Computer Graphics Implementation II Lecture 16 John Shearer Culture Lab – space 2
Implementation II Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
Implementation II.
1 Visiblity: Culling and Clipping Computer Graphics COMP 770 (236) Spring 2009 January 21 & 26: 2009.
David Luebke11/26/2015 CS 551 / 645: Introductory Computer Graphics David Luebke
10/07/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Spatial data structures.
04/23/03© 2003 University of Wisconsin Where We’ve Been Photo-realistic rendering –Accurate modeling and rendering of light transport and surface reflectance.
CSCE 552 Spring D Models By Jijun Tang. Triangles Fundamental primitive of pipelines  Everything else constructed from them  (except lines and.
Recap: General Occlusion Culling l When cells and portals don’t work… –Trees in a forest –A crowded train station l Need general occlusion culling algorithms:
Coherent Hierarchical Culling: Hardware Occlusion Queries Made Useful Jiri Bittner 1, Michael Wimmer 1, Harald Piringer 2, Werner Purgathofer 1 1 Vienna.
Ray Tracing Fall, Introduction Simple idea  Forward Mapping  Natural phenomenon infinite number of rays from light source to object to viewer.
Visibility II CS 446: Real-Time Rendering & Game Technology
Computer Graphics I, Fall 2010 Implementation II.
Honours Graphics 2008 Session 5. Today’s focus Rasterization Visibility determination Coarse / fine visibility determination.
DPL2/10/2016 CS 551/651: Final Review David Luebke
1 CSCE 441: Computer Graphics Hidden Surface Removal Jinxiang Chai.
Shadows David Luebke University of Virginia. Shadows An important visual cue, traditionally hard to do in real-time rendering Outline: –Notation –Planar.
Hierarchical Occlusion Map Zhang et al SIGGRAPH 98.
Computer Graphics Inf4/MSc 1 Computer Graphics Lecture 5 Hidden Surface Removal and Rasterization Taku Komura.
David Luebke 3/5/2016 Advanced Computer Graphics Lecture 4: Faster Ray Tracing David Luebke
Engine Basics: Optimizing Geometry CS 446: Real-Time Rendering & Game Technology David Luebke University of Virginia.
Occlusion Culling David Luebke University of Virginia.
CS 445: Introduction to Computer Graphics David Luebke University of Virginia Visibility Calculations and Occlusion Culling.
CHC ++: Coherent Hierarchical Culling Revisited Oliver Mattausch, Jiří Bittner, Michael Wimmer Institute of Computer Graphics and Algorithms Vienna University.
Visible-Surface Detection Methods. To identify those parts of a scene that are visible from a chosen viewing position. Surfaces which are obscured by.
7/17/98 HZ Hierarchical Occlusion Maps stolen by Dave Luebke from the Ph.D. Defense presentation of: Hansong Zhang Department of Computer Science UNC-Chapel.
Computer Graphics Implementation II
Week 2 - Friday CS361.
CSCE 441: Computer Graphics Hidden Surface Removal
Implementation II Ed Angel Professor Emeritus of Computer Science
Conservative Visibility Preprocessing using Extended Projections Frédo Durand, George Drettakis, Joëlle Thollot and Claude Puech iMAGIS-GRAVIR/IMAG-INRIA.
CS 551 / 645: Introductory Computer Graphics
Introduction to Computer Graphics with WebGL
Implementation II Ed Angel Professor Emeritus of Computer Science
Presentation transcript:

Visibility Culling III: Image-Space Occlusion David Luebke Computer Science Department University of Virginia

D2 Review: General Occlusion Culling When cells and portals don’t work…When cells and portals don’t work… –Trees in a forest –A crowded train station Need general occlusion culling algorithms:Need general occlusion culling algorithms: –Aggregate occlusion –Dynamic scenes –Non-polygonal scenes

D3 Review: Hierarchical Z-Buffer A Z-pyramid represents depth buffer in hierarchical fashionA Z-pyramid represents depth buffer in hierarchical fashion –Depth at each pixel at a given level represents the max of the depth of the four corresponding pixels at next level –Rasterize triangles into buffer hierarchically with early termination

D4 Review: Hierarchical Z-Buffer Organize scene into an octree (a kind of spatial hierarchy)Organize scene into an octree (a kind of spatial hierarchy) –Before rendering the polygons associated with a node in the octree, test if the node’s bbox is visible –Do an occlusion query to “test render” the faces of the bounding box against the depth-buffer –If query fails, bbox would not be visible and we can skip the node’s geometry

D5 Review: Hierarchical Z-Buffer HZB algorithm is most effective when Z-pyramid is “mostly complete”HZB algorithm is most effective when Z-pyramid is “mostly complete” –Start by rendering nodes visible last frame directly into full-res Z-buffer –Build Z-pyramid from full-res Z-buffer –Traverse octree front-to-back, using Z-query to test nodes and render if needed Note: also test nodes already rendered to see if they have become invisible Note: also test nodes already rendered to see if they have become invisible

D6 Review: Hierarchical Z-Buffer HZB algorithm exploits:HZB algorithm exploits: – Image-space coherence : Polygons occluded in one pixel are probably occluded in nearby pixels Polygons occluded in one pixel are probably occluded in nearby pixels – Object-space coherence: Polygons near an occluded polygon are probably also occluded Polygons near an occluded polygon are probably also occluded – Temporal coherence: Polygons visible recently are probably still visible Polygons visible recently are probably still visible

D7 Hierarchical Occlusion Maps A more hardware-friendly general occlusion culling algorithmA more hardware-friendly general occlusion culling algorithm Two major differences from HZB:Two major differences from HZB: –Separates occluders from occludees –Decouples occlusion test into an depth test and a overlap test

D8 Hierarchical Occlusion Maps Occluders versus occludees:Occluders versus occludees: Blue parts: occluders Red parts: occludees

D9 Hierarchical Occlusion Maps Depth versus overlap:Depth versus overlap: View Point Z X Y Depth + Overlap = Occlusion Depth + Overlap = Occlusion

D10 Hierarchical Occlusion Maps Representation of projection for overlap test: occlusion mapRepresentation of projection for overlap test: occlusion map –Corresponds to a screen subdivision –Records average opacity per partition Generate by rendering occludersGenerate by rendering occluders –Record pixel opacities (i.e., coverage)

D11 Rendered Image Occlusion Map Occlusion Maps

D12 Occlusion Map Pyramid Analyzing cumulative projection:Analyzing cumulative projection: –A hierarchical occlusion map (HOM) –Generate by recursive averaging (once per frame) –Records average opacities for blocks of multiple pixels, representing occlusion at multiple resolutions –Construction can be accelerated by texture hardware

D13 Occlusion Map Pyramid 64 x 6432 x 3216 x 16

D14 Occlusion Map Pyramid

D15 Overlap Tests Query: is projection of occludee inside cumulative projection of occluders?Query: is projection of occludee inside cumulative projection of occluders? –Cumulative projection: occlusion pyramid –Occludee projection: expensive in general Overestimate occludee with 3-D bounding box Overestimate occludee with 3-D bounding box Overestimate projection of 3-D bounding box with 2-D bounding rectangle in screen-space Overestimate projection of 3-D bounding box with 2-D bounding rectangle in screen-space

D16 Overlap Tests Hierarchical structure enables some optimizations:Hierarchical structure enables some optimizations: –Predictive rejection Terminate test when it must fail later Terminate test when it must fail later –Conservative rejection The transparency threshold The transparency threshold –Aggressive Approximate Culling Ignore objects barely visible through holes Ignore objects barely visible through holes The opacity threshold The opacity threshold

D17 Aggressive Approximate Culling

D18 Hierarchical Occlusion Maps Not discussed here:Not discussed here: –Depth test Depth estimation buffer Depth estimation buffer Modified Z-buffer Modified Z-buffer –Selecting occluders For more details, see Hansong Zhang’s dissertation at UNCFor more details, see Hansong Zhang’s dissertation at UNC

D19 HOM: Discussion Provides a robust, general, hardware- friendly occlusion culling algorithmProvides a robust, general, hardware- friendly occlusion culling algorithm –Supports dynamic scenes –Supports non-polygonal geometry –Few hardware assumptions

D20 HOM: Discussion Not clear how relevant the actual algorithm is on modern hardwareNot clear how relevant the actual algorithm is on modern hardware Most interesting/important points:Most interesting/important points: –Separation of occluders and occludees –Factoring occlusion into overlap + depth –Aggressive approximate culling To think about:To think about: –How could we simplify the occluders to accelerate occlusion testing?

D21 Current Hardware Support Recent hardware supports Z-query operationRecent hardware supports Z-query operation –Allows systems to exploit: Object-space coherence (bounding boxes) Object-space coherence (bounding boxes) Temporal coherence (last-rendered list) Temporal coherence (last-rendered list) –Examples in OpenGL: HP_OCCLUSION_QUERY HP_OCCLUSION_QUERY NV_OCCLUSION_QUERY NV_OCCLUSION_QUERY Go to NVIDIA occlusion presentation… Go to NVIDIA occlusion presentation… –An aside: applies to cell-portal culling!

D22 Visibility Culling: Discussion When is visibility culling worthwhile? When is visibility culling worthwhile? –When scene has high depth complexity Examples: architectural walkthroughs, complex CAD assemblies, dense forest Examples: architectural walkthroughs, complex CAD assemblies, dense forest Non-examples: terrain (usually), single highly- tessellated object (e.g., bunny, a radiositized room) Non-examples: terrain (usually), single highly- tessellated object (e.g., bunny, a radiositized room)

D23 Visibility Culling: Discussion How does visibility culling compare to: How does visibility culling compare to: –Level-of-detail: Reduces geometry processing Reduces geometry processing Helps transform-bound apps Helps transform-bound apps –Visibility culling: Reduces geometry and pixel processing Reduces geometry and pixel processing Helps transform- and fill rate-bound apps Helps transform- and fill rate-bound apps –Texture / Image representations: Reduces geometry and pixel processing Reduces geometry and pixel processing Incurs texture/image processing costs Incurs texture/image processing costs

D24 Visibility Culling: Discussion How does visibility culling interact with level of detail? How does visibility culling interact with level of detail? –Fairly seamless integration; generally a win –One issue: visibility of simplified model may differ from original model; requires some care –LODs can speed up occluder selection and rendering

D25 Visibility Culling: Discussion How does visibility culling interact with texture and image-based representations? How does visibility culling interact with texture and image-based representations? –Texture/image reps generally replace far-field geometry Involves an implicit occlusion culling step Involves an implicit occlusion culling step Reduces scene depth complexity, decreasing the utility of visibility culling Reduces scene depth complexity, decreasing the utility of visibility culling If near-field geometry still includes complex heavily- occlusive assemblies, still a win If near-field geometry still includes complex heavily- occlusive assemblies, still a win

D26 Visibility Culling: Discussion How much culling effort is appropriate? How much culling effort is appropriate? –Cells and portals: relatively cheap, with large potential speedups –Hierarchical occlusion maps: relatively costly, carefully weigh potential gains –Multiple processors allow much more aggressive culling calculation Pipelining culling calculations, Performer-style, allows cull time = render time Pipelining culling calculations, Performer-style, allows cull time = render time Tradeoff: one frame increased latency Tradeoff: one frame increased latency

D27 Summary The basic, very powerful idea:The basic, very powerful idea: –Rapidly compute a potentially visible set –Let hardware handle the rest For many scenes, visibility culling is a simple way to get huge speedupsFor many scenes, visibility culling is a simple way to get huge speedups –View-frustum culling always a must –For scenes with high depth complexity, occlusion culling can be a big win

D28 Summary Architectural models: visibility is practically a solved problemArchitectural models: visibility is practically a solved problem –Cells and portals work well Cull-box portal culling: simple, fast Cull-box portal culling: simple, fast Line-stabbing: elegant, powerful Line-stabbing: elegant, powerful

D29 Summary Occlusion culling of general models: still a largely open problemOcclusion culling of general models: still a largely open problem –Important issues: Dynamic scenes Dynamic scenes Aggregate occlusion effects Aggregate occlusion effects –Image-based approaches seem most promising at this time

D30 Summary General occlusion culling algorithms:General occlusion culling algorithms: –Hierarchical Z-buffer: A simple, truly elegant algorithm A simple, truly elegant algorithm But doesn’t seem amenable to hardware But doesn’t seem amenable to hardware –Hierarchical occlusion maps: Separates occluders from occludees, overlap from depth Separates occluders from occludees, overlap from depth Lends itself well to aggressive culling Lends itself well to aggressive culling Fairly high overhead, only worthwhile with high depth complexity Fairly high overhead, only worthwhile with high depth complexity –Recent hardware supports (asynchronous) occlusion query