Advanced Shading I: Shadow Rasterization Techniques

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

Shadows. COMP 575/770 Spring 2013

Computer Graphics. Shadows

Computergrafik. Matthias Zwicker. Herbst 2010

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

Computer Graphics 10 - Shadows

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

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

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

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?

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

Shadow Algorithms. CSE 781 Winter Han-Wei Shen

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

Shadows in the graphics pipeline

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

Computer Graphics Shadow Algorithms

Pipeline Operations. CS 4620 Lecture 10

Shadow Rendering EDA101 Advanced Shading and Rendering

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

Lighting and Shading

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

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

Interpolation using scanline algorithm

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

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

Real-Time Shadows. André Offringa Timo Laman

High Quality Adaptive Soft Shadow Mapping

Soft Shadow Maps. Soft Shadow Maps for Linear Lights

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

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

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

Creating soft shadows

Visible-Surface Detection Methods. Chapter? Intro. to Computer Graphics Spring 2008, Y. G. Shin

Recall: Indexing into Cube Map

CPSC GLOBAL ILLUMINATION

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

Mach band effect. The Mach band effect increases the visual unpleasant representation of curved surface using flat shading.

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

Shadow and Environment Maps

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

CS 464 Review. Review of Computer Graphics for Final Exam

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

Robust Stencil Shadow Volumes. CEDEC 2001 Tokyo, Japan

Photorealistic 3D Rendering for VW in Mobile Devices

6.837 Introduction to Computer Graphics Quiz 2 Thursday November 20, :40-4pm One hand-written sheet of notes allowed

Pipeline Operations. CS 4620 Lecture 14

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.

EECS 487: Interactive Computer Graphics

Sung-Eui Yoon ( 윤성의 )

Simpler Soft Shadow Mapping Lee Salzman September 20, 2007

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

Shadow Techniques. Sim Dietrich NVIDIA Corporation

Enabling immersive gaming experiences Intro to Ray Tracing

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

Computing Visibility. Backface Culling for General Visibility. One More Trick with Planes. BSP Trees Ray Casting Depth Buffering Quiz

COMP371 COMPUTER GRAPHICS

Multi-View Soft Shadows. Louis Bavoil

Rendering: Reality. Eye acts as pinhole camera. Photons from light hit objects

Building a Fast Ray Tracer

9. Illumination and Shading

Computer Graphics. Lecture 9 Environment mapping, Mirroring

Shadows. Shadows. Thanks to: Frédo Durand and Seth Teller MIT. Realism Depth cue

Intro to Ray-Tracing & Ray-Surface Acceleration

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

Welcome to COMP 770 (236) Introduction. Prerequisites. Prerequisites

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

CEng 477 Introduction to Computer Graphics Fall 2007

Overview. A real-time shadow approach for an Augmented Reality application using shadow volumes. Augmented Reality.

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

Hello, Thanks for the introduction

Enhancing Traditional Rasterization Graphics with Ray Tracing. October 2015

CS 4620 Midterm, March 21, 2017

Computer Graphics. Lecture 14 Bump-mapping, Global Illumination (1)

C P S C 314 S H A D E R S, O P E N G L, & J S RENDERING PIPELINE. Mikhail Bessmeltsev

Shadows. Shadows. Spatial relationship between objects. Shadows as depth cue. Spatial relationship between objects

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

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

03 RENDERING PART TWO

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

Ray tracing. EECS 487 March 19,

Problem Set 4 Part 1 CMSC 427 Distributed: Thursday, November 1, 2007 Due: Tuesday, November 20, 2007

Direct Rendering of Trimmed NURBS Surfaces

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

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

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

The Traditional Graphics Pipeline

Computer Graphics Global Illumination

Topic 11: Texture Mapping 10/21/2015. Photographs. Solid textures. Procedural

Distributed Ray Tracing

Computer Science 426 Midterm 3/11/04, 1:30PM-2:50PM

The Traditional Graphics Pipeline

Illumination and Geometry Techniques. Karljohan Lundin Palmerius

Texture. Texture Mapping. Texture Mapping. CS 475 / CS 675 Computer Graphics. Lecture 11 : Texture

Stencil Shadow Volumes

Computer Graphics Global Illumination

CS 475 / CS 675 Computer Graphics. Lecture 11 : Texture

CS-184: Computer Graphics. Administrative

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

Transcription:

Advanced Shading I: Shadow Rasterization Techniques

Shadow Terminology umbra: light totally blocked penumbra: light partially blocked occluder: object blocking light

Shadow Terminology umbra: light totally blocked penumbra: light partially blocked occluder: object blocking light point lights have no penumbra

Shadow Rendering Hard shadows: umbra only easy with ray tracing (shadow rays) Soft shadows: penumbra and umbra very difficult without global illumination Today: rasterizing hard shadows

Projection Shadows Easiest case: one object one light shadow cast on flat ground

Projection Shadows Main idea: render scene twice once as usual once with object shaded black and flattened onto plane

Projection Shadows projection of v lies along ray

Projection Shadows projection of v lies along ray

Projection Shadows projection of v lies along ray

Projection Shadows projection of v lies along ray how to write as affine transformation?

Projection Operation Needed:

Projection Operation Needed:

Projection Shadows projection of v lies along ray how to write as affine transformation?

Projection Shadows projection of v lies along ray

Projection Shadows Pros: easy to code Cons:

Projection Shadows Pros: easy to code, fast Cons: only draws shadows on flat surfaces no soft shadows no self-shadows

Projection Shadows Multiple lights? fake with alpha blending Final gotcha:

Shadow Maps Render scene from the light record depth only why useful?

Shadow Maps To shade a pixel, calculate: 1) pixel to light distance; 2) shadow map value

Shadow Maps compare pixel-to-light distance to shadow map if equal, no shadow if greater, in shadow

What s The Bug? Part I

What s The Bug? Part I Floating point == is very dangerous numerical floating-point error depth buffer has finite precision

What s The Bug? Part I Floating point == is very dangerous numerical floating-point error depth buffer has finite precision Fix by including tolerance ( bias ) in check

What s The Bug? Part II

What s The Bug? Part II Shadow map is too coarse shadows are aliased

What s The Bug? Part II Shadow map is too coarse shadows are aliased Cascaded shadow maps: use higherresolution shadow map near eye

What s The Bug? Part II Shadow map is too coarse shadows are aliased Cascaded shadow maps: use higherresolution shadow map near eye highest-quality fix complicated (have to partition shadow map)

Percentage Closer Filtering Sample several nearby pixels on shadow map instead of only one pixel Set shadow intensity proportional to number of shadow votes

Shadow Maps Very common real-time technique used in Unreal Engine, etc Pros: works with curved objects works with self-shadows Cons:

Shadow Maps Very common real-time technique used in Unreal Engine, etc Pros: works with curved objects works with self-shadows Cons: very prone to aliasing artifacts still no soft shadows

Shadow Volumes Consider single light, single triangle

Shadow Volumes Main idea: build 3D object representing the shadow volume If pixel is inside volume, it is in shadow

Shadow Volumes Main idea: build 3D object representing the shadow volume If pixel is inside volume, it is in shadow shoot ray from pixel to eye, count number of intersections odd = in shadow

Shadow Volumes For more complicated object, look only at silhouette edges edges connecting front-facing to back-facing triangles

Shadow Volumes Increasingly popular in real-time graphics

Shadow Volumes Increasingly popular in real-time graphics Pros: high-quality shadows (no aliasing) self-shadows automatically included Cons:

Shadow Volumes Increasingly popular in real-time graphics Pros: high-quality shadows (no aliasing) self-shadows automatically included Cons: slow and complicated shadows chunky if meshes too coarse still no soft shadows