Soft Shadow Volumes for Ray Tracing

Slides:



Advertisements
Similar presentations
An Optimized Soft Shadow Volume Algorithm with Real-Time Performance Ulf Assarsson 1, Michael Dougherty 2, Michael Mounier 2, and Tomas Akenine-Möller.
Advertisements

Parallax-Interpolated Shadow Map Occlusion
Ray tracing. New Concepts The recursive ray tracing algorithm Generating eye rays Non Real-time rendering.
Optimized Stencil Shadow Volumes
Game Programming 09 OGRE3D Lighting/shadow in Action
CSL 859: Advanced Computer Graphics Dept of Computer Sc. & Engg. IIT Delhi.
Computer Graphics methods
Intersection Testing Chapter 13 Tomas Akenine-Möller Department of Computer Engineering Chalmers University of Technology.
Physically Based Real-time Ray Tracing Ryan Overbeck.
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.
Part I: Basics of Computer Graphics
CSE 872 Dr. Charles B. Owen Advanced Computer Graphics1 Ray Tracing Variants Distributed ray tracing Generalized rays Cone Tracing Beam Tracing Pencil.
1 Dr. Scott Schaefer Shadows. 2/40 Shadows Shadows provide clues about depth Make scenes appear more realistic.
Christian Lauterbach COMP 770, 2/11/2009
Rasterization and Ray Tracing in Real-Time Applications (Games) Andrew Graff.
A Survey of Real-time Soft Shadows Algorithms Speaker: Alvin Date: 2003/7/23 EUROGRAPHICS 2003 J.-M. Hasenfratz, M. Lapierre, N. Holzschuch and F.X. Sillion.
Tomas Mőller © 2000 Speeding up your game The scene graph Culling techniques Level-of-detail rendering (LODs) Collision detection Resources and pointers.
Computer Graphics (Fall 2005) COMS 4160, Lecture 21: Ray Tracing
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
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Soft Shadows using Hardware Cameras Kyle Moore COMP 870.
CSCE 641: Computer Graphics Ray Tracing Jinxiang Chai.
A Geometry-based Soft Shadow Volume Algorithm using Graphics Hardware Speaker: Alvin Date:2003/7/23 SIGGRAPH 2003 Ulf Assarsson Tomas Akenine-Moller.
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.
Creating soft shadows Computer Graphics methods Submitted by: Zusman Dimitry.
© 2004 Tomas Akenine-Möller1 Shadow Generation Hardware Vision day at DTU 2004 Tomas Akenine-Möller Lund University.
Introduction to 3D Graphics John E. Laird. Basic Issues u Given a internal model of a 3D world, with textures and light sources how do you project it.
Computer Graphics Inf4/MSc Computer Graphics Lecture 11 Texture Mapping.
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.
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 Algorithms Ikrima Elhassan.
Ray Tracing Primer Ref: SIGGRAPH HyperGraphHyperGraph.
Samuli Laine: A General Algorithm for Output-Sensitive Visibility PreprocessingI3D 2005, April 3-6, Washington, D.C. A General Algorithm for Output- Sensitive.
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
Visibility Queries Using Graphics Hardware Presented by Jinzhu Gao.
CS447/ Realistic Rendering -- Radiosity Methods-- Introduction to 2D and 3D Computer Graphics.
Shadows. Shadows is important in scenes, consolidating spatial relationships “Geometric shadows”: the shape of an area in shadow Early days, just pasted.
Collaborative Visual Computing Lab Department of Computer Science University of Cape Town Graphics Topics in VR By Shaun Nirenstein.
Graphics Lecture 13: Slide 1 Interactive Computer Graphics Lecture 13: Radiosity - Principles.
Binary Space Partitioning Trees Ray Casting Depth Buffering
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.
Computer Graphics Lecture 08 Fasih ur Rehman. Last Class Ray Tracing.
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Hybrid Algorithms K. H. Ko School of Mechatronics Gwangju Institute.
Ray Tracing Fall, Introduction Simple idea  Forward Mapping  Natural phenomenon infinite number of rays from light source to object to viewer.
11/24/ :45 Graphics II Shadow Maps Reflections Session 5.
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.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Shadows & occlusion  Shadow - occlusion duality  Floor shadows.
09/23/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Reflections Shadows Part 1 Stage 1 is in.
Visible-Surface Detection Methods. To identify those parts of a scene that are visible from a chosen viewing position. Surfaces which are obscured by.
Shuen-Huei Guan Seminar in CMLab, NTU
Real-Time Soft Shadows with Adaptive Light Source Sampling
Hidden Surface Removal
A Geometry-Based Soft Shadow Volume Algorithm Using Graphics Hardware
Real-Time Ray Tracing Stefan Popov.
3D Graphics Rendering PPT By Ricardo Veguilla.
Hybrid Ray Tracing of Massive Models
© University of Wisconsin, CS559 Fall 2004
Alias-Free Shadow Maps
3D Rendering Pipeline Hidden Surface Removal 3D Primitives
Incremental Instant Radiosity for Real-Time Indirect Illumination
A Hierarchical Shadow Volume Algorithm
GEARS: A General and Efficient Algorithm for Rendering Shadows
Presentation transcript:

Soft Shadow Volumes for Ray Tracing Samuli Laine Helsinki University of Technology, Hybrid Graphics Ltd. Timo Aila Helsinki University of Technology, Hybrid Graphics Ltd. Ulf Assarsson ARTIS, GRAVIR /IMAG INRIA, Chalmers University of Technology Jaakko Lehtinen Helsinki University of Technology, Remedy Entertainment Ltd. Tomas Akenine-Möller Lund University

We present An algorithm for computing Soft Shadows For planar area light sources Exactly the same shadows as using shadow rays Faster - up to 2 orders of magnitude Can compute very high resolution soft shadows with low extra cost E.g. allows for 1000 shadow samples per pixel Requires computation of silhouettes Trivial for polygon-based scenes

Soft Shadows – A Quick Recap Area lights give soft shadows Point light Area light Hard shadow Soft shadow

Classic solution Multiple shadow rays Lots of shadow rays per pixel

Our solution - overview Replace the shadow rays With soft shadow volume computations Plus one reference shadow ray One shadow ray + soft shadow volume computations Lots of shadow rays per pixel pixel pixel Classic approach Our approach

What’s a Soft Shadow Volume? Light source Shadow caster Soft Shadow Volume Soft Shadow Volume = A. Volume from which an edge projects onto the light source B. Region of penumbra caused by an edge

Our solution - overview Two parts: from any receiving point p, we need to find silhouette edges affecting the visibility A method for computing the visibility from silhouette information

Finding potential silhouettes Fast method for determining silhouette edges that overlap light source from p Arbitrary shadow caster Arbitrary shadow receiving point p HOW?

Hemicube Construction Rasterize soft shadow volumes into a hemicube for each light source hemicube Bottom face of hemicube Each cell contains list of edges Each cell contains list of edges p This cell contains potential silhouette edges from p

Hemicube Construction Rasterize soft shadow volumes into a hemicube for each light source Wedge marked to all cells it even partially overlaps → no artifacts Bottom face of hemicube Each cell contains list of edges

Hemicube Construction Wedge marked to all cells it even partially overlaps → no artifacts Bottom face of hemicube Each cell contains list of edges

Hemicube Construction Lots of edges does not need to be considered

Hemicube Construction Lots of edges does not need to be considered Because these edges cannot be silhouettes projected onto the light source from any point p p1 p2

Wedge Creation Criterions Wedges are created for all edges that are silhouettes from any point on the light source The wedge includes all positions from which the edge projects onto (occludes) the light source.

During Rendering Hemicube returns a conservative set of edges All the necessary edges but also many more We only want edges that are Silhouettes from p Project onto the light source. Tested with Point-inside-wedge Now we have the silhouette edges from p p p

Visibility Reconstruction Which light samples si are visible from point p? Brute force: cast a shadow ray for each si Our recipe: 1. Find silhouette edges between p and light source 2. Project them onto light source  reduces to 2D 3. Compute relative depth complexity for every si 4. Solve visibility with a single shadow ray 5. Profit

Depth Complexity Depth complexity of si = number of surfaces between p and si 1 2  Light source as seen from p Depth complexity function

From Silhouette Edges to Relative Depth Complexity Projected silhouette edges define the first derivative of the depth complexity function Hence, relative depth complexity can be solved by integrating the silhouette edges over the light source Integration is linear  can be performed one edge at a time 1 2 

 Integration: Example Left-to-right integration of a triangular silhouette +1 1 1 1 -1  -1 Light source as seen from p Depth complexity function

Integration: Sampling Points We don’t need the value of the depth complexity function except at the sampling points si Sufficient to maintain a depth complexity counter for each si Integration: find si that are inside update region and update their depth complexity counters +1

Integration: Rules There’s a caveat - we only have the edges that overlap the light source Loops are not necessarily closed, since parts outside the light source may be missing We don’t have this edge!

Integration: Rules Solution: apply special rules to edges that cross the left side of the light source This accounts for potentially missing edges

Integration: Optimization Place the light samples into uniformly sized buckets During integration, only process affected buckets Most edges span only one bucket We use approx. sqrt(N) buckets for N light samples We also process 4 samples in parallel using SSE vector instructions

From Relative Depth Complexity to Visibility We are not done yet, since the constant of integration is not known  cannot solve visibility Solution: cast a shadow ray ray to one si with lowest relative depth complexity If blocked, all si are blocked Otherwise, all si with lowest rel. depth complexity are visible

Experimental Results Comparisons done using a commercial ray tracer Turtle by Illuminate Labs Enabled heuristic shadow ray casting: stop if first 50% of rays agree Our method was implemented into this ray tracer We use the same ray caster for casting the reference ray

Columns: 580 triangles, adaptive AA, 960x540 Speedup factor 103 242

Formula: 60K triangles, adaptive AA, 960x540 Speedup factor 30 65

Sponza: 109K triangles, adaptive AA, 960x540 Speedup factor 11 33

Robots: 1.3M triangles, adaptive AA, 960x540 Speedup factor 21 58

Ring: 374K triangles, adaptive AA, 960x540 Speedup factor 13 32

Conclusions Fast shadow algorithm in wide range of scenes Easy to plug into an existing ray tracer Scalability considerations Number of light samples: excellent (~ sqrt M) Number of triangles: good (silhouettes: ~ N(something ≤ 1)) Output resolution: not so good (linear) Spatial size of the light source: not so good (~ linear)

Future Work GPU implementation? Improvement of the acceleration structure To pump up the edge acceptance ratio (currently < 10%)

Thanks Questions Thanks for the cash: Bitboys, Hybrid Graphics, Remedy Entertainment, Nokia, National Technology Agency of Finland, ATI, Illuminate Labs, French Ministry of Research, Chalmers, Hans Werthén foundation, Carl Tryggers foundation, Ernhold Lundströms foundation, Swedish Foundation for Strategic Research

Semi-transparent shadow casters Detect the light samples that are occluded only by semi-transparent occluders Determine the color for these light samples by casting shadow rays Blocked ??? Blocked Visible