VAO++: Practical Volumetric Ambient Occlusion for Games

Similar documents
Ambient Occlusion. Ambient Occlusion (AO) "shadowing of ambient light "darkening of the ambient shading contribution

Screen Space Ambient Occlusion. Daniel Kvarfordt & Benjamin Lillandt

TSBK03 Screen-Space Ambient Occlusion

Dominic Filion, Senior Engineer Blizzard Entertainment. Rob McNaughton, Lead Technical Artist Blizzard Entertainment

Advanced Computer Graphics CS 563: Screen Space GI Techniques: Real Time

CS354R: Computer Game Technology

Rendering Algorithms: Real-time indirect illumination. Spring 2010 Matthias Zwicker

Enhancing Traditional Rasterization Graphics with Ray Tracing. March 2015

CMSC427 Advanced shading getting global illumination by local methods. Credit: slides Prof. Zwicker

Screen Space Ambient Occlusion TSBK03: Advanced Game Programming

Advanced Post Processing

Shadows. COMP 575/770 Spring 2013

BCC Sphere Transition

Real-Time Universal Capture Facial Animation with GPU Skin Rendering

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

GUERRILLA DEVELOP CONFERENCE JULY 07 BRIGHTON

Adaptive Point Cloud Rendering

Pipeline Operations. CS 4620 Lecture 14

Advanced Ambient Occlusion Methods for Modern Games

The Making of Seemore WebGL. Will Eastcott, CEO, PlayCanvas

SCREEN-SPACE FAR-FIELD AMBIENT OCCLUSION. Ville Timonen

Deferred Rendering Due: Wednesday November 15 at 10pm

COMPUTING SCIENCE. Real-Time Ambient Occlusion on the Playstation3. Dominic Goulding, Richard Smith, Lee Clark, Gary Ushaw and Graham Morgan

EECS 487: Interactive Computer Graphics

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

LIGHTING - 1. Note. Lights. Ambient occlusion

Enabling immersive gaming experiences Intro to Ray Tracing

INFOGR Computer Graphics. J. Bikker - April-July Lecture 10: Ground Truth. Welcome!

Game Technology. Lecture Physically Based Rendering. Dipl-Inform. Robert Konrad Polona Caserman, M.Sc.

03 RENDERING PART TWO

Ambien Occlusion. Lighting: Ambient Light Sources. Lighting: Ambient Light Sources. Summary

Global Illumination CS334. Daniel G. Aliaga Department of Computer Science Purdue University

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

Computer Graphics Shadow Algorithms

High-quality Shadows with Improved Paraboloid Mapping

The Rasterization Pipeline

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

Topics and things to know about them:

DEFERRED RENDERING STEFAN MÜLLER ARISONA, ETH ZURICH SMA/

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

Horizon-Based Ambient Occlusion using Compute Shaders. Louis Bavoil

Sung-Eui Yoon ( 윤성의 )

Real-Time Hair Rendering on the GPU NVIDIA

Announcements. Written Assignment 2 out (due March 8) Computer Graphics

Sparkling Effect. February 2007 WP _v01

Point based global illumination is now a standard tool for film quality renderers. Since it started out as a real time technique it is only natural

Multi-View Soft Shadows. Louis Bavoil

PowerVR Hardware. Architecture Overview for Developers

Render all data necessary into textures Process textures to calculate final image

After the release of Maxwell in September last year, a number of press articles appeared that describe VXGI simply as a technology to improve

Accelerated Ambient Occlusion Using Spatial Subdivision Structures

GLSL Applications: 2 of 2

Shading, lighting, & BRDF Theory. Cliff Lindsay, PHD

Graphics for VEs. Ruth Aylett

Applications of Explicit Early-Z Culling

Computergrafik. Matthias Zwicker. Herbst 2010

CS451Real-time Rendering Pipeline

Culling. Computer Graphics CSE 167 Lecture 12

CS 130 Final. Fall 2015

Pipeline Operations. CS 4620 Lecture 10

Real-Time Rendering of a Scene With Many Pedestrians

Efficient Screen-Space Approach to High-Quality Multi-Scale Ambient Occlusion

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

Advanced Graphics. Global Illumination. Alex Benton, University of Cambridge Supported in part by Google UK, Ltd

Beyond Programmable Shading Course ACM SIGGRAPH 2010 Bending the Graphics Pipeline

Scalable multi-gpu cloud raytracing with OpenGL

Point based Rendering

CS 381 Computer Graphics, Fall 2008 Midterm Exam Solutions. The Midterm Exam was given in class on Thursday, October 23, 2008.

Practical Techniques for Ray Tracing in Games. Gareth Morgan (Imagination Technologies) Aras Pranckevičius (Unity Technologies) March, 2014

Getting fancy with texture mapping (Part 2) CS559 Spring Apr 2017

INFOGR Computer Graphics. J. Bikker - April-July Lecture 10: Shading Models. Welcome!

9. Illumination and Shading

The Animation Process. Lighting: Illusions of Illumination

Computer Graphics. Illumination and Shading

Chapter 10 Computation Culling with Explicit Early-Z and Dynamic Flow Control

CS 354R: Computer Game Technology

Shading 1: basics Christian Miller CS Fall 2011

GPU-Accelerated Deep Shadow Maps

Deus Ex is in the Details

LEVEL 1 ANIMATION ACADEMY2010

Evolution of GPUs Chris Seitz

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

Dynamic Ambient Occlusion and Indirect Lighting. Michael Bunnell NVIDIA Corporation

Animation Basics. Learning Objectives

The Rasterization Pipeline

Computer Graphics. Bing-Yu Chen National Taiwan University

High Quality Adaptive Soft Shadow Mapping

Property of: Entrada Interactive. PBR Workflow. Working within a PBR-based environment

Here s the general problem we want to solve efficiently: Given a light and a set of pixels in view space, resolve occlusion between each pixel and

Universiteit Leiden Computer Science

Hidden Surface Removal

Rasterization Overview

CS 464 Review. Review of Computer Graphics for Final Exam

Stereo Wrap + Motion. Computer Vision I. CSE252A Lecture 17

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

global light baking software

Ray Tracing. Computer Graphics CMU /15-662, Fall 2016

Enhancing Traditional Rasterization Graphics with Ray Tracing. October 2015

rendering rasterization based rendering pipelined architecture, parallel mostly triangles (lines and points possible too)

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

Transcription:

VAO++: Practical Volumetric Ambient Occlusion for Games Jakub Bokšanský, Adam Pospíšil (Project Wilberforce) Jiří Bittner (CTU in Prague) EGSR 19.6.2017

Motivation Focus on performance (highly optimized implementation in Unity) Unity s built-in SSAO not fast enough and contains artifacts VR compatibility (single pass stereo, explicit stereo support) VAO++ Unity s SSAO 2

SSAO Adds proximity shadows (enclosed areas, creases, corners ) Contributes significantly to perceived realism Calculated in screen space Limitations: No information about geometry what is not seen Advantages Feasible in real time on current GPUs Easy integration with renderers No pre-processing needed [Mittring07], [Bavoil08], [Ritschel09] Scene without effects VAO++ 3

SSAO Implementation For each shaded point, calculate visibility (how much is it obscured by surrounding geometry) Surrounding geometry is sampled in normal oriented hemisphere of radius R 4

Volumetric Ambient Occlusion [Szirmay-Kalos10] Transforms hemispherical domain into smaller tangent sphere Uses samples within a disc located in the center of tangent sphere oriented towards camera (2D samples instead of 3D) Each sample represents a line segment inside the sphere in given sampling point Length of the line segment is taken as weight of the sample Samples never overlap 5

Volumetric Ambient Occlusion II. Algorithm calculates where geometry lies wrt. tangent sphere A - Inside (see image) B - Behind (completely unoccluded) C - In front of (completely occluded) Visibility (occlusion factor) is calculated as ratio of unoccluded volume to total volume of the tangent sphere 6

VAO++ Extensions and improvements to VAO algorithm Improvements of visual quality Samples generation Luminance sensitivity Depth range check Performance optimizations Adaptive sampling Culling pre-pass 7

Samples generation VAO algorithm requires uniformly distributed samples within a disk Poisson distribution is suitable Interleaved sampling Size 3x3 - good improvement in quality (number of samples increased virtually 9 times) easy to remove HF noise by low pass filter of matching size Problem with selecting suitable rotation angles Points should not overlap after rotations (prevent sampling of same area) 8

Samples generation - selecting rotations Selecting rotations after generating Poisson distribution yields suboptimal results Goal is to select angles that maximize the distance between positions of rotated samples (left) rotations selected after generating sample-set. (right) our method 9

Samples generation - selecting rotations II. Take rotations into account when generating Poisson disk distribution We use uniform-step 9 rotations Union of sample-set rotated by all angles satisfies Poisson disk distribution requirements optimized non-optimized 10

Samples generation - selecting rotations III. Final step is to select best permutation of rotated samples Maximize distance between all samples Feasible for 8 samples or less, for larger sample-sets we calculate best permutation for groups of size 8 Morton-Ordered for better cache coherence generated sample-set best permutation union of all rotations 11

Samples generation - selecting rotations IV. Comparison of effect results with sample-set non-optimized (left) vs optimized (right) Loupe contains enlarged area 12

Luminance sensitivity I. SSAO should be applied on ambient color component before lighting (BRDF) is calculated - not always possible or practical VAO++ applies occlusion as final step to rendered image can put occlusion on brightly lit areas, specular highlights, light sources etc. Scene without effects VAO++ applied 13

Luminance sensitivity II. To counteract this defect consider luminance of target surface when applying VAO component Falloff function to suppress occlusion on bright surfaces User can set brightness threshold and slope 14

Luminance sensitivity III. As a luminance use either relative luminance function or Value component of HSV model Scene without effects VAO++ VAO++ with luminance sensitivity 15

Depth Range Check No geometry information behind what is seen by camera Thickness of occluders unknown VAO considers all occluders infinitely thick - leading to unpleasant halo artifact 16

Depth Range Check II. Implement a falloff function describing thickness of geometry seen by camera smoothly decreases thickness with increasing distance Resulting occlusion also smoothly decreases around depth discontinuities This suppresses halo significantly and works well for dynamic scenes 17

Depth Range Check III. without depth range check with depth range check 18

VAO++ Extensions and improvements to VAO algorithm Improvements of visual quality Samples generation Luminance sensitivity Depth range check Performance optimizations Adaptive sampling Culling pre-pass 19

Adaptive Sampling To improve performance use only as many samples as needed VAO uses kernel that always displays as a disk on the screen This disk surface shrinks with increasing distance from camera Use fewer samples far away Aim is to achieve same density of samples in post-perspective image space 20

Adaptive Sampling II. Pick number of samples to use based on kernel disk surface area after projection onto the screen User selects surface area for which lowest number of samples is used Algorithm doubles number of samples used when surface area doubles 21

Adaptive Sampling III. Comparison of adaptive sampling on/off Adaptive On Adaptive Off 22

Culling pre-pass Areas where no occlusion occurs can be omitted Estimate such areas first, calculate VAO only where needed Calculate lower quality VAO in a separate pass Use result as an estimation Occlusion estimation texture Rendered scene 23

Culling pre-pass II. Areas without estimated occlusion could contain undetected details Handle culling candidates in one of following ways: Greedy variant - complete omission Careful variant - eight samples regardless of quality settings Images are 8x zoomed and gamma corrected Greedy Careful Off 24

Culling pre-pass III. Performance gain scales with resolution Especially useful for large screens (4k, VR, etc.) Quality loss almost imperceptible (careful variant) Culling On Culling Off 25

Implementation in Unity Image effect attached to camera C# Script + CG/HLSL shader file Alternative Command Buffer implementation Unity provides depth and normals texture Inject into pipeline - after opaque rendering pass Read source texture (rendering pipeline output) Write into destination texture Octa encoded normals + linearized depth packed into 32 bits Single Pass Stereo Rendering (VR) Both eyes in single texture Special macros for handling split between eyes Need to calculate effect in world-space 26

Comparison - 16 SPP, 1920x1080, GeForce GT555M, same radius VAO++ (48ms) - Speedup 1,25x Unity s SSAO (60ms) 27

Comparison Raytraced AO VAO++ Unity s SSAO 28

Comparison Effect Off 29

Comparison Effect On 30

Comparison - Video 31

Performance results 32 SPP 1920x1080 16 SPP 1920x1080 32

Conclusion Samples generation taking rotations for interleaved sampling into account Luminance sensitivity and depth range check for more believable results Adaptive sampling and culling pre-pass for higher performance with minimal quality loss Optimized Unity implementation (available on Asset Store) Scene by Evgenia 33

Project Wilberforce projectwilberforce.github.io projectwilberforce@gmail.com Demo available at: https://projectwilberforce.github.io/vaodemo/ Thank you! 34