Real-Time Soft Shadows with Adaptive Light Source Sampling

Slides:



Advertisements
Similar presentations
Exploration of advanced lighting and shading techniques
Advertisements

An Optimized Soft Shadow Volume Algorithm with Real-Time Performance Ulf Assarsson 1, Michael Dougherty 2, Michael Mounier 2, and Tomas Akenine-Möller.
Parallax-Interpolated Shadow Map Occlusion
Computer graphics & visualization Global Illumination Effects.
Week 10 - Monday.  What did we talk about last time?  Global illumination  Shadows  Projection shadows  Soft shadows.
Two Methods for Fast Ray-Cast Ambient Occlusion Samuli Laine and Tero Karras NVIDIA Research.
Real-Time Rendering SPEACIAL EFFECTS Lecture 03 Marina Gavrilova.
Copyright  Philipp Slusallek Cs fall IBR: Model-based Methods Philipp Slusallek.
Shadow Silhouette Maps Pradeep Sen Mike Cammarano Pat Hanrahan Stanford University Speaker: Alvin Date: 8/24/2003 SIGGRAPH 2003.
A Geometry-based Soft Shadow Volume Algorithm using Graphics Hardware Speaker: Alvin Date:2003/7/23 SIGGRAPH 2003 Ulf Assarsson Tomas Akenine-Moller.
Shadow Algorithms Gerald Matzka Computer Science Seminar.
Approximate Soft Shadows on Arbitrary Surfaces using Penumbra Wedges Tomas Akenine-Möller Ulf Assarsson Department of Computer Engineering, Chalmers University.
Optimized Subdivisions for Preprocessed Visibility Oliver Mattausch, Jiří Bittner, Peter Wonka, Michael Wimmer Institute of Computer Graphics and Algorithms.
Perspective Shadow Maps Marc Stamminger REVES/INRIA, Sophia-Antipolis, France now at: Bauhaus-Universität, Weimar, Germany George Drettakis REVES/INRIA,
Outline Reprojection and data reuse Reprojection and data reuse – Taxonomy Bidirectional reprojection Bidirectional reprojection.
Computer Graphics Shadows
1 A Hierarchical Shadow Volume Algorithm Timo Aila 1,2 Tomas Akenine-Möller 3 1 Helsinki University of Technology 2 Hybrid Graphics 3 Lund University.
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 Algorithms Ikrima Elhassan.
NVIDIA PROPRIETARY AND CONFIDENTIAL Occlusion (HP and NV Extensions) Ashu Rege.
Visibility Queries Using Graphics Hardware Presented by Jinzhu Gao.
Today More raytracing stuff –Soft shadows and anti-aliasing More rendering methods –The text book is good on this –I’ll be using images from the CDROM.
Advanced Computer Graphics Depth & Stencil Buffers / Rendering to Textures CO2409 Computer Graphics Week 19.
Real-Time Rendering SPEEDING UP RENDERING Lecture 04 Marina Gavrilova.
1 Shadows (2) ©Anthony Steed Overview n Shadows – Umbra Recap n Penumbra Analytical v. Sampling n Analytical Aspect graphs Discontinuity meshing.
Shadows. Shadows is important in scenes, consolidating spatial relationships “Geometric shadows”: the shape of an area in shadow Early days, just pasted.
Shadow Mapping Chun-Fa Chang National Taiwan Normal University.
2 COEN Computer Graphics I Evening’s Goals n Discuss application bottleneck determination n Discuss various optimizations for making programs execute.
Hardware-accelerated Rendering of Antialiased Shadows With Shadow Maps Stefan Brabec and Hans-Peter Seidel Max-Planck-Institut für Informatik Saarbrücken,
Sample Based Visibility for Soft Shadows using Alias-free Shadow Maps Erik Sintorn – Ulf Assarsson – uffe.
Hierarchical Penumbra Casting Samuli Laine Timo Aila Helsinki University of Technology Hybrid Graphics, Ltd.
- Laboratoire d'InfoRmatique en Image et Systèmes d'information
Global Illumination. Local Illumination  the GPU pipeline is designed for local illumination  only the surface data at the visible point is needed to.
Coherent Hierarchical Culling: Hardware Occlusion Queries Made Useful Jiri Bittner 1, Michael Wimmer 1, Harald Piringer 2, Werner Purgathofer 1 1 Vienna.
Yizhou Yu Texture-Mapping Real Scenes from Photographs Yizhou Yu Computer Science Division University of California at Berkeley Yizhou Yu Computer Science.
Bounding Volume Hierarchy. The space within the scene is divided into a grid. When a ray travels through a scene, it only passes a few boxes within the.
COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 29, 2015 RENDERING RASTERIZATION RAY CASTING PROGRAMMABLE SHADERS.
Real-Time Dynamic Shadow Algorithms Evan Closson CSE 528.
Shadows David Luebke University of Virginia. Shadows An important visual cue, traditionally hard to do in real-time rendering Outline: –Notation –Planar.
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.
SHADOW CASTER CULLING FOR EFFICIENT SHADOW MAPPING JIŘÍ BITTNER 1 OLIVER MATTAUSCH 2 ARI SILVENNOINEN 3 MICHAEL WIMMER 2 1 CZECH TECHNICAL UNIVERSITY IN.
Shuen-Huei Guan Seminar in CMLab, NTU
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
Electronic Visualization Laboratory University of Illinois at Chicago “Fast And Reliable Space Leaping For Interactive Volume Rendering” by Ming Wan, Aamir.
Visibility-Driven View Cell Construction Oliver Mattausch, Jiří Bittner, Michael Wimmer Institute of Computer Graphics and Algorithms Vienna University.
COMPUTER GRAPHICS CHAPTER 38 CS 482 – Fall 2017 GRAPHICS HARDWARE
- Introduction - Graphics Pipeline
Discrete Techniques.
Chapter X Advanced Texturing
A Geometry-Based Soft Shadow Volume Algorithm Using Graphics Hardware
Robust Shadow Maps for Large Environments
3D Graphics Rendering PPT By Ricardo Veguilla.
From Turing Machine to Global Illumination
Hybrid Ray Tracing of Massive Models
Jim X. Chen George Mason University
© University of Wisconsin, CS559 Fall 2004
(c) 2002 University of Wisconsin
Real-time Rendering Shadow Maps
Visibility Computations
Real-time Volumetric Lighting in Participating Media
Real-Time Rendering Intro to Shadows
Chapter XVI Texturing toward Global Illumination
UMBC Graphics for Games
(c) 2002 University of Wisconsin
A Hierarchical Shadow Volume Algorithm
Efficient Importance Sampling Techniques for the Photon Map
Chapter XV Shadow Mapping
Frame Buffer Applications
Presentation transcript:

Real-Time Soft Shadows with Adaptive Light Source Sampling Michael Schwärzler Supervisor: Oliver Mattausch Institute of Computer Graphics and Algorithms Vienna University of Technology

Outline Introduction Adaptive Light Source Sampling Shadows in Computer Graphics SOFT Shadows Fake vs. physical correct approaches Adaptive Light Source Sampling Generating samples Reprojection step Comparison step Rendering n Light Source Samples Results Limitations Conclusion Michael Schwärzler

Introduction – Shadows provide information on the relative position of an object in space reveal presence of occluded objects provide information on light source size Help to estimate the geometry of the receiver Hard shadow algorithms widely used in games & applications! Cast by point light sources! Binary decision Algorithms: Shadow Volumes algorithm Shadow Mapping algorithm (see previous talk) Michael Schwärzler

Introduction – SOFT Shadows are cast by area light sources  3D visibility problem  longer rendering time! consist of umbra & penumbra significantly increase the realism hide border artifacts Umbra & penumbra extents depend on relationship between light source size, distance from occluder to receiver and distance from light source to occluder Fast & correct calculation of soft shadows is a complex task & area of active research! Michael Schwärzler

Introduction – SOFT Shadows Rendering physically correct soft shadows with real-time frame rates (>60 fps) is hard to achieve! Physically correct approaches Take samples from all over the light source, sum them up Computationally expensive! „fake“ approaches PCSS, backprojection, … Human visual system not very sensitive to the geometrical correctness of soft shadows… Calculated using a single sample from the middle of the light source  hard shadow Fake penumbra is estimated & added to the umbra Problems: several occluders, large light sources, incorrect penumbra estimation Michael Schwärzler

Adaptive Light Source Sampling Size of penumbra regions hard to predict Sampling density has to be constantly high to guarantee smooth shadow transitions Taking many samples is expensive Adaptive Light Source Sampling: Select sampling points adaptively Selection is view-dependant Avoid generation and evaluation of shadow maps which do not contribute to an increased image quality  rendering time can be saved Physically correct shadows! quality and accuracy comparable to shadows which are generated with a fixed sampling rate Michael Schwärzler

Adaptive Light Source Sampling Generation of samples: Start with initial shadow maps Compare maps If necessary: subdivide 1D-Source: 2D-Source: Michael Schwärzler

Adaptive Light Source Sampling Reprojection & Comparison Step: Shadow maps are reprojected into same space  can be compared there Projection Center: View Point  makes the comparison result view-dependant! Compare depth values: Values are considered equal if: Output depth = 1.0 Otherwise: Output depth = 0.0 Michael Schwärzler

Adaptive Light Source Sampling Get number of pixels with different depths: Exploit hardware occlusion query! Used to determine the visibility of an object Returns the number of pixels which pass the z-Test! Example: Draw bounding box of detailed object  only if the query returns a value > 0, the detailed object has to be drawn! In our case, the occlusion query returns the number of pixels p which are considered to be different in the two compared shadow maps! We evaluate a simple error metric: If this condition is true, new sample is created in-between the compared ones! A contribution weight is assigned to each sample Depends on subdivision depth: Michael Schwärzler

Rendering n Shadow Maps By simply summing up the hard shadows values multiplied with their corresponding weights, we obtain the fragment’s occlusion value! But: Today‘s shaders can only sample a limited amount of textures!  only a small number of shadow maps can be evaluated in a single pass Solution 1: Use a „Deferred Rendering“ System Evaulate each shadow map in a single pass, store result in accumulation buffer In a final pass, render scene geometry with information from shadow buffer! Drawbacks: Additional memory for accumulation buffer needed, more read/write Solution 2: Use Texture Arrays Store each shadow map in array Access all shadow maps in the array in a single pas Drawbacks: Only in newer render APIs, Texture Arrays could be faster… Michael Schwärzler

Results Goal of our algorithm: Improve generation of physically correct soft shadows Adaptively select only light source samples which contribute to visual quality of penumbrae. In nearly all our tests, our approach performed better than a version with 128 fixed equally distributed samples: In scene configurations with small penumbra regions: real-time <= 50 shadow maps: at least twice as fast Worst case (very large penumbra, fills wide area of frame buffer): performance of our algorithm worse same number of shadow maps plus the reprojection and comparison steps! ~66% of the speed of the sampling approach with 128 fixed equally distributed samples. Michael Schwärzler

Results: 128 SMs 11 FPS 7 SMs >60 FPS 128 SMs 5 FPS 44 SMs 10 FPS Michael Schwärzler

Results: 128 SMs 3 FPS 28 SMs 12 FPS Michael Schwärzler

Results: 81 SMs 12 FPS 14 SMs 40 FPS Michael Schwärzler

Results Limitations: Frame rate not constant Global error metric is not perfect…  When hardly any shadows are visible on the screen, the number of differing pixels on the screen is very low In such a case, the algorithm will stop the subdivision - no matter how coarse the shadow boundaries are Very small light leaks can be missed due to the global error metric as well Michael Schwärzler

Conclusions Our method makes it possible to render physically accurate soft shadows in most cases faster than the regular light sampling method with a fixed sampling rate Only samples which contribute to the visual quality are computed and evaluated The subdivision decision is made by reprojecting neighboring shadow maps to the camera’s point of view and comparing them there using a hardware occlusion query The time needed for these checks is compensated by the reduced number of shadow maps which have to be calculated Future work: Find a better error metric for the decision whether more sampling points are needed or not! Michael Schwärzler

Thank you for your attention! End Thank you for your attention! Michael Schwärzler