SDSM SAMPLE DISTRIBUTION SHADOW MAPS The Evolution Of PSSM.

Slides:



Advertisements
Similar presentations
Accelerating Real-Time Shading with Reverse Reprojection Caching Diego Nehab 1 Pedro V. Sander 2 Jason Lawrence 3 Natalya Tatarchuk 4 John R. Isidoro 4.
Advertisements

Exploration of advanced lighting and shading techniques
Software Development Life Cycle. Why Do We need Software Development Models Helps to make sure that we cover all bases during planning and implementation.
Solving Some Common Problems in a Modern Deferred Rendering Engine
Statistical Techniques I EXST7005 Sample Size Calculation.
Ray tracing. New Concepts The recursive ray tracing algorithm Generating eye rays Non Real-time rendering.
Exponential Functions Logarithmic Functions
Week 11 - Wednesday.  Image based effects  Skyboxes  Lightfields  Sprites  Billboards  Particle systems.
Sampling Distributions
Two Methods for Fast Ray-Cast Ambient Occlusion Samuli Laine and Tero Karras NVIDIA Research.
Shadow and Shadow Maps [5]. Object without shadow seem floating above the scene Shadow gives the depth information Shadow gives the information of the.
UW EXTENSION CERTIFICATE PROGRAM IN GAME DEVELOPMENT 2 ND QUARTER: ADVANCED GRAPHICS Shadows.
Projection Matrix Tricks Eric Lengyel Outline  Projection Matrix Internals  Infinite Projection Matrix  Depth Modification  Oblique Near Clipping.
Real-Time Rendering Paper Presentation Logarithmic Perspective Shadow Maps Brandon Lloyd Naga Govindaraju Cory Quammen Steve Molnar Dinesh Manocha Slides.
Rasterization and Ray Tracing in Real-Time Applications (Games) Andrew Graff.
Shadow Silhouette Maps Pradeep Sen, Mike Cammarano, Pat Hanrahan Stanford University.
Skin Rendering GPU Graphics Gary J. Katz University of Pennsylvania CIS 665 Adapted from David Gosselin’s Power Point and article, Real-time skin rendering,
1 Dynamic Shadows and Lighting for Walkthrus of Large Models Brandon Lloyd COMP 258 December 2002.
Paper by Alexander Keller
LOGO Shadows On the GPU Presented by Lukai Lan. LOGO Contents  Introductions  Recent Shadow Maps  What we are NOT covering today  Perspective Shadow.
3D Rendering – A beginners guide Phil Carlisle – University of Bolton.
Post-rendering Cel Shading & Bloom Effect
09/18/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Bump Mapping Multi-pass algorithms.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
Advanced Computer Graphics Bas Zalmstra Marries van de Hoef Tim de Jager.
Shadows Computer Graphics. Shadows Shadows Extended light sources produce penumbras In real-time, we only use point light sources –Extended light sources.
Erdem Alpay Ala Nawaiseh. Why Shadows? Real world has shadows More control of the game’s feel  dramatic effects  spooky effects Without shadows the.
Computer Graphics Mirror and Shadows
Shadow No, not the Hank Marvin kind!. Go to: ows.html ows.html.
Aaron Schultz. Idea: Objects close to a light shadow those far away. Anything we can see from the light’s POV is lit. Everything hidden is dark. Distance.
Computer graphics & visualization REYES Render Everything Your Eyes Ever Saw.
NVIDIA PROPRIETARY AND CONFIDENTIAL Occlusion (HP and NV Extensions) Ashu Rege.
CSM Scrolling An acceleration technique for the rendering of cascaded shadow maps.
CS 376 Introduction to Computer Graphics 04 / 16 / 2007 Instructor: Michael Eckmann.
Binomial Expansion Reflection Akar Khoschnau, Grade 8B.
Emerging Technologies for Games Alpha Sorting and “Soft” Particles CO3303 Week 15.
Shadows via Projection Glenn G. Chappell U. of Alaska Fairbanks CS 381 Lecture Notes Wednesday, November 5, 2003.
Fast Cascade VSM By Zhang Jian.
1 What to do before class starts??? Download the sample database from the k: drive to the u: drive or to your flash drive. The database is named “FormBelmont.accdb”
 UDK and Unity are both game engines that offer a wide variety of options to create pretty much any type of game.  Each game engine has a built in environment.
Shader Study 이동현. Vision engine   Games Helldorado The Show Warlord.
Grade Book Database Presentation Jeanne Winstead CINS 137.
Advanced Computer Graphics Shadow Techniques CO2409 Computer Graphics Week 20.
H M V Amortized Supersampling Dec. 18, 2009, Pacifico Yokohama, Japan L EI Y ANG H, D IEGO N EHAB M, P EDRO V. S ANDER H, P ITCHAYA S ITTHI - AMORN V,
Lecture 6 Rasterisation, Antialiasing, Texture Mapping,
Single Pass Point Rendering and Transparent Shading Paper by Yanci Zhang and Renato Pajarola Presentation by Harmen de Weerd and Hedde Bosman.
Maths & Technologies for Games Graphics Optimisation - Batching CO3303 Week 5.
COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 29, 2015 RENDERING RASTERIZATION RAY CASTING PROGRAMMABLE SHADERS.
Edison Gao 主讲人:高原. GameFinal A Next-Gen 3D Game Engine Edison Gao.
Real-Time Dynamic Shadow Algorithms Evan Closson CSE 528.
09/23/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Reflections Shadows Part 1 Stage 1 is in.
CHC ++: Coherent Hierarchical Culling Revisited Oliver Mattausch, Jiří Bittner, Michael Wimmer Institute of Computer Graphics and Algorithms Vienna University.
Lecture 5 Page 1 CS 111 Summer 2013 Bounded Buffers A higher level abstraction than shared domains or simple messages But not quite as high level as RPC.
SHADOW CASTER CULLING FOR EFFICIENT SHADOW MAPPING JIŘÍ BITTNER 1 OLIVER MATTAUSCH 2 ARI SILVENNOINEN 3 MICHAEL WIMMER 2 1 CZECH TECHNICAL UNIVERSITY IN.
Siggraph 2009 RenderAnts: Interactive REYES Rendering on GPUs Kun Zhou Qiming Hou Zhong Ren Minmin Gong Xin Sun Baining Guo JAEHYUN CHO.
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.
Real-Time Soft Shadows with Adaptive Light Source Sampling
Deep Partitioned Shadow Volumes Using Stackless and Hybrid Traversals
Week 11 - Wednesday CS361.
The Graphics Rendering Pipeline
© University of Wisconsin, CS559 Fall 2004
CSCE 441: Computer Graphics Hidden Surface Removal
Flicker Free Animation Using Vray
UMBC Graphics for Games
Lecture 13 Clipping & Scan Conversion
UMBC Graphics for Games
A Hierarchical Shadow Volume Algorithm
Chapter XV Shadow Mapping
Frame Buffer Applications
Frame Buffers Fall 2018 CS480/680.
Presentation transcript:

SDSM SAMPLE DISTRIBUTION SHADOW MAPS The Evolution Of PSSM

QUICKIE OVERVIEW OF PSSM Goal is to hide artifacts resulting from wasted texture space Goal is to hide artifacts resulting from wasted texture space Stable CSM Stable CSM Scene-dependent cascade divisions (smoother transitions from one cascade to another) Scene-dependent cascade divisions (smoother transitions from one cascade to another) Increase Texture Resolution Increase Texture Resolution Blur the shit out of it Blur the shit out of it

GOAL OF SDSM Instead of hiding artifacts, lets make them borderline non-existent. Instead of hiding artifacts, lets make them borderline non-existent. How? How? By making sure we get the most out of our texture resolution. Focus on reducing the waste, and you’ll no longer have to worry about hiding artifacts, because in most cases you’ll get sub-pixel shadow resolution. By making sure we get the most out of our texture resolution. Focus on reducing the waste, and you’ll no longer have to worry about hiding artifacts, because in most cases you’ll get sub-pixel shadow resolution.

WHAT DOES IT LOOK LIKE? Well damn, Alex, that looks amazing! Yes, yes it does.

SO HOW DO WE MAKE IT GO? SDSM operates similarly to PSSM, but with a few key differences… As always, either start with a depth prepass for forward renderers, or your depth/stencil from your gbuffer pass As always, either start with a depth prepass for forward renderers, or your depth/stencil from your gbuffer pass

Next, we apply a min/max reduction of our depth buffer using a compute shader by finding our samples and clamping our z-min and z-max to them. Next, we apply a min/max reduction of our depth buffer using a compute shader by finding our samples and clamping our z-min and z-max to them. Why? Why? We’re going to partition that space logarithmically We’re going to partition that space logarithmically It’s been proven by several wicked-smart CS researchers that logarithmic distribution of shadow partitions produces the least chance of scene-independent error (and smoother transitions), but only if the entire space is covered. It’s been proven by several wicked-smart CS researchers that logarithmic distribution of shadow partitions produces the least chance of scene-independent error (and smoother transitions), but only if the entire space is covered. By doing this z-reduction, we’re ensuring that our bounds are clamped to covered space. By doing this z-reduction, we’re ensuring that our bounds are clamped to covered space. It reduces the wasted space where we aren’t drawing anything. It reduces the wasted space where we aren’t drawing anything.

As mentioned, the next step is to get the logarithmic split bounds based on the reduced z-depth. As mentioned, the next step is to get the logarithmic split bounds based on the reduced z-depth. Can be done CPU or GPU-side. In my case I’m doing it GPU-side. Can be done CPU or GPU-side. In my case I’m doing it GPU-side. Once we have our splits, we do a reduction on the bounds of each to confine them to our sample space, kind of like we did with the depth buffer. Once we have our splits, we do a reduction on the bounds of each to confine them to our sample space, kind of like we did with the depth buffer. This is where we save the most quality, as you can see below This is where we save the most quality, as you can see below

Then, we create light view-projection matrices to wrap around these bounds just like we do in PSSM, and render shadow maps with them too. Then, we create light view-projection matrices to wrap around these bounds just like we do in PSSM, and render shadow maps with them too. From there you just apply those shadow maps like you normally would. From there you just apply those shadow maps like you normally would. You can optionally convert them to EVSM (exponential variance shadow maps), or do some PCF, etc. You can optionally convert them to EVSM (exponential variance shadow maps), or do some PCF, etc. You can also add a blur pass You can also add a blur pass Most remaining artifacts seem to come from hard edges meeting curved edges Most remaining artifacts seem to come from hard edges meeting curved edges In my experience, a little blur cleans up 98% of these In my experience, a little blur cleans up 98% of these You can apply a stable CSM algorithm like I mentioned before, but you shouldn’t need it because crawling should be almost non-existent. You’d probably just end up wasting texture space which would reduce your quality anyway. You can apply a stable CSM algorithm like I mentioned before, but you shouldn’t need it because crawling should be almost non-existent. You’d probably just end up wasting texture space which would reduce your quality anyway.

BENEFITS Shadows that look amazing Shadows that look amazing Smoother cascade transitions Smoother cascade transitions Roughly the same or better performance when compared to PSSM Roughly the same or better performance when compared to PSSM Tighter bound frusta allow for more aggressive culling Tighter bound frusta allow for more aggressive culling Better quality for your texture space allows you to use smaller shadow maps Better quality for your texture space allows you to use smaller shadow maps Worst-case scenario is PSSM quality if the entire camera space is covered in shadow Worst-case scenario is PSSM quality if the entire camera space is covered in shadow Never happens, so…. yeah. You’re basically guaranteed to get better quality. Never happens, so…. yeah. You’re basically guaranteed to get better quality. Scene-independent Scene-independent

DOWNSIDES Because your light-space partition calculations are done on the GPU, you need to be a little conservative with your CPU-side frustum culling to ensure you see everything in your scene. Because your light-space partition calculations are done on the GPU, you need to be a little conservative with your CPU-side frustum culling to ensure you see everything in your scene. Can be solved by stalling the CPU until the GPU is done and read back the partition information to do culling. Can be solved by stalling the CPU until the GPU is done and read back the partition information to do culling. Not as expensive as it sounds, but it’s still perf that you might not want to lose. Not as expensive as it sounds, but it’s still perf that you might not want to lose. Use predictive culling based on the previous frame’s results Use predictive culling based on the previous frame’s results Can lead to issues for moving objects or a moving camera (obviously not a good solution for games) Can lead to issues for moving objects or a moving camera (obviously not a good solution for games) SDSM has a somewhat tricky implementation when compared to other techniques. SDSM has a somewhat tricky implementation when compared to other techniques.

CONCLUSION This is the new standard that either not many people know about, or not many people use (at the time of writing this). Some games that use SDSM include: This is the new standard that either not many people know about, or not many people use (at the time of writing this). Some games that use SDSM include: Destiny Destiny The Order: 1886 The Order: 1886 Everyone should consider this shadow option in the future in place of standard PSSM. Everyone should consider this shadow option in the future in place of standard PSSM. The end! The end!

RESOURCE AND CODE IMPLEMENTATION ^ This guy, Andrew Lauritzen, is the man when it comes to shadows. Credit for this presentation’s resources is entirely his, so be sure to check out his research for more details. ^ This guy, Andrew Lauritzen, is the man when it comes to shadows. Credit for this presentation’s resources is entirely his, so be sure to check out his research for more details. Source code for this will depend heavily on your renderer implementation, so I have not added my own code samples. However, his source is included in the link above so you can adapt it to your engine as well. Source code for this will depend heavily on your renderer implementation, so I have not added my own code samples. However, his source is included in the link above so you can adapt it to your engine as well.