CS 551 / 645: Introductory Computer Graphics

Slides:



Advertisements
Similar presentations
Visible-Surface Detection(identification)
Advertisements

Collisions and Intersections When objects move, test for collision. When projecting surfaces, check for intersections. (Many slides adapted from Amitabh.
CS 352: Computer Graphics Chapter 7: The Rendering Pipeline.
Ray Tracing CMSC 635. Basic idea How many intersections?  Pixels  ~10 3 to ~10 7  Rays per Pixel  1 to ~10  Primitives  ~10 to ~10 7  Every ray.
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
Occlusion Culling Fall 2003 Ref: GamasutraGamasutra.
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.
Vertices and Fragments I CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
Tomas Mőller © 2000 Speeding up your game The scene graph Culling techniques Level-of-detail rendering (LODs) Collision detection Resources and pointers.
Image-Based Techniques Hierarchical Image Caching Michael Chung.
1 From-Point Occlusion Culling From-Point Occlusion Culling Chapter 23.
02/04/03 Page 1 Rendering Visibility Lighting Texturing.
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.
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
Computer Graphics 2 Lecture 8: Visibility Benjamin Mora 1 University of Wales Swansea Pr. Min Chen Dr. Benjamin Mora.
Visibility Culling III: Image-Space Occlusion David Luebke Computer Science Department University of Virginia
Real-Time Rendering SPEEDING UP RENDERING Lecture 04 Marina Gavrilova.
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
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.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 7. Speed-up Techniques Presented by SooKyun Kim.
Graphics Interface 2009 The-Kiet Lu Kok-Lim Low Jianmin Zheng 1.
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.
COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 29, 2015 RENDERING RASTERIZATION RAY CASTING PROGRAMMABLE SHADERS.
DPL2/10/2016 CS 551/651: Final Review David Luebke
1 CSCE 441: Computer Graphics Hidden Surface Removal Jinxiang Chai.
Hierarchical Occlusion Map Zhang et al SIGGRAPH 98.
David Luebke 3/5/2016 Advanced Computer Graphics Lecture 4: Faster Ray Tracing David Luebke
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.
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.
Scene Manager Creates and places movable objects like lights and cameras so as to access them efficiently, e.g. for rendering. Loads and assembles world.
Computer Graphics Implementation II
Week 2 - Monday CS361.
Real-Time Soft Shadows with Adaptive Light Source Sampling
Week 2 - Friday CS361.
Today Visibility Overview Cell-to-Cell Cell-to-Region Eye-To-Region
The Graphics Rendering Pipeline
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.
UMBC Graphics for Games
Introduction to Computer Graphics with WebGL
Anti-aliased and accelerated ray tracing
Implementation II Ed Angel Professor Emeritus of Computer Science
Presentation transcript:

CS 551 / 645: Introductory Computer Graphics General Occlusion Culling David Luebke 2/24/2019

Administrivia Questions on assignment 4? Class Thursday: guest lecture by Professor Brogan David Luebke 2/24/2019

Recap: Cells & Portals An example: David Luebke 2/24/2019

Recap: Cells & Portals A D E F B C G H A E B C D F G H

Recap: Cells & Portals A D E F B C G H A E B C D F G H

Recap: Cells & Portals A D E F B C G H A E B C D F G H

Recap: Cells & Portals A D E F B C G H A E B C D F G H

Recap: Cells & Portals A D E F B C G H A E B C D F G H

Recap: Cells & Portals A D E ? F B C G H A E B C D F G ? H

Recap: Cells & Portals A D E X F B C G H A E B C D F G X H

Recap: Cells & Portals View-independent solution: find all cells a particular cell could possibly see: C can only see A, D, E, and H A D H F C B E G A D E H

Recap: Cells and Portals Good solution for most architectural or urban models Use the simplest algorithm that suffices for your needs: pfPortals-style algorithm: view-dependent solution, reasonably tight PVS, no preprocess necessary Teller-style algorithm: tighter PVS, somewhat more complex, can provide view-independent solution for prefetching David Luebke 2/24/2019

General Occlusion Culling When cells and portals don’t work… Trees in a forest A crowded train station Need general occlusion culling algorithms: Aggregate occlusion Dynamic scenes Non-polygonal scenes (?) David Luebke 2/24/2019

General Occlusion Culling I’ll discuss two algorithms: Hierarchical Z-Buffer Ned Greene, SIGGRAPH 93 Hierarchical Occlusion Maps Hansong Zhang, SIGGRAPH 97 David Luebke 2/24/2019

Hierarchical Z-Buffer Replace Z-buffer with a Z-pyramid Lowest level: full-resolution Z-buffer Higher levels: each pixel represents the maximum depth of the four pixels “underneath” it Basic idea: hierarchical rasterization of the polygon, with early termination where polygon is occluded David Luebke 2/24/2019

Hierarchical Z-Buffer Idea: test polygon against highest level first If polygon is further than distance recorded in pixel, stop--it’s occluded If polygon is closer, recursively check against next lower level If polygon is visible at lowest level, set new distance value and propagate up David Luebke 2/24/2019

Hierarchical Z-Buffer Z-pyramid exploits image-space coherence: Polygon occluded in a pixel is probably occluded in nearby pixels HZB also exploits object-space coherence Polygons near an occluded polygon are probably occluded David Luebke 2/24/2019

Hierarchical Z-Buffer Exploiting object-space coherence: Subdivide scene with an octree All geometry in an octree node is contained by a cube Before rendering the contents of a node, “render” the faces of its cube (query the Z-pyramid) If cube faces are occluded, ignore the entire node David Luebke 2/24/2019

Hierarchical Z-Buffer HZB can exploit temporal coherence Most polygons affecting the Z-buffer last frame will affect Z-buffer this frame HZB also operates at max efficiency when Z-pyramid already built So start each frame by rendering octree nodes visible last frame David Luebke 2/24/2019

Hierarchical Z-Buffer: Discussion HZB needs hardware support to be really competitive Hardware vendors haven’t bought in: Z-pyramid (and hierarchies in general) unfriendly to hardware Unpredictable Z-query times generate bubbles in rendering pipe But there is a promising trend… David Luebke 2/24/2019

Hierarchical Z-Buffer Hardware beginning to support Z-query operation Allows systems to exploit: Object-space coherence (bounding boxes) Temporal coherence (last-rendered list) Systems I’m aware of: HP Visualize-fx graphics SGI Visual Workstation products An aside: applies to cell-portal culling! David Luebke 2/24/2019

Hierarchical Occlusion Maps A more hardware-friendly general occlusion culling algorithm Two major differences from HZB: Separates occluders from occludees Decouples occlusion test into an depth test and a overlap test David Luebke 2/24/2019

Hierarchical Occlusion Maps Occluders versus occludees: Blue parts: occluders Red parts: occludees David Luebke 2/24/2019

Hierarchical Occlusion Maps Depth versus overlap: View Point Z X Y Depth + Overlap = Occlusion David Luebke 2/24/2019

Hierarchical Occlusion Maps Representation of projection for overlap test: occlusion map Corresponds to a screen subdivision Records average opacity per partition Generate by rendering occluders Record pixel opacities (== coverage) David Luebke 2/24/2019

Occlusion Maps Rendered Image Occlusion Map David Luebke 2/24/2019

Occlusion Map Pyramid 64 x 64 32 x 32 16 x 16 David Luebke 2/24/2019

Occlusion Map Pyramid David Luebke 2/24/2019

Occlusion Map Pyramid Analyzing cumulative projection: A hierarchical occlusion map (HOM) Generate by recursive averaging (l.p.f.) Records average opacities for blocks of multiple pixels, representing occlusion at multiple resolutions Construction can be accelerated by texture hardware David Luebke 2/24/2019

Overlap Tests Query: is projection of occludee inside cumulative projection of occluders? Cumulative projection: occlusion pyramid Ocludee projection: expensive in general Overestimate ocludee with 3-D bounding box Overestimate projection of 3-D bounding box with 2-D bounding rectangle in screen-space David Luebke 2/24/2019

Overlap Tests Hierarchical structure enables some optimizations: Predictive rejection Terminate test when it must fail later Conservative rejection The transparency threshold Aggressive Approximate Culling Ignore objects barely visible through holes The opacity threshold David Luebke 2/24/2019

Aggressive Approximate Culling 1 2 3 4 David Luebke 2/24/2019

Hierarchical Occlusion Maps Not discussed here: Depth test Depth estimation buffer Modified Z-buffer Selecting occluders For more details, see attached excerpt from Hansong Zhang’s dissertation David Luebke 2/24/2019

HOM: Discussion Provides a robust, general, hardware-friendly occlusion culling algorithm Supports dynamic scenes Supports non-polygonal geometry Not many hardware assumptions David Luebke 2/24/2019

HOM: Discussion Efficient coding, careful tuning a must Fairly high per-frame overhead Needs high depth complexity, good occluder selection to be worthwhile UNC’s MMR system: HOM used maybe 5% of the time David Luebke 2/24/2019

Visibility Culling: Discussion When is visibility culling worthwhile? When scene has high depth complexity Examples: architectural walkthroughs, complex CAD assemblies, dense forest Non-examples: terrain, single highly-tesselated object (e.g., a radiositized room) David Luebke 2/24/2019

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

Visibility Culling: Discussion 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 David Luebke 2/24/2019

Visibility Culling: Discussion 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 Reduces scene depth complexity, decreasing the utility of visibility culling If near-field geometry still includes complex heavily-occlusive assemblies, still a win David Luebke 2/24/2019

Visibility Culling: Discussion 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, lets cull time = render time Tradeoff: one frame increased latency David Luebke 2/24/2019

Summary 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 speedups View-frustum culling always a must For scenes with high depth complexity, occlusion culling can be a big win David Luebke 2/24/2019

Summary Architectural models: visibility is practically a solved problem Cells and portals work well Cull-box portal culling: simple, fast Line-stabbing: elegant, powerful David Luebke 2/24/2019

Summary Occlusion culling of general models: still a largely open problem Important issues: Dynamic scenes Aggregate occlusion effects David Luebke 2/24/2019

Summary General occlusion culling algorithms: Hierarchical Z-buffer: A simple, truly elegant algorithm But doesn’t seem amenable to hardware Hierarchical occlusion maps: More complicated, difficult to code & tune Better suited to current hardware Lends itself well to aggressive culling Fairly high overhead, only worthwhile with high depth complexity David Luebke 2/24/2019

The End Questions? David Luebke 2/24/2019