CS535 Fall Department of Computer Science Purdue University

Similar documents
Visibility and Occlusion Culling

LOD and Occlusion Christian Miller CS Fall 2011

Goal. Interactive Walkthroughs using Multiple GPUs. Boeing 777. DoubleEagle Tanker Model

Hardware-driven Visibility Culling Jeong Hyun Kim

Motivation. Culling Don t draw what you can t see! What can t we see? Low-level Culling

Frédo Durand, George Drettakis, Joëlle Thollot and Claude Puech

CS 563 Advanced Topics in Computer Graphics Culling and Acceleration Techniques Part 1 by Mark Vessella

S U N G - E U I YO O N, K A I S T R E N D E R I N G F R E E LY A VA I L A B L E O N T H E I N T E R N E T

CSE 167: Introduction to Computer Graphics Lecture #9: Visibility. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2018

Many rendering scenarios, such as battle scenes or urban environments, require rendering of large numbers of autonomous characters.

Computer Graphics. Bing-Yu Chen National Taiwan University The University of Tokyo

CSE528 Computer Graphics: Theory, Algorithms, and Applications

Spatial Data Structures and Speed-Up Techniques. Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology

Performance OpenGL Programming (for whatever reason)

CS 498 VR. Lecture 18-4/4/18. go.illinois.edu/vrlect18

Visible Surface Detection. (Chapt. 15 in FVD, Chapt. 13 in Hearn & Baker)

Deferred Splatting. Gaël GUENNEBAUD Loïc BARTHE Mathias PAULIN IRIT UPS CNRS TOULOUSE FRANCE.

Wed, October 12, 2011

Adaptive Point Cloud Rendering

CSE328 Fundamentals of Computer Graphics: Concepts, Theory, Algorithms, and Applications

Computer Graphics. Bing-Yu Chen National Taiwan University

Applications of Explicit Early-Z Culling

Culling. Computer Graphics CSE 167 Lecture 12

Hidden surface removal. Computer Graphics

Hardware-driven visibility culling

Computer Graphics Shadow Algorithms

Project Gotham Racing 2 (Xbox) Real-Time Rendering. Microsoft Flighsimulator. Halflife 2

Real-Time Rendering (Echtzeitgraphik) Dr. Michael Wimmer

CS4620/5620: Lecture 14 Pipeline

Spatial Data Structures and Acceleration Algorithms

A Framework for the Real-Time Walkthrough of Massive Models

Computer Graphics. Lecture 9 Hidden Surface Removal. Taku Komura

Streaming Massive Environments From Zero to 200MPH

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

INFOGR Computer Graphics. J. Bikker - April-July Lecture 11: Visibility. Welcome!

EECE 478. Learning Objectives. Learning Objectives. Rasterization & Scenes. Rasterization. Compositing

Visibility: Z Buffering

Row Tracing with Hierarchical Occlusion Maps

CSE 167: Introduction to Computer Graphics Lecture #10: View Frustum Culling

CSE 167: Introduction to Computer Graphics Lecture #11: Visibility Culling

Next-Generation Graphics on Larrabee. Tim Foley Intel Corp

Ray Casting on Programmable Graphics Hardware. Martin Kraus PURPL group, Purdue University

Real - Time Rendering. Pipeline optimization. Michal Červeňanský Juraj Starinský

Determination (Penentuan Permukaan Tampak)

Images for Accelerating Architectural Walkthroughs

Speeding up your game

Shadows. COMP 575/770 Spring 2013

VISIBILITY & CULLING. Don t draw what you can t see. Thomas Larsson, Afshin Ameri DVA338, Spring 2018, MDH

CS 563 Advanced Topics in Computer Graphics QSplat. by Matt Maziarz

Direct Rendering of Trimmed NURBS Surfaces

CSE 167: Lecture #5: Rasterization. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

TDA362/DIT223 Computer Graphics EXAM (Same exam for both CTH- and GU students)

Course Recap + 3D Graphics on Mobile GPUs

Lecture 17: Shadows. Projects. Why Shadows? Shadows. Using the Shadow Map. Shadow Maps. Proposals due today. I will mail out comments

Sung-Eui Yoon ( 윤성의 )

DiFi: Distance Fields - Fast Computation Using Graphics Hardware

CS559: Computer Graphics. Lecture 12: Antialiasing & Visibility Li Zhang Spring 2008

Identifying those parts of a scene that are visible from a chosen viewing position, and only process (scan convert) those parts

Page 1. Area-Subdivision Algorithms z-buffer Algorithm List Priority Algorithms BSP (Binary Space Partitioning Tree) Scan-line Algorithms

Class of Algorithms. Visible Surface Determination. Back Face Culling Test. Back Face Culling: Object Space v. Back Face Culling: Object Space.

Drawing Fast The Graphics Pipeline

Lecture 13: Reyes Architecture and Implementation. Kayvon Fatahalian CMU : Graphics and Imaging Architectures (Fall 2011)

Computing Visibility. Backface Culling for General Visibility. One More Trick with Planes. BSP Trees Ray Casting Depth Buffering Quiz

FROM VERTICES TO FRAGMENTS. Lecture 5 Comp3080 Computer Graphics HKBU

Specialized Acceleration Structures for Ray-Tracing. Warren Hunt

Spatial Data Structures

Point based Rendering

CSE 167: Introduction to Computer Graphics Lecture #4: Vertex Transformation

SUMMARY. CS380: Introduction to Computer Graphics Ray tracing Chapter 20. Min H. Kim KAIST School of Computing 18/05/29. Modeling

Real-Time Voxelization for Global Illumination

Overview. Pipeline implementation I. Overview. Required Tasks. Preliminaries Clipping. Hidden Surface removal

Pipeline Operations. CS 4620 Lecture 10

Rasterization Overview

Software Occlusion Culling

Techniques for an Image Space Occlusion Culling Engine

Last Time: Acceleration Data Structures for Ray Tracing. Schedule. Today. Shadows & Light Sources. Shadows

Clipping & Culling. Lecture 11 Spring Trivial Rejection Outcode Clipping Plane-at-a-time Clipping Backface Culling

Drawing Fast The Graphics Pipeline

Real-Time Reyes: Programmable Pipelines and Research Challenges. Anjul Patney University of California, Davis

PowerVR Hardware. Architecture Overview for Developers

Rendering. Converting a 3D scene to a 2D image. Camera. Light. Rendering. View Plane

The Rasterization Pipeline

Drawing Fast The Graphics Pipeline

Comparison of hierarchies for occlusion culling based on occlusion queries

Chapter 11 Global Illumination. Part 1 Ray Tracing. Reading: Angel s Interactive Computer Graphics (6 th ed.) Sections 11.1, 11.2, 11.

Rendering If we have a precise computer representation of the 3D world, how realistic are the 2D images we can generate? What are the best way to mode

Architectural Walkthroughs Using Portal Textures

3/1/2010. Acceleration Techniques V1.2. Goals. Overview. Based on slides from Celine Loscos (v1.0)

TSBK03 Screen-Space Ambient Occlusion

Illumination and Geometry Techniques. Karljohan Lundin Palmerius

Parallelizing Graphics Pipeline Execution (+ Basics of Characterizing a Rendering Workload)

Point Sample Rendering

Quick-VDR: Interactive View-Dependent Rendering of Massive Models

Accelerating Ray Tracing

Real-Time Graphics Architecture

Overview. A real-time shadow approach for an Augmented Reality application using shadow volumes. Augmented Reality.

CS Computer Graphics: Hidden Surface Removal

First Steps in Hardware Two-Level Volume Rendering

Image Processing: 3D Image Warping. Spatial Transformations. Spatial Transformations. Affine Transformations. Affine Transformations CS334

Transcription:

Culling CS535 Fall 2010 Daniel G Aliaga Daniel G. Aliaga Department of Computer Science Purdue University

Types of culling View frustum culling Visibility culling e.g., backface culling, portal tlculling, textured t depth mesh culling Occlusion culling e.g., in hardware, hierarchical occlusion maps, hierarchical z buffer

Portal Culling Increase interactive rendering performance of architectural walkthroughs Cull away non visible areas Replace geometry behind portals (doorways and windows) with images warped to the current eye position Reduce the rendering complexity with a small number of image samples

Cells and Portals

Portal Images

Portal Image Warping McMillan & Bishop Warping Equation: x 2 = δ(x 1 ) P 2-1 (c 1 -c 2 ) + P 2-1 P 1 x 1 Move pixels based on distance to eye ~Texture mapping Per pixel distance values are used to warp pixels to their correct location for the current eye position

Portal Image Warping eye Reference COP Projecting the eye onto the reference image partitions it into 1, 2 or 4 sheets A raster scan of each sheet produces a back to front ordering of warped pixels

Creating Portal Images Ideal portal image would be one sampled from the current eye position eye portal

Creating Portal Images Reference COPs A large number of static reference images (~120) needed to eliminate popping portal

Creating Portal Images Reference COPs With warping we use a much smaller number of reference images portal

Creating Portal Images Reference COPs Choose closest reference image and warp to current eye position eye portal

Problem: Exposure Events We observe tears in regions with unknown visibility data

Reducing Exposure Events To address this we: 1. Render multiple reference images 2. Allow warped pixels to persist and fill-in minor tears

Parallelization: Sheets eye Projection plane Eye view direction similar to reference COP view direction Since the projection plane is perpendicular p to the view direction, we usually have 4 sheets We warp each sheet on a different processor

Sample Path: 1 Image/Portal Re endering Time (sec.) 0.5 0.44 0.3 0.2 0.1 Portal Culling only Portal Image 0 0 100 200 300 400 500 Frame

Sample Path: 2 Images/Portal Re endering Time (sec.) 0.5 0.44 0.3 0.2 0.1 Portal Culling only Portal Image 0 0 100 200 300 400 500 Frame

Textured Depth Mesh Culling Model Space Partitioning Preference to important areas Far Geometry Replace with textured depth meshes Near Geometry Could use LOD, occlusion and view frustum culling 17

Model Space Partitioning View Preference Function (VPF) Similar to progressive rendering, allocate resources (e.g. time, storage, CPU, bandwidth) to most important areas first 18

Model Space Partitioning Subdivide important areas into cells Cells 2 5 7 0 1 3 6 44 Model space 19

Model Space Partitioning Associate a cull box with each cell 2 5 7 0 1 3 r 6 Cull box 44 20

Model Space Partitioning Cull box divides near and far geometry Far geometry Near geometry 21

Far Geometry Replace far geometry with ihtextured ddepth Meshes (TDMs) Near geometry TDM 0 22

Far Geometry Replace far geometry with ihtextured ddepth Meshes (TDMs) TDM 1 Near geometry TDM 0 23

Far Geometry Replace far geometry with ihtextured ddepth Meshes (TDMs) TDM 1 TDM 2 TDM 0 Near geometry 24

Far Geometry Replace far geometry with ihtextured ddepth Meshes (TDMs) TDM 1 TDM 2 TDM 0 Near geometry TDM 3 25

Textured Depth Mesh ImageI Depth D himage Simplify Preprocessing Texture Mesh Run-time Rendering TDM 26

Example TDM Foreground Geometry Background TDM with mesh outlined in white 27

TDM Skins Example of a simple TDM A B Eyepoint 28

TDM Skins Example of a simple TDM TDM A B Eyepoint 29

TDM Skins Disocclusions appear as skins A AA B Skin B Eyepoint 30

Near Geometry Cull to view frustum Select LOD based on distance View Frustum Eyepoint Cull Box 31

Near Geometry If sufficiently complex, do occlusion culling e.g., Hierarchical Occlusion Maps View Frustum Eyepoint Cull Box 32

What size cull box? Given a fixed primitive budget and a fixed set of cells: Large cull boxes require coarse LODs Small cull boxes exaggerate skins in the TDMs (visibility culling does not alter the visual content) 33

Balancing Near Far Geometry Error metrics LOD: deviation in pixels from original surface TDM: maximum skin size, in screen pixels Reduce and balance thecombined error Adjust cull box size and LODs to meet budget and balance errors 34

Multiple Processor Pipeline Thread 0 Frame interval Occlusion cull (n+1) 1 Cell cull (n+1) View-frustum cull (n+1) Level-of-detail selection (n+1) Occlusion cull (n+1) Occluder TDM render Geometry render 2 render (n+1) (n) (n) 3 Prefetching (asynchronous) 35

Power Plant Frame Rates 30 VFC Only Cold Cache Warm Cache 25 Fra ames Per Second 20 15 10 5 0 1 101 201 301 401 501 601 701 Frame Number 36

Questions Order of the acceleration techniques affects the results, so which is best? Cull Box VF Culling LOD Occl. Culling Cull Box LOD VF Culling Occl. Culling VF Culling Occl. Culling Cull Box LOD (a) (b) (c) 37

Occlusion Culling As opposed to visibility culling, in occlusion culling the algorithm determines what is occluded (instead of what is visible) This leads to the confounding, but true, equation: not visible occluded

Occlusion Culling in Hardware Occlusion Query (e.g., nv_occlusion_query) Performed at the polygon level Tells the caller whether any pixels (or maybe how many) of a rendered object/polygon actually became visible Thus, can render a box instead of a complex object if the entire box is occluded, then complex object is occluded Result is potentially faster rendering performance

Occlusion Culling in Hardware Early Z rejection Performed at the pixel level If a fragment is not visible (because the depth test failed), rejection occurs immediately Cansave unnecessary texture fetching and execution of GPU level code Result is a saving of memorybandwidth

Hierarchical Occlusion Maps Occluded geometry Visible geometry Occluder geometry (all images from Hansong Zhang s dissertation)

Hierarchical Occlusion Maps Motivation Occlusion is cumulative Occluders can be fused

Occlusion Culling Algorithm Progressive Culling Con? M t t i f t t b k d t t b t Must traverse in front to back order to get best use of culling

Occlusion Culling Algorithm Progressive Culling Con? Multiple l passes (could ldb be many )

Occlusion Culling Algorithm Multi pass occlusion culling

A Definition of Occlusion where R and R o are opaque and not opaque regions

Hierarchical Occlusion Map (HOM) The occlusion images can be readily generated by hardware; how? Just render the scene with white=visible and black=background Note that this process is fast but is also done at some selected resolution So lets change the resolution!

Hierarchical Occlusion Map (HOM) And we get this:

Hierarchical Occlusion Map (HOM) And we get this:

Hierarchical Occlusion Map (HOM) Creation algorithm for HOMs:

Hierarchical Occlusion Map (HOM) How do you use an HOM? First cull using the coarsest HOM Then the next coarsest... Until the finest level of the HOM If something is visible ibl in all levels, l then it is visible ibl So what is the gain?

Hierarchical Occlusion Map (HOM) Observation Even at the finest level, it is not known if the object is truly visible But at the resolution you care about, it is

Hierarchical Occlusion Map (HOM) Conclusion The hierarchy is conservative Generate from the coarest HOM to the finest level you care about Only use those and select at run time depending on performance

Example Results

Some questions? For a 2x2 grid of pixels in the occlusion map, what occlusion value do you choose? Min? Max? Average? Wl Welcome to hierarchical z buffers!