Deferred Shading & Screen Space Effects



Similar documents
INTRODUCTION TO RENDERING TECHNIQUES

Hi everyone, my name is Michał Iwanicki. I m an engine programmer at Naughty Dog and this talk is entitled: Lighting technology of The Last of Us,

A Short Introduction to Computer Graphics

Computer Graphics Global Illumination (2): Monte-Carlo Ray Tracing and Photon Mapping. Lecture 15 Taku Komura

Shader Model 3.0. Ashu Rege. NVIDIA Developer Technology Group

Computer Graphics. Introduction. Computer graphics. What is computer graphics? Yung-Yu Chuang

Computer Animation: Art, Science and Criticism

Monte Carlo Path Tracing

Specular reflection. Dielectrics and Distribution in Ray Tracing. Snell s Law. Ray tracing dielectrics

Optimizing AAA Games for Mobile Platforms

CSE168 Computer Graphics II, Rendering. Spring 2006 Matthias Zwicker

Path Tracing Overview

Image Processing and Computer Graphics. Rendering Pipeline. Matthias Teschner. Computer Science Department University of Freiburg

Computer Applications in Textile Engineering. Computer Applications in Textile Engineering

Image Synthesis. Transparency. computer graphics & visualization

Introduction to Computer Graphics

CUBE-MAP DATA STRUCTURE FOR INTERACTIVE GLOBAL ILLUMINATION COMPUTATION IN DYNAMIC DIFFUSE ENVIRONMENTS

Making natural looking Volumetric Clouds In Blender 2.48a

OpenGL Performance Tuning

PATH TRACING: A NON-BIASED SOLUTION TO THE RENDERING EQUATION

Rendering Area Sources D.A. Forsyth

REAL-TIME IMAGE BASED LIGHTING FOR OUTDOOR AUGMENTED REALITY UNDER DYNAMICALLY CHANGING ILLUMINATION CONDITIONS

GUI GRAPHICS AND USER INTERFACES. Welcome to GUI! Mechanics. Mihail Gaianu 26/02/2014 1

Dynamic Resolution Rendering

Volume Rendering on Mobile Devices. Mika Pesonen

Point Cloud Simulation & Applications Maurice Fallon

Lighting & Rendering in Maya: Lights and Shadows

Thea Omni Light. Thea Spot Light. Light setup & Optimization

Approval Sheet. Interactive Illumination Using Large Sets of Point Lights

3D Stereoscopic Game Development. How to Make Your Game Look

So, you want to make a photo-realistic rendering of the Earth from orbit, eh? And you want it to look just like what astronauts see from the shuttle

3D Scanner using Line Laser. 1. Introduction. 2. Theory

Low power GPUs a view from the industry. Edvard Sørgård

Path Tracing. Michael Doggett Department of Computer Science Lund university Michael Doggett

Recent Advances and Future Trends in Graphics Hardware. Michael Doggett Architect November 23, 2005

Blender Notes. Introduction to Digital Modelling and Animation in Design Blender Tutorial - week 9 The Game Engine

Advanced Visual Effects with Direct3D

Float a Beachball in Psuanmi

Lezione 4: Grafica 3D*(II)

Outline. srgb DX9, DX10, XBox 360. Tone Mapping. Motion Blur

How To Understand The Power Of Unity 3D (Pro) And The Power Behind It (Pro/Pro)

How To Make A Texture Map Work Better On A Computer Graphics Card (Or Mac)

Image Synthesis. Fur Rendering. computer graphics & visualization

ARC 3D Webservice How to transform your images into 3D models. Maarten Vergauwen

Certificate Courses in Animation

Rally Sport Racing Game: CodeName Space Racer

An introduction to Global Illumination. Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology

Cartoon-Looking Rendering of 3D-Scenes

My Materials. In this tutorial, we ll examine the material settings for some simple common materials used in modeling.

The Photosynth Photography Guide

The Evolution of Computer Graphics. SVP, Content & Technology, NVIDIA

Basic Video Production FOR SMALL BUSINESS AND THE INDEPENDENT PROFESSIONAL

BCC Multi Stripe Wipe

Making Dreams Come True: Global Illumination with Enlighten. Graham Hazel Senior Product Manager Sam Bugden Technical Artist

Monte Carlo Path Tracing

PCL - SURFACE RECONSTRUCTION

IT 386: 3D Modeling and Animation. Review Sheet. Notes from Professor Nersesian s IT 386: 3D Modeling and Animation course

SHOW MORE SELL MORE. Top tips for taking great photos

Beyond 2D Monitor NVIDIA 3D Stereo

The Car Tutorial Part 1 Creating a Racing Game for Unity

The Future Of Animation Is Games

Dhiren Bhatia Carnegie Mellon University

Optical Flow. Shenlong Wang CSC2541 Course Presentation Feb 2, 2016

DATA VISUALIZATION OF THE GRAPHICS PIPELINE: TRACKING STATE WITH THE STATEVIEWER

Photon Mapping Made Easy

Direct Volume Rendering Elvins

GPU Christmas Tree Rendering. Evan Hart

NVPRO-PIPELINE A RESEARCH RENDERING PIPELINE MARKUS TAVENRATH MATAVENRATH@NVIDIA.COM SENIOR DEVELOPER TECHNOLOGY ENGINEER, NVIDIA

Monash University Clayton s School of Information Technology CSE3313 Computer Graphics Sample Exam Questions 2007

MicroStation Visualization V8i (SELECTseries 1) Luxology Update 1

2: Introducing image synthesis. Some orientation how did we get here? Graphics system architecture Overview of OpenGL / GLU / GLUT

Plug-in Software Developer Kit (SDK)

GPU(Graphics Processing Unit) with a Focus on Nvidia GeForce 6 Series. By: Binesh Tuladhar Clay Smith

Optimizing Unity Games for Mobile Platforms. Angelo Theodorou Software Engineer Unite 2013, 28 th -30 th August

Shadows. Shadows. Thanks to: Frédo Durand and Seth Teller MIT. Realism Depth cue

Lecture Notes, CEng 477

Pro/ENGINEER Wildfire 4.0 Basic Design

Computer Graphics Hardware An Overview

HowTo Rhino & ICEM. 1) New file setup: choose Millimeter (automatically converts to Meters if imported to ICEM)

PRODUCT LIFECYCLE MANAGEMENT COMPETENCY CENTRE RENDERING. PLMCC, JSS Academy of Technical Education, Noida Rendering 1 of 16

SkillsUSA 2014 Contest Projects 3-D Visualization and Animation

Advances in Real-Time Skin Rendering

Printing Guide. MapInfo Pro Version Contents:

OpenGL Insights. Edited by. Patrick Cozzi and Christophe Riccio

Lighting Estimation in Indoor Environments from Low-Quality Images

Image Based Rendering With Stable Frame Rates

GPU Shading and Rendering: Introduction & Graphics Hardware

Illuminating With HDRI

path tracing computer graphics path tracing 2009 fabio pellacini 1

Advanced Computer Graphics. Rendering Equation. Matthias Teschner. Computer Science Department University of Freiburg

MapInfo Professional Version Printing Guide

PHOTON mapping is a practical approach for computing global illumination within complex

The RADIANCE Lighting Simulation and Rendering System

Silverlight for Windows Embedded Graphics and Rendering Pipeline 1

Multivariate data visualization using shadow

Course Overview. CSCI 480 Computer Graphics Lecture 1. Administrative Issues Modeling Animation Rendering OpenGL Programming [Angel Ch.

Getting Started with iray in 3ds Max 2014

A.R.I.S.E. Architectural Real-time Interactive Showing Environment. Supervisor: Scott Chase

CSE 564: Visualization. GPU Programming (First Steps) GPU Generations. Klaus Mueller. Computer Science Department Stony Brook University

Using Photorealistic RenderMan for High-Quality Direct Volume Rendering

Transcription:

Deferred Shading & Screen Space Effects State of the Art Rendering Techniques used in the 3D Games Industry Sebastian Lehmann 11. Februar 2014 FREESTYLE PROJECT GRAPHICS PROGRAMMING LAB CHAIR OF COMPUTER GRAPHICS WINTER TERM 2013 / 2014 KIT University of the State of Baden-Wuerttemberg and National Laboratory of the Helmholtz Association www.kit.edu

Deferred Shading Motivation Rendering a Complex Scene Render time depends on: Number of objects N (scene complexity) Number of lights L Number of screen fragments R (resolution) Sebastian Lehmann Deferred Shading & Screen Space Effects 11. Februar 2014 2/23

Deferred Shading Motivation Rendering a Complex Scene Render time depends on: Number of objects N (scene complexity) Number of lights L Number of screen fragments R (resolution) Trend: increasing! Sebastian Lehmann Deferred Shading & Screen Space Effects 11. Februar 2014 2/23

Deferred Shading Motivation Conventional Rendering Method for each object for each fragment for each light compute lighting Sebastian Lehmann Deferred Shading & Screen Space Effects 11. Februar 2014 3/23

Deferred Shading Motivation Conventional Rendering Method for each object for each fragment for each light compute lighting requires time O(N L R) Not reasonable in modern games Sebastian Lehmann Deferred Shading & Screen Space Effects 11. Februar 2014 3/23

Deferred Shading Motivation Deferred Shading: Two Passes for each object for each fragment store surface material properties in offscreen buffer Sebastian Lehmann Deferred Shading & Screen Space Effects 11. Februar 2014 4/23

Deferred Shading Motivation Deferred Shading: Two Passes for each object for each fragment for each light store surface material properties in offscreen buffer for each fragment fetch surface material properties from offscreen buffer compute lighting add to screen color Sebastian Lehmann Deferred Shading & Screen Space Effects 11. Februar 2014 4/23

Deferred Shading Motivation Deferred Shading: Two Passes for each object for each fragment for each light store surface material properties in offscreen buffer for each fragment fetch surface material properties from offscreen buffer compute lighting add to screen color requires time O((N + L) R) Sebastian Lehmann Deferred Shading & Screen Space Effects 11. Februar 2014 4/23

Deferred Shading Rendering Pipeline (Conventional method for comparison) Sebastian Lehmann Deferred Shading & Screen Space Effects 11. Februar 2014 5/23

Deferred Shading Rendering Pipeline Sebastian Lehmann Deferred Shading & Screen Space Effects 11. Februar 2014 5/23

Deferred Shading Demo Demo Sebastian Lehmann Deferred Shading & Screen Space Effects 11. Februar 2014 6/23

Deferred Shading Translucent Objects Problem: Translucent objects User sees multiple objects at same pixel Need to evaluate lighting model multiple times G-Buffer can t store this information Sebastian Lehmann Deferred Shading & Screen Space Effects 11. Februar 2014 7/23

Deferred Shading Translucent Objects Problem: Translucent objects User sees multiple objects at same pixel Need to evaluate lighting model multiple times G-Buffer can t store this information Solution: Render them separately Two methods: Multiple Layers: render each layer with Deferred Shading (Complex and costly) Forward Shading: render these objects using conventional method (But restrict the set of lights!) My choice Sebastian Lehmann Deferred Shading & Screen Space Effects 11. Februar 2014 7/23

Deferred Shading Rendering Pipeline Sebastian Lehmann Deferred Shading & Screen Space Effects 11. Februar 2014 8/23

Deferred Shading Rendering Pipeline Sebastian Lehmann Deferred Shading & Screen Space Effects 11. Februar 2014 8/23

Deferred Shading Demo Demo Sebastian Lehmann Deferred Shading & Screen Space Effects 11. Februar 2014 9/23

Ambient Occlusion Motivation Ambient Illumination Indirect light ( bounce ) also illuminates the scene Usually: Add constant illumination ( 5... 10 %) everywhere (But unrealistic need to reduce at occluded points) Sebastian Lehmann Deferred Shading & Screen Space Effects 11. Februar 2014 10/23

Ambient Occlusion Motivation Ambient Illumination Indirect light ( bounce ) also illuminates the scene Usually: Add constant illumination ( 5... 10 %) everywhere (But unrealistic need to reduce at occluded points) Ambient Occlusion Do not add the same global illumination everywhere (Have another factor influencing global illumination) Compute factor depending on local environment ( How much light can reach this point? ) Sebastian Lehmann Deferred Shading & Screen Space Effects 11. Februar 2014 10/23

Ambient Occlusion Example Starcraft 2 Ambient Occlusion Disabled Ambient Occlusion Enabled Sebastian Lehmann Deferred Shading & Screen Space Effects 11. Februar 2014 11/23

Ambient Occlusion Techniques Per-Object Ambient Occlusion Precompute occlusion map (texture) per object (Assumes static object mesh) Cheap technique But no inter-object ambient occlusion, bad for highly dynamic scenes (But for some games almost perfect, e.g. RTS) Sebastian Lehmann Deferred Shading & Screen Space Effects 11. Februar 2014 12/23

Ambient Occlusion Techniques Per-Object Ambient Occlusion Precompute occlusion map (texture) per object (Assumes static object mesh) Cheap technique But no inter-object ambient occlusion, bad for highly dynamic scenes (But for some games almost perfect, e.g. RTS) Screen-Space Ambient Occlusion (SSAO) Approximate reachability per pixel using rendered image Used in almost all modern games (or variations of SSAO) Sebastian Lehmann Deferred Shading & Screen Space Effects 11. Februar 2014 12/23

Ambient Occlusion SSAO Idea For each pixel, cast rays to look for occlusions The more rays hit objects, the less light comes in Use depth buffer Sebastian Lehmann Deferred Shading & Screen Space Effects 11. Februar 2014 13/23

Ambient Occlusion SSAO Idea For each pixel, cast rays to look for occlusions The more rays hit objects, the less light comes in Use depth buffer Problems Many rays per pixel are inefficient (Use only few and blur the result, but how?) Objects in the front: Are they occluding the scene in the back? (Information missing) What about the screen border? (Information missing) Sebastian Lehmann Deferred Shading & Screen Space Effects 11. Februar 2014 13/23

Ambient Occlusion SSAO Generating Rays How many rays, in which direction? Rays with random direction within hemisphere (2 to 8 per pixel) Different set of directions for each pixel (Repeating pattern of size 4x4 to 8x8) Post-process: blur with filter radius = pattern size (Effectively kills noise almost entirely) Per ray: only 2 or 3 marching steps are enough, random initial offset Sebastian Lehmann Deferred Shading & Screen Space Effects 11. Februar 2014 14/23

Ambient Occlusion SSAO Generating Rays How many rays, in which direction? Rays with random direction within hemisphere (2 to 8 per pixel) Different set of directions for each pixel (Repeating pattern of size 4x4 to 8x8) Post-process: blur with filter radius = pattern size (Effectively kills noise almost entirely) Per ray: only 2 or 3 marching steps are enough, random initial offset Wait... rand() on the GPU? Precompute noise texture Sebastian Lehmann Deferred Shading & Screen Space Effects 11. Februar 2014 14/23

Ambient Occlusion SSAO Problems Objects in the front They hide the scene behind them Information missing! Range check: If ray hits an object too far in the front ignore ray Configurable threshold This Buddah is flying in front of the background: Sebastian Lehmann Deferred Shading & Screen Space Effects 11. Februar 2014 15/23

Ambient Occlusion SSAO Problems Screen border Information missing! (Unless we rendered into enlarged framebuffer) Border check: If ray shoots outside screen ignore ray Effectively fades out the effect at screen borders (Almost unnoticable) Sebastian Lehmann Deferred Shading & Screen Space Effects 11. Februar 2014 16/23

Ambient Occlusion SSAO Problems Screen border Information missing! (Unless we rendered into enlarged framebuffer) Border check: If ray shoots outside screen ignore ray Effectively fades out the effect at screen borders (Almost unnoticable) Blurring might remove details Don t blur over edges / stay within same surface Compare depth and normal at source and target Known as geometry-aware / bilateral filter Sebastian Lehmann Deferred Shading & Screen Space Effects 11. Februar 2014 16/23

Ambient Occlusion SSAO Rendering Pipeline Sebastian Lehmann Deferred Shading & Screen Space Effects 11. Februar 2014 17/23

Ambient Occlusion SSAO Rendering Pipeline Sebastian Lehmann Deferred Shading & Screen Space Effects 11. Februar 2014 17/23

Ambient Occlusion SSAO Demo Demo Sebastian Lehmann Deferred Shading & Screen Space Effects 11. Februar 2014 18/23

Local Reflections How can we render (non-recursive) reflections? Planar mirrors: duplicate scene (Doesn t scale. OK for single mirror like ocean.) Single curved reflectors: cube maps (Doesn t scale either. Cool for cars.) Complex scene / general: screen space (Scales well, but information missing. Good for short distance ( local ) reflections) Sebastian Lehmann Deferred Shading & Screen Space Effects 11. Februar 2014 19/23

Local Reflections in Screen Space Idea Again ray casting, now along reflection vector ( 8 to 60 steps) When intersection found duplicate that color Non-perfect reflectors: add random jitter to ray direction Sebastian Lehmann Deferred Shading & Screen Space Effects 11. Februar 2014 20/23

Local Reflections in Screen Space Idea Again ray casting, now along reflection vector ( 8 to 60 steps) When intersection found duplicate that color Non-perfect reflectors: add random jitter to ray direction Problems, problems, problems... What if (real) intersection is behind occluder or outside screen? (Information missing) Too large step size: we miss the intersection! (Did we only miss it, or is something in front?) What if the intersection is a back face (and thus invisible)? (Information missing) Should we reflect the whole color or only diffuse part? (Remember: specular lighting is view-dependent!) Sebastian Lehmann Deferred Shading & Screen Space Effects 11. Februar 2014 20/23

Local Reflections in Screen Space Finding the best intersection Proceed ray casting until we find pixel with lower depth Cancel ray casting after k steps or when outside of the screen Sebastian Lehmann Deferred Shading & Screen Space Effects 11. Februar 2014 21/23

Local Reflections in Screen Space Finding the best intersection Proceed ray casting until we find pixel with lower depth Cancel ray casting after k steps or when outside of the screen For each sample which has lower depth and is front face: Remember the sample with smallest depth error If depth way too small (configurable tolerance): Assume there is an occluder Optional: recover from small ocluders by counting these cases Sebastian Lehmann Deferred Shading & Screen Space Effects 11. Februar 2014 21/23

Local Reflections in Screen Space Finding the best intersection Proceed ray casting until we find pixel with lower depth Cancel ray casting after k steps or when outside of the screen For each sample which has lower depth and is front face: Remember the sample with smallest depth error If depth way too small (configurable tolerance): Assume there is an occluder Optional: recover from small ocluders by counting these cases Final result is sample with smallest depth error, but fade out effect when error too large fade out effect when almost at screen border fade out effect when almost a back face Sebastian Lehmann Deferred Shading & Screen Space Effects 11. Februar 2014 21/23

Local Reflections in SS Rendering Pipeline Sebastian Lehmann Deferred Shading & Screen Space Effects 11. Februar 2014 22/23

Local Reflections in SS Rendering Pipeline Sebastian Lehmann Deferred Shading & Screen Space Effects 11. Februar 2014 22/23

Local Reflections in SS Rendering Pipeline Sebastian Lehmann Deferred Shading & Screen Space Effects 11. Februar 2014 22/23

Local Reflections in SS Demo Demo Sebastian Lehmann Deferred Shading & Screen Space Effects 11. Februar 2014 23/23