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:

Slides:



Advertisements
Similar presentations
CS 352: Computer Graphics Chapter 7: The Rendering Pipeline.
Advertisements

Week 7 - Monday.  What did we talk about last time?  Specular shading  Aliasing and antialiasing.
Week 11 - Wednesday.  Image based effects  Skyboxes  Lightfields  Sprites  Billboards  Particle systems.
N-Buffers for efficient depth map query Xavier Décoret Artis GRAVIR/IMAG INRIA.
Visibility Culling David Luebke Computer Science Department University of Virginia
Week 10 - Monday.  What did we talk about last time?  Global illumination  Shadows  Projection shadows  Soft shadows.
Real-Time Rendering TEXTURING Lecture 02 Marina Gavrilova.
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 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.
Real-Time Rendering SPEACIAL EFFECTS Lecture 03 Marina Gavrilova.
Chapter 6: Vertices to Fragments Part 2 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley Mohan Sridharan Based on Slides.
CGDD 4003 THE MASSIVE FIELD OF COMPUTER GRAPHICS.
Tomas Mőller © 2000 Speeding up your game The scene graph Culling techniques Level-of-detail rendering (LODs) Collision detection Resources and pointers.
1 From-Point Occlusion Culling From-Point Occlusion Culling Chapter 23.
The Graphics Pipeline CS2150 Anthony Jones. Introduction What is this lecture about? – The graphics pipeline as a whole – With examples from the video.
Ray Space Factorization for From-Region Visibility Authors: Tommer Leyvand, Olga Sorkine, Daniel Cohen-Or Presenter: Alexandre Mattos.
Introduction to 3D Graphics John E. Laird. Basic Issues u Given a internal model of a 3D world, with textures and light sources how do you project it.
University of Texas at Austin CS 378 – Game Technology Don Fussell CS 378: Computer Game Technology Beyond Meshes Spring 2012.
09/18/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Bump Mapping Multi-pass algorithms.
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.
Week 1 - Friday.  What did we talk about last time?  C#  SharpDX.
Shadows Computer Graphics. Shadows Shadows Extended light sources produce penumbras In real-time, we only use point light sources –Extended light sources.
CSE 381 – Advanced Game Programming Basic 3D Graphics
NVIDIA PROPRIETARY AND CONFIDENTIAL Occlusion (HP and NV Extensions) Ashu Rege.
Sky Rendering The actual physics is very complicated and costly to calculate. Several cheap approaches for very distant skies: –Constant backdrop –Skybox.
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”
CSCE 552 Fall D Models By Jijun Tang. Triangles Fundamental primitive of pipelines  Everything else constructed from them  (except lines and point.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Chapter 6 Special Effects 강 신 진강 신 진
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.
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.
CS 638, Fall 2001 Multi-Pass Rendering The pipeline takes one triangle at a time, so only local information, and pre-computed maps, are available Multi-Pass.
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.
David Luebke11/26/2015 CS 551 / 645: Introductory Computer Graphics David Luebke
09/16/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Environment mapping Light mapping Project Goals for Stage 1.
CSCE 552 Spring D Models By Jijun Tang. Triangles Fundamental primitive of pipelines  Everything else constructed from them  (except lines and.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 7. Speed-up Techniques Presented by SooKyun Kim.
Visibility II CS 446: Real-Time Rendering & Game Technology
Image-based Rendering Ref: RTRv2. 2 Introduction Sprite, billboard, overview.
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
Shadows David Luebke University of Virginia. Shadows An important visual cue, traditionally hard to do in real-time rendering Outline: –Notation –Planar.
The Graphics Pipeline Revisited Real Time Rendering Instructor: David Luebke.
Hierarchical Occlusion Map Zhang et al SIGGRAPH 98.
Computer Graphics Inf4/MSc 1 Computer Graphics Lecture 5 Hidden Surface Removal and Rasterization Taku Komura.
Engine Basics: Optimizing Geometry CS 446: Real-Time Rendering & Game Technology David Luebke University of Virginia.
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.
CS 445: Introduction to Computer Graphics David Luebke University of Virginia Visibility Calculations and Occlusion Culling.
Visible-Surface Detection Methods. To identify those parts of a scene that are visible from a chosen viewing position. Surfaces which are obscured by.
- Introduction - Graphics Pipeline
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.
Week 2 - Monday CS361.
Image-Based Rendering
UMBC Graphics for Games
CS 551 / 645: Introductory Computer Graphics
Using billboards within games
Presentation transcript:

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: –Aggregate occlusion –Dynamic scenes –Non-polygonal scenes

Recap: Image-Space Occlusion Culling l Most general occlusion culling algorithms use an image-space approach –Idea: solve visibility in 2D, on the image plane –Note: gives up view-independent visibility

Recap: Hierarchical Z-Buffer l Replace Z-buffer with a Z-pyramid –Lowest level: full-resolution Z-buffer –Higher levels: each pixel represents the max depth of the four pixels “underneath” it l Basic idea: hierarchical rasterization of the polygon, with early termination where polygon is occluded

Recap: Hierarchical Z-Buffer l Z-pyramid exploits image-space coherence: –Polygon occluded in a pixel is probably occluded in nearby pixels l HZB also exploits object-space coherence –Polygons near an occluded polygon are probably occluded

Recap: Hierarchical Z-Buffer l 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 l So start each frame by rendering octree nodes visible last frame

Hierarchical Z-Buffer: Discussion l HZB needs hardware support to be really competitive l Hardware vendors haven’t entirely bought in: –Z-pyramid (and hierarchies in general) unfriendly to hardware –Unpredictable Z-query times generate bubbles in rendering pipe l But there are promising trends: –ATI’s HYPER-Z technology: one-level HZB –Occlusion queries!

Modern Occlusion Culling l Support from hardware would be nice –Want an “occlusion test”: would this polygon be visible if I rendered it? –How could you use such a test? n Test portal polygons before rendering adjacent cell n Test object bounding boxes before rendering object –Yay! GL_HP_OCCLUSION_TEST extension –Problems: n CPU/GPU synchronization == bad n Might want to know “how visible” is the polygon

Modern Occlusion Culling GL_NV_OCCLUSION_QUERY to the rescue –Non-blocking query n “Is this occlusion query done yet?” n Multiple queries in flight –Returns number of fragments visible l Note: can actually render object or not l Supports object-space coherence, temporal coherence l Still lots of issues for efficient culling Wrong

Modern Occlusion Culling GL_ARB_OCCLUSION_QUERY –Deprecates NV_OCCLUSION_QUERY –Fixes a potential race condition

111 uses for NV_OCCLUSION_QUERY l Occlusion culling (duh) l Others? –Approximate culling –LOD size estimation –Lens flare effects –Transparency –Collision detection (!) –Convergence testing

NV_OCCLUSION_QUERY : Details l Go to NVIDIA presentation…

Occlusion Culling: Grab Bag l Portal textures –Dan Aliaga and others l From-region visibility –Generalizes view-independent cell-portal problem l Linear-time view-independent portal cull box approach? –Nina Amenta and others l Modeling issues for cells-and-portals –Daniel Cohen-Or and others

Advanced Texturing: Stupid Texture Tricks David Luebke University of Virginia

Point Sprites l A point sprite is a screen-aligned textured quad placed by rendering a single vertex –Ideal for particle systems –When GL_POINT_SPRITE_NV is enabled: n Point antialiasing state ignored – all points  quads n Points are rendered with point width as usual n Tex coords of points can be replaced by special “point sprite” tex coords s,t,r between 0,1 n Tex coord r is special, can set to zero (default) or use to ‘play through’ an animation stored in 3D tex –Enable this with COORD_REPLACE_NV n For hardware acceleration on GF3, set r to 0 (default) and enable coordinate replacement for tex unit 3 only –See –See search for “point sprite”

Billboards l A point sprite is a certain kind of billboard –Billboards are textured polygons (usually quads) that rotate to face the viewer n Build a rotation matrix for each billboard n Screen-aligned billboard: quad is parallel to the screen and has a constant up vector n Similar to old-school 2D sprites n Useful for text, HUDs, lens flare, etc n Build rotation matrix with camera u, n = -v, r=uXv n World-oriented billboard n Sprite’s native up vector not always appropriate n World-oriented billboard: use the world up vector n Still faces viewer  n = -v, r=uXv

Billboards l Viewpoint-aligned –v = vector to eye (Fig. 8.5) –Resulting quads capture perspective distortions across view-frustum –Ex: clouds (Fig 8.6) l Axially-alligned –Rotates around a fixed world-space axis –Ex: trees (Fig 8.7) –Problem: from above, look like cardboard cutouts

Imposters l An imposter is a billboard created on the fly to “cache” rendered imagery –Once rendered, cost of rendering an imposter is just a single textured quad –Can use for a few frames before updating –Can use for a few instances of the object l Works best on distant objects (why?) l Great example: portal textures –But what’s wrong with this idea?

Depth Sprites l Can render an object with a depth texture, so depth buffer affects and is affected by the rendering (Fig 8.16) –Can also do depth-affected lighting –Needs to be orthogonal or nearly orthogonal to look right –Under the right circumstances, might allow imposters with dynamic geometry n Ex: portal texture with monster moving around in the textured room

Imposters Continued l Depth meshes –UNC MMR system

Multitexturing l Modern hardware can read from multiple textures at once, even with mipmapping l Detail texturing l Light mapping l Bump mapping