The Visibility Problem In many environments, most of the primitives (triangles) are not visible most of the time –Architectural walkthroughs, Urban environments.

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.
Advanced Light and Shadow Culling Methods Eric Lengyel.
03/12/02 (c) 2002 University of Wisconsin, CS559 Last Time Some Visibility (Hidden Surface Removal) algorithms –Painter’s Draw in some order Things drawn.
Occlusion Culling Fall 2003 Ref: GamasutraGamasutra.
Hidden Surface Removal CSE 581. Visibility Assumption: All polygons are opaque What polygons are visible with respect to your view frustum?  Outside:
CAP4730: Computational Structures in Computer Graphics Visible Surface Determination.
CECS461 Computer Graphics II University of Missouri at Columbia Hidden Surface Removal.
Visibility in Computer Graphics Toni Sellarès Unversitat de Girona
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.
1 Dr. Scott Schaefer Hidden Surfaces. 2/62 Hidden Surfaces.
Tomas Mőller © 2000 Speeding up your game The scene graph Culling techniques Level-of-detail rendering (LODs) Collision detection Resources and pointers.
A lion in the desert How do you find a lion in the desert? How about when you have a predicate that tells you if the lion is in front or behind a separating.
Hidden Surface Elimination Wen-Chieh (Steve) Lin Institute of Multimedia Engineering I-Chen Lin’ CG Slides, Rich Riesenfeld’s CG Slides, Shirley, Fundamentals.
1 CSCE 441: Computer Graphics Hidden Surface Removal (Cont.) Jinxiang Chai.
1 Clipping and Hidden Surfaces CS-184: Computer Graphics Prof. James O’Brien.
A lion in the desert How do you find a lion in the desert? How about when you have a predicate that tells you if the lion is in front or behind a separating.
1 From-Point Occlusion Culling From-Point Occlusion Culling Chapter 23.
Vertices and Fragments III Mohan Sridharan Based on slides created by Edward Angel 1 CS4395: Computer Graphics.
10/11/2001CS 638, Fall 2001 Today Kd-trees BSP Trees.
10/02/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Octrees.
Hidden Surface Removal
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.
10/29/02 (c) 2002 University of Wisconsin, CS559 Today Hidden Surface Removal Exact Visibility.
10/09/2001CS 638, Fall 2001 Today Spatial Data Structures –Why care? –Octrees/Quadtrees –Kd-trees.
10/16/2001CS 638, Fall 2001 Today Visibility –Overview –Cell-to-Cell –Cell-to-Region –Eye-To-Region –Occlusion Culling (maybe)
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
CSC418 Computer Graphics n BSP tree n Z-Buffer n A-buffer n Scanline.
The BSP-tree from Prof. Seth MIT.. Motivation for BSP Trees: The Visibility Problem We have a set of objects (either 2d or 3d) in space. We have.
Real-Time Rendering SPEEDING UP RENDERING Lecture 04 Marina Gavrilova.
Visible-Surface Detection Jehee Lee Seoul National University.
1 Shadows (2) ©Anthony Steed Overview n Shadows – Umbra Recap n Penumbra Analytical v. Sampling n Analytical Aspect graphs Discontinuity meshing.
1 Advanced Scene Management. 2 This is a game-type-oriented issue Bounding Volume Hierarchies (BVHs) Binary space partition trees (BSP Trees) “Quake”
Hidden Surface Removal 1.  Suppose that we have the polyhedron which has 3 totally visible surfaces, 4 totally invisible/hidden surfaces, and 1 partially.
03/14/02 (c) 2002 University of Wisconsin, CS559 Last Time Some more visibility (Hidden Surface Removal) algorithms –A-buffer –Scanline –Depth sorting.
2 COEN Computer Graphics I Evening’s Goals n Discuss application bottleneck determination n Discuss various optimizations for making programs execute.
CS-378: Game Technology Lecture #2.2: Clipping and Hidden Surfaces Prof. Okan Arikan University of Texas, Austin Thanks to James O’Brien, Steve Chenney,
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.
3/23/04© University of Wisconsin, CS559 Spring 2004 Last Time Antialiasing –Area-weighted sampling Visibility –Painters algorithm –Depth buffer (Z-buffer)
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.
Binary Space Partitioning Trees Ray Casting Depth Buffering
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.
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.
Computer Graphics I, Fall 2010 Implementation II.
Honours Graphics 2008 Session 5. Today’s focus Rasterization Visibility determination Coarse / fine visibility determination.
1 CSCE 441: Computer Graphics Hidden Surface Removal Jinxiang Chai.
Game Engine Design Quake Engine Presneted by Holmes 2002/12/2.
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.
1 Advanced Scene Management. 2 This is a game-type-oriented issue Bounding Volume Hierarchies (BVHs) Binary space partition trees (BSP Trees) “Quake”
09/23/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Reflections Shadows Part 1 Stage 1 is in.
Occlusion Culling David Luebke University of Virginia.
3D Object Representations 2009, Fall. Introduction What is CG?  Imaging : Representing 2D images  Modeling : Representing 3D objects  Rendering : Constructing.
3D Object Representations
Today Visibility Overview Cell-to-Cell Cell-to-Region Eye-To-Region
CSCE 441: Computer Graphics Hidden Surface Removal
Conservative Visibility Preprocessing using Extended Projections Frédo Durand, George Drettakis, Joëlle Thollot and Claude Puech iMAGIS-GRAVIR/IMAG-INRIA.
CS679 - Fall Copyright Univ. of Wisconsin
Presentation transcript:

The Visibility Problem In many environments, most of the primitives (triangles) are not visible most of the time –Architectural walkthroughs, Urban environments –High depth complexity – there are many polygons behind each pixel, so naïve z-buffering touches each pixel many times Visibility algorithms determine which primitives are visible Good visibility algorithms are output sensitive – their running time depends on the number of visible polygons, not the total size of the environment –Algorithms must not touch every primitive at run-time

Visibility Algorithm Taxonomy Back-face culling: remove polygons with normals facing away from the viewer –For closed objects, such faces must be occluded by the front of the object View frustum culling: remove polygons that fall outside the viewing frustum Exact visibility: locate the set of polygons that are at least partially visible, and no others Approximate visibility: locate most of the visible polygons and only a few of the non-visible ones Conservative visibility: locate all of the partially visible polygons, and maybe some others

Minimalist Approach Perform view volume culling in software –Break the world into some hierarchical data structure (Octree, BSP) Associate objects/polygons with leaves of the tree –Start at the root Send the contents of cells completely within the view frustum to the rendering pipeline Ignore cells completely outside the view frustum Recurse into children of cells straddling the view frustum Back-face culling is implemented in hardware for render –Culled polygons reach the clipping stage of the pipeline Assuming a roughly uniform scene, and a 45° FOV, this will send 1/8 th of the scene to the graphics pipeline, and 1/16 th of the scene to the rasterizer

Exact Visibility Computes the set of polygons that are visible, and no others Difficult, with provably high worst case complexity. How high? Their use is limited to non-walkthrough applications: –Shadow rendering, where we care about which surfaces are visible from the light source –Form factor computations for radiosity Visibility is required from every patch to every other patch It is worth building large data structures to make visibility efficient –Computer vision: View space partitioning and aspect graphs

Conservative Visibility Producing a slightly larger potentially visible set (PVS) is generally much easier than producing the exact set Send all the PVS to the graphics pipeline and let the z- buffer sort out the exact set –Z-buffer hardware remains efficient provided each pixel is not over-rendered many times – so the PVS cannot be too large Almost all practical visibility algorithms are conservative and generate a PVS A further primary distinguishing feature: –Object-space algorithms do their computations in world space –Image space algorithms project objects or bounds into image space before determining visibility

Cells and Portals (Airey 90, Teller and Sequin 91, Luebke and Georges 95) Best in architectural scenes –Cells are rooms –Portals are doorways and windows The boundaries of the cells (the walls) block almost everything, so visibility is reduced very quickly without the need to merge occluders Cells are generally built using a BSP tree –Walls (large polygons) suggest good splitting planes –Try to keep the tree balanced, while cutting as few polygons as possible (because cut polygons are associated with both cells) –Ignore the detail objects (furniture) Portals are gaps in cell boundaries

Cells and Portals (cont) As a preprocess, associate a PVS with every cell –Set of all other cells visible from some point inside this cell –Note that all PV cells must be visible from somewhere on a portal Several ways to build the set –Shadow volumes (normally used for area light sources) –Random sampling of rays –Linear programming to find stabbing lines in 2d A stabbing line connects PV cells through a sequence of portals Each portal provides two constraints to the linear program Use depth first search to find all stabbing lines –Specialized algorithms find stabbing lines in 3d Operate in the dual space (find stabbing “points” in line space)

Cells and Portals (cont) Simplest algorithm renders all the PVS for the current cell –Includes cells behind the viewer, as well as other invisible cells Instead, traverse the stab-tree and crop the view frustum to each portal –Don’t render cells that do not lie inside the cropped view frustum Preprocessing PVS is actually unnecessary –Start with view frustum in current cell –Crop to each portal out of the cell –Recurse on neighboring cells with cropped frustum –Doesn’t tell you which cells may be required soon, so they cannot be paged from disk ahead of time –The BEST visibility scheme for densely occluded interiors that fit into memory (mazes in computer games)

Large Occluders but No Cells (Coorg and Teller 97) Many scenes are not easily broken into cells with small portals Several new ideas –Choose the occluders at run-time, from a pre-computed set of possibilities –Cull kd-tree cells against the chosen occluders –Fast culling by noting the existence of separating planes and supporting planes Supporting Separating Partially Occluded Occluded Fully visible Partially Occluded

Choosing Occluders Good occluders cover large areas of the image –Large in size –Close to the viewer –Aligned front on Associate a set of occluders with each leaf of the kd-tree –Use set for the cell that contains the viewer Combine occluders that share a non-silhouette edge –Ignore supporting planes through common edge Cache supporting planes for subsequent frames V N Area A D eye

Other Object-Space Algorithms Coorg and Teller also describe an alternate algorithm: –Explicitly construct the set of separating planes for views local the the current one –Identifies when those planes are invalidated and builds new ones –Effectively computes and maintains a subset of the linearized aspect graph The Visibility Skeleton (Durand, Drettakis, Puech 1997) –Computes a full subset of the aspect graph –Used for radiosity form factor computations – makes it easy to identify discontinuity lines and compute exact visibility Other theoretical approaches: The visibility complex (Durand, Drettakis, Puech 1996), and the asp (Plantinga and Dyer 1990)