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.

Slides:



Advertisements
Similar presentations
What Well Be Covering Today: Modified Butterfly Subdivision Texturing and Antialiasing Global Illumination via Radiosity.
Advertisements

Exploration of advanced lighting and shading techniques
POST-PROCESSING SET09115 Intro Graphics Programming.
CS123 | INTRODUCTION TO COMPUTER GRAPHICS Andries van Dam © 1/16 Deferred Lighting Deferred Lighting – 11/18/2014.
Frame Buffer Postprocessing Effects in DOUBLE-S.T.E.A.L (Wreckless)
Ray tracing. New Concepts The recursive ray tracing algorithm Generating eye rays Non Real-time rendering.
Graphics Pipeline.
SDSM SAMPLE DISTRIBUTION SHADOW MAPS The Evolution Of PSSM.
Course Note Credit: Some of slides are extracted from the course notes of prof. Mathieu Desburn (USC) and prof. Han-Wei Shen (Ohio State University). CSC.
Week 7 - Monday.  What did we talk about last time?  Specular shading  Aliasing and antialiasing.
Week 11 - Wednesday.  Image based effects  Skyboxes  Lightfields  Sprites  Billboards  Particle systems.
Week 10 - Monday.  What did we talk about last time?  Global illumination  Shadows  Projection shadows  Soft shadows.
SE 313 – Computer Graphics Lecture 13: Lighting and Materials Practice Lecturer: Gazihan Alankuş 1.
Projection Matrix Tricks Eric Lengyel Outline  Projection Matrix Internals  Infinite Projection Matrix  Depth Modification  Oblique Near Clipping.
Week 9 - Wednesday.  What did we talk about last time?  Fresnel reflection  Snell's Law  Microgeometry effects  Implementing BRDFs  Image based.
CS 4363/6353 INTRODUCTION TO COMPUTER GRAPHICS. WHAT YOU’LL SEE Interactive 3D computer graphics Real-time 2D, but mostly 3D OpenGL C/C++ (if you don’t.
Rasterization and Ray Tracing in Real-Time Applications (Games) Andrew Graff.
CGDD 4003 THE MASSIVE FIELD OF COMPUTER GRAPHICS.
Shadow Silhouette Maps Pradeep Sen, Mike Cammarano, Pat Hanrahan Stanford University.
A Real-Time Soft Shadow Volume Algorithm DTU Vision days Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology Sweden
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,
Final Gathering on GPU Toshiya Hachisuka University of Tokyo Introduction Producing global illumination image without any noise.
1 Dynamic Shadows and Lighting for Walkthrus of Large Models Brandon Lloyd COMP 258 December 2002.
3D Rendering – A beginners guide Phil Carlisle – University of Bolton.
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.
Shadows Computer Graphics. Shadows Shadows Extended light sources produce penumbras In real-time, we only use point light sources –Extended light sources.
Computer Graphics Mirror and Shadows
Shadow Algorithms Ikrima Elhassan.
GPU Programming Robert Hero Quick Overview (The Old Way) Graphics cards process Triangles Graphics cards process Triangles Quads.
CSE 381 – Advanced Game Programming Basic 3D Graphics
Chris Kerkhoff Matthew Sullivan 10/16/2009.  Shaders are simple programs that describe the traits of either a vertex or a pixel.  Shaders replace a.
09/09/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Event management Lag Group assignment has happened, like it or not.
Advanced Computer Graphics Depth & Stencil Buffers / Rendering to Textures CO2409 Computer Graphics Week 19.
When Shaders & TexturesCollide Kevin Bjorke NVIDIA Corporation.
CS 638, Fall 2001 Multi-Pass Rendering The pipeline takes one triangle at a time, so only local information, and pre-computed maps, are available Multi-Pass.
Real-time Shadow Mapping. Shadow Mapping Shadow mapping uses two-pass rendering - render depth texture from the light ’ s point-of-view - render from.
Computer Concepts 2014 Chapter 8 Digital Media. 8 Chapter Contents  Section B: Bitmap Graphics  Section C: Vector and 3-D Graphics Chapter 8: Digital.
Fast Cascade VSM By Zhang Jian.
CS-378: Game Technology Lecture #4: Texture and Other Maps Prof. Okan Arikan University of Texas, Austin V Lecture #4: Texture and Other Maps.
Computer Graphics 2 Lecture 7: Texture Mapping Benjamin Mora 1 University of Wales Swansea Pr. Min Chen Dr. Benjamin Mora.
Hardware-accelerated Rendering of Antialiased Shadows With Shadow Maps Stefan Brabec and Hans-Peter Seidel Max-Planck-Institut für Informatik Saarbrücken,
Binary Space Partitioning Trees Ray Casting Depth Buffering
Advanced Computer Graphics Shadow Techniques CO2409 Computer Graphics Week 20.
Sample Based Visibility for Soft Shadows using Alias-free Shadow Maps Erik Sintorn – Ulf Assarsson – uffe.
09/16/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Environment mapping Light mapping Project Goals for Stage 1.
Immersive Rendering. General Idea ► Head pose determines eye position  Why not track the eyes? ► Eye position determines perspective point ► Eye properties.
Variance Shadow Maps Andrew Lauritzen, RapidMind.
What are shaders? In the field of computer graphics, a shader is a computer program that runs on the graphics processing unit(GPU) and is used to do shading.
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.
Introduction to Computer Graphics
Discrete Techniques.
Real-Time Soft Shadows with Adaptive Light Source Sampling
Week 7 - Monday CS361.
Reflective Shadow Mapping By: Mitchell Allen.
Chapter X Advanced Texturing
Week 11 - Wednesday CS361.
Deferred Lighting.
Robust Shadow Maps for Large Environments
Jim X. Chen George Mason University
(c) 2002 University of Wisconsin
Real-time Rendering Shadow Maps
UMBC Graphics for Games
UMBC Graphics for Games
CS-378: Game Technology Lecture #4: Texture and Other Maps
Chapter XV Shadow Mapping
03 | Creating, Texturing and Moving Objects
Frame Buffer Applications
Presentation transcript:

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 from light = Depth Render a depth map! How to render shadows?

Pass 1: From light’s POV, render scene into a texture. Each pixel stores depth information. Pass 2: From camera POV, render scene to screen. For each pixel, compute position in light space. Compare stored depth (from pass 1) to current depth. if( distanceToLight > storedDistance ) //Hidden by occluder In Shadow = true What is shadow mapping?

Light Space Camera Space

It’s never that easy…

Aliasing = Really bad jaggies Shadow map texels  Not 1:1  camera pixels Poor Precision = Banding, speckles, noise How do we store depth? 16-bit? 32-bit? Floating-point? Fixed- point? Different depths mapped to same value Rounding errors What’s so difficult?

Blur the shadow map or use hardware filtering Still doing a binary compare = hard edges Constant depth bias Helps prevent “shadow acne” caused by precision errors Doesn’t work well with the stretched shadow map (different bias needed at different points) Causes Peter Panning Naïve Solutions From Common Techniques to Improve Shadow Depth Maps, MSDN

Getting Smarter…

Cascaded Shadow Maps Put precision where we need it: close to the camera Split camera frustum into pieces Render separate shadow map for each sub-frustum Really Smart… Cascaded Shadow Maps, MSDN

What I Want: RG32 (2 channel, 16-bit per channel), HW filterable, for VSM R32F (1 channel, 32-bit), HW filterable, for Basic and ESM What I Get: Hardware filtering on floating-point formats disabled in XNA 4.0 (because actual support is only on Nvidia 8-series cards and up) RG32 format (for VSM) unsupported on my machine Access to… RGBA Color (4 8-bit channels) All floating-point formats Requires encoding VSM and ESM into Color to permit HW filtering (which is then mathematically wrong)  Implementation Notes

Normalize all depth values to [0,1] in the shader. Makes everything easier. Remember the DirectX9 ½ pixel offset So many places to mess up Lots of converting between coordinate systems Viewport settings, texture wrapping Check hardware capabilities! Get it to work first. Then optimize. ESM not widely documented on the web Most people do PCF wrong. Interpolation required! XNA lets you focus on the algorithms (most of the time) Implementation Notes

(Demo) Let’s see the goods