Rendering Fake Soft Shadows with Smoothies Eric Chan Massachusetts Institute of Technology.

Slides:



Advertisements
Similar presentations
Exploration of advanced lighting and shading techniques
Advertisements

Ray Tracing Depth Maps Using Precomputed Edge Tables Kevin Egan Rhythm & Hues Studios.
An Optimized Soft Shadow Volume Algorithm with Real-Time Performance Ulf Assarsson 1, Michael Dougherty 2, Michael Mounier 2, and Tomas Akenine-Möller.
CS 352: Computer Graphics Chapter 7: The Rendering Pipeline.
Ray tracing. New Concepts The recursive ray tracing algorithm Generating eye rays Non Real-time rendering.
Object Space EWA Surface Splatting: A Hardware Accelerated Approach to High Quality Point Rendering Liu Ren Hanspeter Pfister Matthias Zwicker CMU.
Optimized Stencil Shadow Volumes
CSL 859: Advanced Computer Graphics Dept of Computer Sc. & Engg. IIT Delhi.
Computer Graphics methods
Real-Time High Quality Rendering CSE 291 [Winter 2015], Lecture 3 Shadow and Environment Mapping
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 10 - Monday.  What did we talk about last time?  Global illumination  Shadows  Projection shadows  Soft shadows.
3D Graphics Rendering and Terrain Modeling
Real-Time Rendering TEXTURING Lecture 02 Marina Gavrilova.
Rendering Fake Soft Shadows with Smoothies Laboratory for Computer Science Massachusetts Institute of Technology Eric Chan Frédo Durand.
Rasterization and Ray Tracing in Real-Time Applications (Games) Andrew Graff.
Efficient Image-Based Methods for Rendering Soft Shadows
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
Point Rendering for Impostors Andreas Bærentzen IMM.
Real-Time High Quality Rendering COMS 6160 [Fall 2004], Lecture 4 Shadow and Environment Mapping
Approximate Soft Shadows on Arbitrary Surfaces using Penumbra Wedges Tomas Akenine-Möller Ulf Assarsson Department of Computer Engineering, Chalmers University.
Penumbra Maps: Approximate Soft Shadows in Real-Time Chris Wyman and Charles Hansen University of Utah Speaker: Alvin Date: 9/29/2003 EUROGRAPH 2003.
Copyright  Philipp Slusallek IBR: View Interpolation Philipp Slusallek.
CSCE 641 Computer Graphics: Image-based Rendering (cont.) Jinxiang Chai.
Real-Time High Quality Rendering COMS 6160 [Fall 2004], Lecture 3 Overview of Course Content
Creating soft shadows Computer Graphics methods Submitted by: Zusman Dimitry.
CSCE 641: Computer Graphics Image-based Rendering Jinxiang Chai.
Computer Graphics Inf4/MSc Computer Graphics Lecture 11 Texture Mapping.
Computer Graphics Shadows
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.
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
Computer Graphics Inf4/MSc Computer Graphics Lecture 9 Antialiasing, Texture Mapping.
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
Rendering hair with graphics hardware Tae-Yong Kim Rhythm & Hues Studios
Interactive Rendering of Meso-structure Surface Details using Semi-transparent 3D Textures Vision, Modeling, Visualization Erlangen, Germany November 16-18,
Sebastian Enrique Columbia University Real-Time Rendering Using CUReT BRDF Materials with Zernike Polynomials CS Topics.
CS 450: COMPUTER GRAPHICS REVIEW: INTRODUCTION TO COMPUTER GRAPHICS – PART 2 SPRING 2015 DR. MICHAEL J. REALE.
Computer Graphics 2 Lecture 8: Visibility Benjamin Mora 1 University of Wales Swansea Pr. Min Chen Dr. Benjamin Mora.
MIT EECS 6.837, Durand and Cutler Real-Time Shadows.
Penumbra Deep Shadow Maps Jean-Francois St-Amour, LIGUM – Université de Montreal Eric Paquette, LESIA - ETS Pierre Poulin, LIGUM – Université de Montreal.
Efficient Rendering of Local Subsurface Scattering Tom Mertens 1, Jan Kautz 2, Philippe Bekaert 1, Frank Van Reeth 1, Hans-Peter Seidel
Shadow Mapping Chun-Fa Chang National Taiwan Normal University.
Tone Mapping on GPUs Cliff Woolley University of Virginia Slides courtesy Nolan Goodnight.
Perspective Shadow Maps Marc Stamminger REVES/INRIA, Sophia-Antipolis, France now at: Bauhaus-Universität, Weimar, Germany George Drettakis REVES/INRIA,
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,
Efficient Image-Based Methods for Rendering Soft Shadows SIGGRAPH 2001 Maneesh Agrawala Ravi Ramamoorthi Alan Heirich Laurent Moll Pixar Animation Studios.
Sample Based Visibility for Soft Shadows using Alias-free Shadow Maps Erik Sintorn – Ulf Assarsson – uffe.
CS559: Computer Graphics Final Review Li Zhang Spring 2010.
Ray Tracing using Programmable Graphics Hardware
MIT EECS 6.837, Durand and Cutler Texture Mapping & Other Fun Stuff.
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.
1 Shadow Rendering Techniques: Hard and Soft Author: Jamiur Rahman Supervisor: Mushfiqur Rouf Department of CSE BRAC University.
Non-Photorealistic Rendering FORMS. Model dependent Threshold dependent View dependent Outline form of the object Interior form of the object Boundary.
09/23/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Reflections Shadows Part 1 Stage 1 is in.
Shadow Maps & Smoothies CS 446: Real-Time Rendering & Game Technology David Luebke University of Virginia.
Shuen-Huei Guan Seminar in CMLab, NTU
Real-Time Soft Shadows with Adaptive Light Source Sampling
Combining Edges and Points for Interactive High-Quality Rendering
The Graphics Rendering Pipeline
Jim X. Chen George Mason University
Alias-Free Shadow Maps
Real-time Rendering Shadow Maps
Real-Time Rendering Intro to Shadows
UMBC Graphics for Games
Distributed Ray Tracing
Presentation transcript:

Rendering Fake Soft Shadows with Smoothies Eric Chan Massachusetts Institute of Technology

Clarification

Real-Time Soft Shadows Goals: Interactive framerates Hardware-accelerated Good image quality Dynamic environments Challenge: How to balance quality and performance? NVIDIA

Ordinary Shadow Maps Image-space algorithm: Fast and simple Supported in hardware Aliasing artifacts NVIDIASen et al. [SIGGRAPH 2003]

Soft Shadow Maps Techniques: Filtering Stochastic sampling Image warping Agrawala et al. [SIGGRAPH 2000] But: need dense sampling to minimize artifacts Examples: Percentage closer filtering (Reeves et al., SIG1987) Deep shadow maps (Lokovic and Veach, SIG2000)

Soft Shadow Maps (cont.) Approximations Soler and Sillion Examples: Convolution (Soler and Sillion, SIGGRAPH 1998) Linear lights (Heidrich et al., EGRW 2000)

Idea Extend basic shadow map approach Extra primitives (smoothies) soften shadows light’s view (blockers only)light’s view (blockers + smoothies)

Fake Soft Shadows Shadows not geometrically correct Shadows appear qualitatively like soft shadows Hard shadowsFake soft shadows

Smoothie Algorithm Properties: Creates soft shadow edges Hides aliasing artifacts Efficient (object / image space) Hardware-accelerated Supports dynamic scenes

References Rendering Fake Soft Shadows with Smoothies E. Chan and F. Durand [EGSR 2003] Penumbra Maps C. Wyman and C. Hansen [EGSR 2003]

Algorithm

Algorithm Overview Implementation details later Focus on concepts

Algorithm Overview Create depth map Step 1

Algorithm Overview Create smoothie buffer Step 2

Algorithm Overview Render scene + shadows Step 3

Create Shadow Map Render blockers into depth map light’s view observer’s view

Find Silhouette Edges Find blockers’ silhouette edges in object space object-space silhouettes observer’s view light’s view

Construct Smoothies Blocker only: blocker exterior silhouette vertex silhouette edges

Construct Smoothies Blocker + smoothies: silhouette vertex silhouette edges smoothie edge smoothie corner blocker exterior

Construct Smoothies Smoothie edges are fixed-width rectangles in screen space Smoothie corners connect adjacent smoothie edges geometryshading

Render Smoothies Store depth and alpha values into smoothie buffer Smoothie Buffer (depth)Smoothie Buffer (alpha) light’s viewpoint

Compute Shadows smoothie light source blocker receiver Compute intensity using depth comparisons

Compute Shadows (1 of 3) Image sample behind blocker (intensity = 0) smoothie light source blocker receiver completely in shadow

Compute Shadows (2 of 3) partially in shadow smoothie light source blocker receiver Image sample behind smoothie (intensity =  )

Compute Shadows (3 of 3) illuminated smoothie light source blocker receiver Image sample illuminated (intensity = 1)

Computing Alpha Values Intuition: Alpha defines penumbra shape Should vary with ratio b/r blocker smoothie  receiver light source r b

Without Alpha Remapping Linearly interpolated alpha undesired results! smoothiecontact problem

With Alpha Remapping Remap alpha at each pixel using ratio b/r: smoothiefixed contact problem  ’ =  / (1 – b/r)

Computing Alpha Values 1.Linearly interpolate alpha 2.Remap alpha at each pixel using ratio b/r:  ’ =  / (1 – b/r) original  remapped  result

Multiple Objects

Multiple Receivers light’s view same thickness Smoothie buffer (linearly-interpolated  )

Multiple Receivers light’s view Smoothie buffer (remapped  ) different thickness

Multiple Receivers Final image observer’s view different thickness

Multiple Blockers What happens when smoothies overlap? smoothie overlap

Multiple Blockers Minimum blending: just keep minimum of alpha values smoothieray tracer

Implementation

Details (OpenGL) Hardware acceleration Optimizations

Create Shadow Map Render to standard OpenGL depth buffer 24-bit, window space Post-perspective, non-linear distribution of z Also write to color buffer (using fragment program) Floating-point, eye space Pre-perspective, linear distribution of z Unlike regular shadow maps Why? Need linear depth for next rendering pass

Create Smoothie Buffer Conceptually, draw the smoothies once: store depth and alpha into a buffer In practice, draw smoothies twice: 1.store nearest depth value into depth buffer 2.blend alpha values into color buffer

Computing Alpha  ’ =  / (1 – b/r) How to compute alpha? Recall  is linearly interpolated from 0 to 1 across quad b is computed in fragment program r is obtained from shadow map (linear depth!) blocker smoothie  receiver light source r b current sample

Minimum Blending Implementation in OpenGL: Supported natively in hardware use glBlendEquationEXT(GL_MIN_EXT)

Final Rendering Pass Implementation using fragment program: Project each sample into light space Multiple texture lookups shadow map (depth) smoothie buffer (depth) smoothie buffer (alpha)

Additional Details Combination of methods: percentage closer filtering (2 x 2 filtering in shader) perspective shadow maps See paper (course notes) for Cg shader code

Examples

Video

Hiding Aliasing (256 x 256) shadow map bicubic filter smoothie (t = 0.02)smoothie (t = 0.08) 16 ms129 ms 19 ms

Hiding Aliasing (1k x 1k) 17 ms142 ms 22 ms24 ms shadow map bicubic filter smoothie (t = 0.02)smoothie (t = 0.08)

Antialiasing Example #1 shadow map hard shadows (aliased)

Antialiasing Example #1 smoothies soft shadows (antialiased)

Antialiasing Example #2 shadow map hard shadows (aliased)

Antialiasing Example #2 smoothies soft shadows (antialiased)

Limitations smoothieray tracer increasing size of light source

Video original md2shader demo courtesy of Mark Kilgard

Tradeoffs Shadow maps: Assumes directional light or spotlight Discrete buffer samples

Tradeoffs Shadow maps: Assumes directional light or spotlight Discrete buffer samples Shadow volumes: Assumes blockers are closed triangle meshes Silhouettes identified in object space

Tradeoffs Shadow maps: Assumes directional light or spotlight Discrete buffer samples Shadow volumes: Assumes blockers are closed triangle meshes Silhouettes identified in object space Smoothies: Rendered from light’s viewpoint Occupy small screen area inexpensive

Summary Main points: Simple extension to shadow maps Shadows edges are fake, but look like soft shadows Fast, maps well to graphics hardware

Acknowledgments Hardware, drivers, and bug fixes  Mark Kilgard, Cass Everitt, David Kirk, Matt Papakipos (NVIDIA)  Michael Doggett, Evan Hart, James Percy (ATI) Writing and code  Sylvain Lefebvre, George Drettakis, Janet Chen, Bill Mark  Xavier Décoret, Henrik Wann Jensen