LOD and Occlusion Christian Miller CS Fall 2011

Similar documents
Transforms 3: Projection Christian Miller CS Fall 2011

Nonphotorealism. Christian Miller CS Fall 2011

Speeding up your game

Shading 1: basics Christian Miller CS Fall 2011

Objects 2: Curves & Splines Christian Miller CS Fall 2011

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

Visibility and Occlusion Culling

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

Hidden surface removal. Computer Graphics

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

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

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

Subdivision Of Triangular Terrain Mesh Breckon, Chenney, Hobbs, Hoppe, Watts

Culling. Computer Graphics CSE 167 Lecture 12

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

Visibility: Z Buffering

Shadow Rendering EDA101 Advanced Shading and Rendering

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

Computer Graphics. Lecture 9 Hidden Surface Removal. Taku Komura

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

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

CS4620/5620: Lecture 14 Pipeline

Pipeline Operations. CS 4620 Lecture 10

Pipeline Operations. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 11

Building scalable 3D applications. Ville Miettinen Hybrid Graphics

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

CS452/552; EE465/505. Clipping & Scan Conversion

Computer Graphics (CS 543) Lecture 10: Soft Shadows (Maps and Volumes), Normal and Bump Mapping

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

Computer Graphics. Bing-Yu Chen National Taiwan University

CS535 Fall Department of Computer Science Purdue University

CS451Real-time Rendering Pipeline

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

Spatial Data Structures and Speed-Up Techniques. Ulf Assarsson Department of Computer Science and Engineering Chalmers University of Technology

Announcements. Written Assignment2 is out, due March 8 Graded Programming Assignment2 next Tuesday

Orthogonal Projection Matrices. Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 2015

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

Pipeline Operations. CS 4620 Lecture 14

Wed, October 12, 2011

Rasterization Overview

Deferred Rendering Due: Wednesday November 15 at 10pm

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

Real-Time Rendering (Echtzeitgraphik) Dr. Michael Wimmer

TSBK03 Screen-Space Ambient Occlusion

Optimizing and Profiling Unity Games for Mobile Platforms. Angelo Theodorou Senior Software Engineer, MPG Gamelab 2014, 25 th -27 th June

Spatial Data Structures

Performance Analysis and Culling Algorithms

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

In- Class Exercises for Shadow Algorithms

Spatial Data Structures and Acceleration Algorithms

RASTERISED RENDERING

Sign up for crits! Announcments

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

(Joseph Hocking, Unity in Action, 2015, p.70) textures + shaders. general appl. matrix & other computations

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

Terrain rendering (part 1) Due: Monday, March 10, 10pm

Performance OpenGL Programming (for whatever reason)

A Real-time Micropolygon Rendering Pipeline. Kayvon Fatahalian Stanford University

CSE528 Computer Graphics: Theory, Algorithms, and Applications

Adaptive Point Cloud Rendering

CMSC427: Computer Graphics Lecture Notes Last update: November 21, 2014

Computer Graphics Shadow Algorithms

Drawing Fast The Graphics Pipeline

CS354 Computer Graphics Introduction. Qixing Huang Januray 17 8h 2017

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

Computer Graphics Introduction. Taku Komura

Spatial Data Structures

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

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

Illumination and Geometry Techniques. Karljohan Lundin Palmerius

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

Visible-Surface Detection Methods. Chapter? Intro. to Computer Graphics Spring 2008, Y. G. Shin

Applications of Explicit Early-Z Z Culling. Jason Mitchell ATI Research

Last Time. Why are Shadows Important? Today. Graphics Pipeline. Clipping. Rasterization. Why are Shadows Important?

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

Spatial Data Structures

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

CS230 : Computer Graphics Lecture 4. Tamar Shinar Computer Science & Engineering UC Riverside

Project 1, 467. (Note: This is not a graphics class. It is ok if your rendering has some flaws, like those gaps in the teapot image above ;-)

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

COMP 175: Computer Graphics April 11, 2018

Table of Contents. Questions or problems?

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

Hardware-driven Visibility Culling Jeong Hyun Kim

For Intuition about Scene Lighting. Today. Limitations of Planar Shadows. Cast Shadows on Planar Surfaces. Shadow/View Duality.

Computer Graphics 10 - Shadows

Computer Graphics CS 543 Lecture 13a Curves, Tesselation/Geometry Shaders & Level of Detail

Optimisation. CS7GV3 Real-time Rendering

Computergrafik. Matthias Zwicker. Herbst 2010

CS 283: Assignment 1 Geometric Modeling and Mesh Simplification

Spatial Data Structures

Simplified Mesh Generation from Renders. Thorvald Natvig

Design of a Walkthrough System for Indoor Environments from Floor Plans

The Traditional Graphics Pipeline

Advanced Computer Graphics

GUERRILLA DEVELOP CONFERENCE JULY 07 BRIGHTON

Interpolation using scanline algorithm

Computer Graphics (CS 543) Lecture 13b Ray Tracing (Part 1) Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)

Shadows in the graphics pipeline

Scene Management. Video Game Technologies 11498: MSc in Computer Science and Engineering 11156: MSc in Game Design and Development

Transcription:

LOD and Occlusion Christian Miller CS 354 - Fall 2011

Problem You want to render an enormous island covered in dense vegetation in realtime

[Crysis]

Scene complexity Many billions of triangles Many gigabytes of textures Rendering that in realtime is hopeless

Common sense Observation 1: You can t see something outside your field of view Observation 2: Near objects can hide far objects (occlusion) Observation 3: Far away objects are very tiny, and therefore require less detail

Frustum culling Only draw things that intersect with or are totally contained in the view frustum Pre-emptively get rid of things that will clip later [RTR]

Frustum culling Use a spatial data structure and only draw nodes that are not outside the frustum [RTR]

Occlusion Time spent drawing an object is wasted if it s just going to get covered up later We want to detect and avoid drawing such cases [RTR]

Backface culling Triangles on the back of objects are guaranteed to be occluded, so we simply don t rasterize them Use winding order in screen space to determine which way a triangle is facing Still requires vertex transformation, but it does save lots of unnecessary pixel shading Halves the work for closed objects

Portal culling A culling method that helps with indoor scenes Have an artist define a set of portals in the scene Portals are just openings through which you can see other rooms Think windows, doorways, and mirrors

Portal culling When rendering a room, do a frustum check on all the portals in that room If you can see a portal, clip the frustum to it, then render the room on the other side For mirrors, flip the viewpoint first Repeat recursively for other rooms

Portal culling Frustums get smaller with each room they enter [DL]

Occlusion culling For more general scenes, you need some way of identifying which objects are hidden behind others [RTR]

Preprocessed occlusion Discretize your scene into cells and compute all visible objects from each cell as a preprocess At render time, just look up which cell the viewer is in and render the visible objects [RTR]

Preprocessed occlusion Very efficient at runtime, but has a very expensive preprocess stage Requires lots of storage Only works for static objects

Depth buffer occlusion culling The depth buffer has visibility information in it Before rendering an object, try rendering its bounding box (but don t overwrite color or depth) If any pixels of the bounding box make it through the depth test, then render the object There s hardware support for this on most GPUs

Hierarchical occlusion culling Can do one better: combine the depth buffer / bounding-box occlusion test with a spatial data structure Only render a node if its bounding box is visible given the current depth buffer

Level of detail (LOD) Far away objects take up very few pixels We should scale detail based on how large the object will end up being on the screen Tons of ways to do this

Discrete LOD Have several versions of each piece of geometry at different resolutions (called LOD levels) Can be artist-created or generated by a mesh simplification program [HH]

Edge collapse Merge two vertices into one Eliminates one edge and two triangles Lots of caveats to getting it to work right

Things to keep in mind

Range-based selection At runtime, need to figure out what LOD to use The simplest way is to do this is as a function of distance from the viewer Doesn t take orientation into account [RTR]

Projected area LOD Alternative to range-based selection Project the object s bounding box onto the near plane and compute its area Look up LOD level as a function of that [RTR]

Switching LOD levels If you transition directly from one LOD level to another, you can get a distracting popping effect Sometimes noticeable even at a distance Must be careful to not rapidly switch back and forth between levels

Progressive meshes You can animate edge collapses between LODs during the transition Replaces popping with morphing [HH]

Terrain Terrain is usually represented as a heightfield Gives an enormous mesh, can t use just one LOD [WP]

Terrain LOD One method: the ROAM algorithm Represent the terrain as a simple subdivision surface, splitting the triangles in two at each level [BT]

Picking tile LOD At runtime, take a look at the current screen-space error of each triangle tile If it s too high, increase resolution If it s low enough, decrease resolution [BT]

Mind the gap Adjacent tiles at different levels of detail will develop cracks Must alter subdivision to match up with neighbors [BT]

Imposters Another idea: static objects that are far away don t change very much as the viewer moves around Render it to a texture, then just display it as a quad Update the imposter when viewer moves too much [RTR]

Deferred shading Draw diffuse color, normals, depth, specular coefficient, etc. into separate buffers Each one of these has normal depth test applied, but no shading happens yet Take one pass at the end and apply the lighting shader to everything at once Guaranteed to shade each pixel only once

[WP]

[Crysis]

figures courtesy... Real-Time Rendering, 3rd ed. [RTR] Tomas Akenine-Moller, Eric Haines, Naty Hoffman Mathematics for 3D Game Programming and Computer Graphics, 3rd ed. [M3D] Eric Lengyel Interactive Computer Graphics: A Top-Down Approach Featuring Shader-Based OpenGL, 6th ed. [ICG] Edward Angel, Dave Shreiner Wikipedia [WP] Hugues Hoppe, Progressive Meshes SIGGRAPH 1996 [HH] David Luebke and Chris Georges, Portals and Mirrors, I3D 1995 [DL] Bryan Turner, Real-Time Dynamic Level of Detail Terrain Rendering with ROAM, Gamasutra.com 2000 [BT]