Occlusion Culling Fall 2003 Ref: GamasutraGamasutra.

Slides:



Advertisements
Similar presentations
Visible-Surface Detection(identification)
Advertisements

8.1si31_2001 SI31 Advanced Computer Graphics AGR Lecture 8 Polygon Rendering.
Week 7 - Monday.  What did we talk about last time?  Specular shading  Aliasing and antialiasing.
Week 10 - Monday.  What did we talk about last time?  Global illumination  Shadows  Projection shadows  Soft shadows.
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.
Hidden Surface Removal CSE 581. Visibility Assumption: All polygons are opaque What polygons are visible with respect to your view frustum?  Outside:
CHAPTER 12 Height Maps, Hidden Surface Removal, Clipping and Level of Detail Algorithms © 2008 Cengage Learning EMEA.
Visibility in Computer Graphics Toni Sellarès Unversitat de Girona
CSE 381 – Advanced Game Programming Scene Management
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.
Computer Graphics1 The A-buffer an Antialiased Hidden Surface Method.
Chapter 6: Vertices to Fragments Part 2 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley Mohan Sridharan Based on Slides.
1 Dr. Scott Schaefer Hidden Surfaces. 2/62 Hidden Surfaces.
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.
Contents Description of the big picture Theoretical background on this work The Algorithm Examples.
Hidden Surface Elimination Wen-Chieh (Steve) Lin Institute of Multimedia Engineering I-Chen Lin’ CG Slides, Rich Riesenfeld’s CG Slides, Shirley, Fundamentals.
1 From-Point Occlusion Culling From-Point Occlusion Culling Chapter 23.
Fall 2006 revised1 Frustum Culling in OpenGL Ref: MarkMoley.com.
1 Advanced Scene Management System. 2 A tree-based or graph-based representation is good for 3D data management A tree-based or graph-based representation.
Spatial Data Structure: Quadtree, Octree,and BSP tree Mengxia Zhu Fall 2007.
10/11/2001CS 638, Fall 2001 Today Kd-trees BSP Trees.
Hidden Surface Removal
Visible Surface Determination
1 Occlusion Culling ©Yiorgos Chrysanthou, , Anthony Steed, 2004.
Afrigraph 2004 Massive model visualization Tutorial A: Part I Rasterization Based Approaches Andreas Dietrich Computer Graphics Group, Saarland University.
Shadows Computer Graphics. Shadows Shadows Extended light sources produce penumbras In real-time, we only use point light sources –Extended light sources.
Computer Graphics Mirror and Shadows
Ray Tracing Primer Ref: SIGGRAPH HyperGraphHyperGraph.
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”
CS 450: COMPUTER GRAPHICS REVIEW: INTRODUCTION TO COMPUTER GRAPHICS – PART 2 SPRING 2015 DR. MICHAEL J. REALE.
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.
Visible-Surface Detection Jehee Lee Seoul National University.
Hidden Surface Removal 1.  Suppose that we have the polyhedron which has 3 totally visible surfaces, 4 totally invisible/hidden surfaces, and 1 partially.
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
Where We Stand At this point we know how to: –Convert points from local to window coordinates –Clip polygons and lines to the view volume –Determine which.
Maths & Technologies for Games Spatial Partitioning 2
Computer Graphics I, Fall 2010 Implementation II.
Maths & Technologies for Games Spatial Partitioning 1 CO3303 Week 8-9.
1 CSCE 441: Computer Graphics Hidden Surface Removal Jinxiang Chai.
01/28/09Dinesh Manocha, COMP770 Visibility Computations Visible Surface Determination Visibility Culling.
Hierarchical Occlusion Map Zhang et al SIGGRAPH 98.
Computer Graphics Inf4/MSc 1 Computer Graphics Lecture 5 Hidden Surface Removal and Rasterization Taku Komura.
Visible surface determination. Problem outline Given a set of 3D objects and a viewing specification, we wish to determine which lines or surfaces are.
Computer Graphics One of the central components of three-dimensional graphics has been a basic system that renders objects represented by a set of polygons.
09/23/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Reflections Shadows Part 1 Stage 1 is in.
COMPUTER GRAPHICS CS 482 – FALL 2015 NOVEMBER 10, 2015 VISIBILITY CULLING HIDDEN SURFACES ANTIALIASING HALFTONING.
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.
Visible Surface Detection
Computer Graphics Implementation II
Frustum Culling in OpenGL
Hidden Surface Removal
3D Clipping.
CSCE 441: Computer Graphics Hidden Surface Removal
3D Rendering Pipeline Hidden Surface Removal 3D Primitives
CS 551 / 645: Introductory Computer Graphics
Hidden Surface Removal
Presentation transcript:

Occlusion Culling Fall 2003 Ref: GamasutraGamasutra

Introduction To cull : to "select from a flock “ The flock: the whole scene that we want to render the selection: limited to those portions of the scene that are not considered to contribute to the final image Culling is often achieved by using geometric calculations (e.g., frustum culling) but is in no way limited to these. For example, an algorithm may also use the contents of the frame buffer.

Occlusion Culling the Z-buffer is not a very smart mechanism try to cull away objects that are occluded, that is, inside the view frustum but not visible in the final image.

Occlusion Culling (cont) The idea behind efficient occlusion culling algorithms is to perform some simple tests early on and so avoid sending data through much of the pipeline. 1.OcclusionCulling(G) 2: OR=empty 3: for each object g in G 4: if(isOccluded(g,OR)) 5: Skip(g) 6: else 7: Render(g) 8: Update(OR,g) 9: end 10:end

Hierarchical Visibility (HV) [Greene93] maintains the scene model in an octree, and a frame's Z-buffer as an image pyramid, the Z- pyramid, the occlusion representation of this algorithm. Octree generation: Recursive process continues until each box contains fewer than the threshold number of primitives, or until the recursion has reached a specified deepest level The construction of an octree takes too much time to be done at runtime, so this method is best suited for static models.

HV (cont) each frame is rendered in approximately front- to-back order by calling the procedure ProcessOctreeNode with the root node of the octree. ProcessOctreeNode(OctreeNode N) 2: if(isOccluded(NBV, ZP)) then return; 3: for each primitive p in N 4: tileInto(p, ZP) 5: end 6: for each child node C in N in front-to-back order 7: ProcessOctreeNode(C) 8: end

HV Octree nodes that are outside the view frustum are culled away. The first step determines whether the node's bounding box is visible with respect to the Z-pyramid. To determine whether a node is visible, the front faces of its bounding box are tested against the Z-pyramid. The node is occluded if all of its front faces are occluded by the Z-pyramid.

HV Otherwise, we render the primitives associated with the node into the Z- pyramid (tileInto in the pseudocode) and then process each of the node's children (if it has any) in front-to-back order using this same recursive procedure.

HV (Z-pyramid) The finest (highest-resolution) level of the Z- pyramid is simply a standard Z-buffer. At all other levels, each z-value is the farthest z in the corresponding 2x2 window of the adjacent finer level. Therefore each z-value represents the farthest z for a square region of the screen. This is done recursively until the top of the image pyramid is reached, where only one z- value remains

Hierarchical Occlusion Map (HOM) [Zhang97] it can handle dynamic scenes The test is divided into two parts: a one-dimensional depth test in the z- direction and a two-dimensional overlap test in the xy (projection) plane. The overlap test supports approximate visibility culling, where objects that "shine through" small holes in the occluders can be culled away using an opacity threshold parameter.

HOM For both tests, a set of potentially good occluders is identified before the scene is rendered, and the occlusion representation is built from these. This step is followed by the rendering of the scene, where the occluders are rendered without an occlusion test. Then the rest of the scene is processed by having each object tested against the occlusion representation. If the object occluded by the occluder representation, it is not rendered

HOM The gray-scale values in the HOM are said to be the opacity of the pixels. A high opacity value (near white) for a pixel at a level above 0 means that most of the pixels it represents are covered by the HOM The overlap test against the HOM starts by projecting the bounding volume of the object (e.g., OBB) to be tested onto the screen.This projection is then bounded by a rectangle, which is then compared against the HOM for overlap.

HOM The overlap test starts at the level in which the size of the pixel in the HOM is approximately the size of the rectangle. Non-approximate culling If all pixels in the rectangle are opaque, then the rectangle is occluded in the xy plane and the object is said to pass the test. On the other hand, if a pixel is not opaque, then the test for that pixel continues recursively to the subpixels in the HOM which are covered by the rectangle, meaning that the resolution of the occlusion maps increases with each test. Approximate visibility culling the pixels in the HOM are not compared to full opacity, i.e., white, but rather against an opacity threshold value, a gray-scale value. The lower the threshold value, the more approximate the culling.

HOM The depth estimation buffer is built for each frame. During rendering, to test whether an object passes the depth test (i.e., whether it is behind the occluders) the z-value of the nearest vertex of its bounding box is computed. This value is compared against the z-values of all regions in the depth estimation buffer that the bounding box rectangle covers in screen space.

HOM For an object to be occluded, it must thus first pass the overlap test; i.e., the rectangle of the projected bounding volume of the object must pass the HOM test. Then it must pass the depth test, i.e., it must be behind the occluders. If an object passes both tests, the object is occluded and is not rendered

Occluder Selection Strategy At runtime, occluders are selected from the database Only objects inside the view frustum are selected They are selected with respect to their distance from the viewer and to their size.

HOM The number of occluders can vary during runtime using an adaptive scheme For extremely dense scenes, i.e., those with high depth complexity, the HOM algorithm was able to cull away between about 50% and 95% of the scene