Shadows. COMP 575/770 Spring 2013

Similar documents
Advanced Shading I: Shadow Rasterization Techniques

Computer Graphics Shadow Algorithms

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

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

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

Enhancing Traditional Rasterization Graphics with Ray Tracing. March 2015

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

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

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

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

Computergrafik. Matthias Zwicker. Herbst 2010

Shadow Algorithms. CSE 781 Winter Han-Wei Shen

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

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

Enhancing Traditional Rasterization Graphics with Ray Tracing. October 2015

Soft Shadow Maps. Soft Shadow Maps for Linear Lights

Practical Techniques for Ray Tracing in Games. Gareth Morgan (Imagination Technologies) Aras Pranckevičius (Unity Technologies) March, 2014

Computer Graphics. Si Lu. Fall uter_graphics.htm 11/22/2017

Enabling immersive gaming experiences Intro to Ray Tracing

CS354R: Computer Game Technology

Computer Graphics. Shadows

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

Real-Time Non- Photorealistic Rendering

Global Illumination. COMP 575/770 Spring 2013

Sung-Eui Yoon ( 윤성의 )

03 RENDERING PART TWO

Shadow Rendering EDA101 Advanced Shading and Rendering

INFOGR Computer Graphics. J. Bikker - April-July Lecture 10: Ground Truth. Welcome!

Computer Graphics 10 - Shadows

Shadows in the graphics pipeline

TSBK03 Screen-Space Ambient Occlusion

Movie: For The Birds. Announcements. Ray Tracing 1. Programming 2 Recap. Programming 3 Info Test data for part 1 (Lines) is available

COMP 4801 Final Year Project. Ray Tracing for Computer Graphics. Final Project Report FYP Runjing Liu. Advised by. Dr. L.Y.

Ray Tracing. CS334 Fall Daniel G. Aliaga Department of Computer Science Purdue University

CS 428: Fall Introduction to. Raytracing. Andrew Nealen, Rutgers, /18/2009 1

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

Volume Shadows Tutorial Nuclear / the Lab

DEFERRED RENDERING STEFAN MÜLLER ARISONA, ETH ZURICH SMA/

EECS 487: Interactive Computer Graphics

The Rendering Equation & Monte Carlo Ray Tracing

Ambien Occlusion. Lighting: Ambient Light Sources. Lighting: Ambient Light Sources. Summary

Local vs. Global Illumination & Radiosity

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

Soft shadows. Steve Marschner Cornell University CS 569 Spring 2008, 21 February

Ray tracing. Computer Graphics COMP 770 (236) Spring Instructor: Brandon Lloyd 3/19/07 1

Applications of Explicit Early-Z Culling

Ambient Occlusion. Ambient Occlusion (AO) "shadowing of ambient light "darkening of the ambient shading contribution

Real-Time Shadows. André Offringa Timo Laman

Distributed Ray Tracing

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

Computer Graphics 1. Chapter 7 (June 17th, 2010, 2-4pm): Shading and rendering. LMU München Medieninformatik Andreas Butz Computergraphik 1 SS2010

Photorealism: Ray Tracing

Interpolation using scanline algorithm

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

Advanced Distant Light for DAZ Studio

Deferred Rendering Due: Wednesday November 15 at 10pm

Visual cues to 3D geometry. Light Reflection and Advanced Shading. Shading. Recognizing materials. size (perspective) occlusion shading

Rendering Algorithms: Real-time indirect illumination. Spring 2010 Matthias Zwicker

TUTORIAL 7: Global Illumination & Ambient Occlusion

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

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

Global Rendering. Ingela Nyström 1. Effects needed for realism. The Rendering Equation. Local vs global rendering. Light-material interaction

So far, we have considered only local models of illumination; they only account for incident light coming directly from the light sources.

Global Illumination CS334. Daniel G. Aliaga Department of Computer Science Purdue University

Chapter 7 - Light, Materials, Appearance

LIGHTING - 1. Note. Lights. Ambient occlusion

Monte Carlo Ray Tracing. Computer Graphics CMU /15-662

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

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

Werner Purgathofer

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

SCREEN-SPACE FAR-FIELD AMBIENT OCCLUSION. Ville Timonen

Pipeline Operations. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 11

Announcements. Written Assignment 2 out (due March 8) Computer Graphics

Screen Space Ambient Occlusion. Daniel Kvarfordt & Benjamin Lillandt

Computer Graphics I. Assignment 3

CS 381 Computer Graphics, Fall 2008 Midterm Exam Solutions. The Midterm Exam was given in class on Thursday, October 23, 2008.

Lighting. To do. Course Outline. This Lecture. Continue to work on ray programming assignment Start thinking about final project

Lecture 12: Advanced Rendering

Lecture 15: Shading-I. CITS3003 Graphics & Animation

Ray Casting on Programmable Graphics Hardware. Martin Kraus PURPL group, Purdue University

Pipeline Operations. CS 4620 Lecture 14

Computer Graphics. Lecture 13. Global Illumination 1: Ray Tracing and Radiosity. Taku Komura

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

THE DEPTH-BUFFER VISIBLE SURFACE ALGORITHM

Rasterization Overview

Computer Graphics Tick 2

CPSC GLOBAL ILLUMINATION

Topic 12: Texture Mapping. Motivation Sources of texture Texture coordinates Bump mapping, mip-mapping & env mapping

Computer Graphics. Lecture 02 Graphics Pipeline. Edirlei Soares de Lima.

Ray tracing. EECS 487 March 19,

Ray Tracing Part 1. CSC418/2504 Introduction to Computer Graphics. TA: Muhammed Anwar & Kevin Gibson

CS 6958 LECTURE 5 TM ANALYSIS SHADING

Real-Time Voxelization for Global Illumination

EECS 487: Interactive Computer Graphics

Topic 11: Texture Mapping 11/13/2017. Texture sources: Solid textures. Texture sources: Synthesized

Ray Tracing. CPSC 453 Fall 2018 Sonny Chan

Intro to Ray-Tracing & Ray-Surface Acceleration

CEng 477 Introduction to Computer Graphics Fall 2007

Me Again! Peter Chapman. if it s important / time-sensitive

Transcription:

Shadows COMP 575/770 Spring 2013

Shadows in Ray Tracing Shadows are important for realism Basic idea: figure out whether a point on an object is illuminated by a light source Easy for ray tracers Just trace a shadow ray from the point to the light source If the shadow ray hits something before the light, point is in shadow

Shadows in Ray Tracing

Shadows in Ray Tracing Problems? They re too dark They re too sharp How do we do this with a rasterizer?

Outline Shadows in Ray Tracing Shadows in Rasterization Soft Shadows Ambient Occlusion

Shadows in Rasterization Basic goal: determine if a fragment is in shadow Using some form of rasterization Shadows are essentially related to visibility In a rasterizer, visibility information is in the depth buffer So we ll have to use the depth buffer for shadows, somehow

Shadow Mapping When is a point in shadow? In ray tracing: When the shadow ray is occluded In general: When the light source can t see the point What if we render from the light source?

Shadow Mapping Render the scene from the light source The depth buffer contains distances to points visible to the light All points behind the visible points are in shadow This is the shadow map Now render from the (usual) camera Transform each fragment to the light s coordinate frame Compare to the shadow map value to check if in shadow

Shadow Mapping eye depth eye view final output light depth shadow

Shadow Mapping In ray tracing, shadow ray origins were offset To avoid self-intersections due to precision issues This can happen in shadow maps too! Precision issues when projecting into light coordinates Just render back-faces for the shadow map Depth differences should be large enough Works with closed objects only

Shadow Mapping Shadow map is, after all, a sampled image If sampled too coarsely, shadows appear blocky Can workaround by: Adaptively sampling shadow maps Warping shadow maps to fit camera view

Shadow Mapping

Shadow Mapping How often is a shadow map evaluated? What shader stage would this happen in? Deferred shading can improve performance!

Shadow Volumes Construct 3D geometry representing shadow volume Compute shadow volumes from light source Shadow volumes are behind objects from light view Render from (usual) camera A fragment is in shadow if it lies in a shadow volume

Shadow Volumes Sharp shadows, unlike shadow maps Difficult to create shadow volumes Shadow volume containment test is tricky

Shadow Volume Testing Render scene from camera, save depth Render shadow volume front faces Increment if depth test passes (shadow front face visible) Render shadow volume back faces Decrement if depth test passes (shadow back face visible) Pixels with non-zero values are in shadow

Shadow Volume Testing

Shadow Volume Testing What if camera is in shadow volume? Need an alternate approach

Shadow Volume Testing Render scene from camera, save depth Render shadow volume back faces Increment if depth test fails (shadow back face occluded) Render shadow volume front faces Decrement if depth test fails (shadow front face occluded) Pixels with non-zero values are in shadow Need to cap shadow volumes

Shadow Volume Testing

Outline Shadows in Ray Tracing Shadows in Rasterization Soft Shadows Ambient Occlusion

Soft Shadows Real shadows don t have hard boundaries This is because real lights are not point lights More generally, because at any point, light comes from multiple directions

Soft Shadows Consider area light sources Shadow has two parts Umbra: points hidden from all of the light Penumbra: points that can see part of the light

Soft Shadows How to model soft shadows in ray tracing? At any point, need to know how much of the light source is visible Trace shadow rays to multiple points on the light source Randomly sampled Average the results

Soft Shadows

Outline Shadows in Ray Tracing Shadows in Rasterization Soft Shadows Ambient Occlusion

Ambient Occlusion Shadows cast by ambient light A crude approximation for global illumination Similar approach to soft shadows

Ambient Occlusion At each surface point, trace rays out in all directions Calculate the fractions of rays that don t hit anything Until a certain distance, perhaps Scale lighting value by this fraction Points surrounded by other objects appear darker

Ambient Occlusion

Ambient Occlusion