Gaël Guennebaud Loïc Barthe, Mathias Paulin IRIT UPS CNRS TOULOUSE FRANCE Gaël Guennebaud Cyprus June 2006

Similar documents
Vincent Forest, Loïc Barthe, Mathias Paulin. IRIT-UPS-CNRS University of Toulouse, France

High Quality Adaptive Soft Shadow Mapping

Deferred Splatting. Gaël GUENNEBAUD Loïc BARTHE Mathias PAULIN IRIT UPS CNRS TOULOUSE FRANCE.

Advanced Shading I: Shadow Rasterization Techniques

Point Sample Rendering

Shadow Rendering EDA101 Advanced Shading and Rendering

White Paper. Soft Shadows. February 2007 WP _v01

Shadows. COMP 575/770 Spring 2013

Real-Time Shadows. Last Time? Today. Why are Shadows Important? Shadows as a Depth Cue. For Intuition about Scene Lighting

Soft shadows using hierarchical min-max shadow maps. Kirill Dmitriev Yury Uralsky NVIDIA

Creating soft shadows

Real-Time Shadows. MIT EECS 6.837, Durand and Cutler

Soft Shadows. Michael Schwarz

Real-Time Shadows. Last Time? Schedule. Questions? Today. Why are Shadows Important?

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

Real-Time Shadows. Last Time? Textures can Alias. Schedule. Questions? Quiz 1: Tuesday October 26 th, in class (1 week from today!

Soft Shadow Maps: Efficient Sampling of Light Source Visibility

Soft Shadow Maps. Soft Shadow Maps for Linear Lights

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

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

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

Computergrafik. Matthias Zwicker. Herbst 2010

Computer Graphics Shadow Algorithms

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

Texture Mapping II. Light maps Environment Maps Projective Textures Bump Maps Displacement Maps Solid Textures Mipmaps Shadows 1. 7.

CS354R: Computer Game Technology

Last Time. Reading for Today: Graphics Pipeline. Clipping. Rasterization

Performance Analysis and Culling Algorithms

Real-Time Shadows. André Offringa Timo Laman

Shadow Techniques. Sim Dietrich NVIDIA Corporation

Thesis Report. Thesis Title: Soft Shadow Rendering in Real Time. Shihab Rezwan Manzur ID: CSE Department BRAC University

Bitmask Soft Shadows

What for? Shadows tell us about the relative locations. Vienna University of Technology 2

3D Rasterization II COS 426

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

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

Realistic soft shadows by penumbra-wedges blending

Shadows in the graphics pipeline

Fast Accurate Soft Shadows with Adaptive Light Source Sampling

Direct Rendering of Trimmed NURBS Surfaces

Visibility. Tom Funkhouser COS 526, Fall Slides mostly by Frédo Durand

Volume Shadows Tutorial Nuclear / the Lab

Shadow Algorithms. CSE 781 Winter Han-Wei Shen

Illumination and Geometry Techniques. Karljohan Lundin Palmerius

APPLYING THE REAL TIME SHADOWING METHOD FOR CREATING SOFT SHADOWS IN OPENGL UDC (( ): ) Dženan Avdić, Dejan Rančić

Hardware-driven visibility culling

Soft Shadow Volumes for Ray Tracing Samuli Laine, Timo Aila, Ulf Assarsson, Jaakko Lethinen, Tomas Akenine-Möller presented by Manuel Lang

Enhancing Traditional Rasterization Graphics with Ray Tracing. March 2015

Acknowledgement: Images and many slides from presentations by Mark J. Kilgard and other Nvidia folks, from slides on developer.nvidia.

Real-Time Shadows. Computer Graphics. MIT EECS Durand 1

Photorealism vs. Non-Photorealism in Computer Graphics

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

LOD and Occlusion Christian Miller CS Fall 2011

From Vertices to Fragments: Rasterization. Reading Assignment: Chapter 7. Special memory where pixel colors are stored.

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

Interactive Volumetric Shadows in Participating Media with Single-Scattering

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

Procedural modeling and shadow mapping. Computer Graphics CSE 167 Lecture 15

Enabling immersive gaming experiences Intro to Ray Tracing

Computer Graphics 10 - Shadows

Shadows. Real-Time Hard Shadows. Collected by Ronen Gvili. Most slides were taken from : Fredu Durand Stefan Brabec

Applications of Explicit Early-Z Culling

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

Robust Stencil Shadow Volumes. CEDEC 2001 Tokyo, Japan

A Shadow Volume Algorithm for Opaque and Transparent Non-Manifold Casters

Rasterization Overview

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

TSBK03 Screen-Space Ambient Occlusion

Some Thoughts on Visibility

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

Computer Graphics. Shadows

Simpler Soft Shadow Mapping Lee Salzman September 20, 2007

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

Today. Anti-aliasing Surface Parametrization Soft Shadows Global Illumination. Exercise 2. Path Tracing Radiosity

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

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

An Optimized Soft Shadow Volume Algorithm with Real-Time Performance

The Traditional Graphics Pipeline

Computer Graphics Global Illumination

CEng 477 Introduction to Computer Graphics Fall 2007

Shadows for Many Lights sounds like it might mean something, but In fact it can mean very different things, that require very different solutions.

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

Hardware-driven Visibility Culling Jeong Hyun Kim

Real-Time Voxelization for Global Illumination

Real-Time Hair Simulation and Rendering on the GPU. Louis Bavoil

Splat/Mesh Blending, Perspective Rasterization and Transparency for Point-Based Rendering

Soft Shadows: Heckbert & Herf. Soft shadows. Heckbert & Herf Soft Shadows. Cornell University CS 569: Interactive Computer Graphics.

Rendering Grass Terrains in Real-Time with Dynamic Lighting. Kévin Boulanger, Sumanta Pattanaik, Kadi Bouatouch August 1st 2006

High-Quality Surface Splatting on Today s GPUs

CS 498 VR. Lecture 20-4/11/18. go.illinois.edu/vrlect20

Chapter 4. Chapter 4. Computer Graphics 2006/2007 Chapter 4. Introduction to 3D 1

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

Real-Time Rendering (Echtzeitgraphik) Dr. Michael Wimmer

9. Illumination and Shading

Layered Variance Shadow Maps

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

CS 354R: Computer Game Technology

Recall: Indexing into Cube Map

Building a Fast Ray Tracer

Real - Time Rendering. Pipeline optimization. Michal Červeňanský Juraj Starinský

Transcription:

Real-time Soft Shadow Mapping by back-projection Gaël Guennebaud Loïc Barthe, Mathias Paulin IRIT UPS CNRS TOULOUSE FRANCE http://www.irit.fr/~gael.guennebaud/ 1

Hard Shadows light source Is the light source visible? lit umbra 2

Soft Shadows light source lit umbra 3

Soft Shadows light source How the light source is visible? penumbra lit umbra 4

Soft Shadows: purpose A soft shadow algorithm should be: real-time on complex and dynamic scenes generic, any geometry => rasterizable (point cloud, mesh, image) any light source => rectangular no occluder/receiver differentiation physically based => visually realistic

Real-time soft shadows previous works Two categories of approaches geometry based (shadow volume) image based (shadow map) object space silhouette extraction compute one or several shadow maps + some hybrids

Real-time soft shadows previous works Shadow volume based penumbra wedges [Assarsson et al. 03] exact for flat objects without overlapping wrong occluder fusion not scalable (limited to simple scenes) limited to manifold meshes

Real-time soft shadows previous works Image based methods (shadow maps) some require (expensive) pre-computation good realism limited to static scenes other based on distance ratio (no visibility computation) (very) low quality

Principle light source What is the visibility percentage vp between a point p and the light source? very complex problem => simplifications Penumbra wedge approach: occluders -> silhouettes p

Principle light source What is the visibility percentage vp between a point p and the light source? Our approach: key idea: use the shadow map as a simplified and discrete representation of the scene p

Principle occluded area clipped Area occluded by a shadow map sample? light source back-projection on the light source + clipping (trivial) sample p

Principle light source What is the visibility percentage vp between a point clipped p and the light source? algorithm: subtract the area occluded by each shadow map sample p

Main issue light source gaps & overlaps simple in 1D very complex in 2D gap overlapping p

Gaps & Overlaps reference naive algorithm

Gaps filling light source gaps & overlaps simple in 1D very complex in 2D gap overlap artifacts are acceptable => at this time, we just fill the gaps overlapping extension gaps filling p

Gaps filling reference naive algorithm

Gaps filling reference with gap filling

reference Référence penumbra wedges our algorithm Avec bouchage des trous flood fill [Arvo et al. 04] 18

reference Gaël Guennebaud Cyprus June 2006 penumbra wedges our algorithm flood fill 19

Optimizations hierarchical shadow map (HSM) shadow map hierarchical shadow map (HSM) each pixel stores the min and max depth values (mi n,m ax) similar to mipmaps

Optimizations - I light source Occluder search area reduction near plane (treat only samples which may occlude the light) global zmin local zmin Clip the pyramid p-light by: the near plane the global zmin global zmin local zmin (last HSM level) iteratively by the local zmin (HSM access) p

Optimizations - II light source Penumbra classification (treat only visible pixel which are in the penumbra) uses the local zmin and zmax if zp zmin then vp = 1 if zp zmax then vp = 0 else vp [0,1] local zmin local zmax p

Optimizations - III Rendering cost depends on the shadow map resolution => adaptive resolution fps: 4.5 fps: 38

Optimizations - III Adaptive precision (use low resolution for large penumbra) if the occluder region is too large => use a low level of the HSM + guaranty the real-time slight artifacts at the level transitions

fps: 4 fps: 38 fps: 39 fps: 49 25

Summary of the algorithm Draw the scene in the shadow map Compute the HSM (GPGPU, ~3 ms) Draw the scene from the view point in a depth buffer ~ deferred shading Compute the visibility buffer: for each pixel p (draw a quad) estimate the occluder search area (HSM) if p is lit or in the umbra then OK else loop over the occluder samples... ~ 15 instructions / sample Draw the scene with lighting and soft shadows! dynamic branching

performances (on a GeForce 7800) 800k poly 27

Textured light source via 4D texture (expensive and coarse) or via a «Summed Area Table» (SAT)

Other limitations Only parts visible from the light center are taken into account in the visibility computation

Comparison with [Atty et al. 2006] Recent work done in parallel similar visibility computation Main differences: all computations are done in the light space loops are swapped: for each shadow map samples s (CPU) for each point p of the scene (quad rasterization) remove from v the area occluded by s p (fragment program)

Comparison with [Atty et al. 2006] General consequences: occluders & receivers must be distinct set higher complexity no «gap filling» 2 passes approach reducing the single light sample artifacts but... Current consequences: (GPU limitations) no dynamic branching at the fragment level limited to low shadow map resolutions (200x200)

Soft shadow mapping conclusion Summary provides high quality soft shadows in real-time not physically exact, but close in most cases has all the advantages of shadow maps suitable for complex scenes suitable for any rasterizable geometry no pre-computation => dynamic scenes

Soft shadow mapping future works More accuracy overlap error single light sample error Aliasing increase the effective resolution (e.g. ASM, PSM...) Performances adaptive strategy without discontinuity

Soft shadow mapping future works More accuracy overlap error almost OK single light sample error almost OK Aliasing increase the effective resolution (e.g. ASM, PSM...)... Performances adaptive strategy without discontinuity OK

END