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

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

Shadows in the graphics pipeline

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

Shadows. COMP 575/770 Spring 2013

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

Pipeline Operations. CS 4620 Lecture 10

Real-Time Shadows. André Offringa Timo Laman

Shadow Algorithms. CSE 781 Winter Han-Wei Shen

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

graphics pipeline computer graphics graphics pipeline 2009 fabio pellacini 1

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

Computer Graphics 10 - Shadows

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

Advanced Shading I: Shadow Rasterization Techniques

Soft Shadow Maps for Linear Lights

Dynamic Ambient Occlusion and Indirect Lighting. Michael Bunnell NVIDIA Corporation

Computer Graphics Shadow Algorithms

3D Rasterization II COS 426

Computer Graphics. Shadows

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

Soft Shadow Maps. Soft Shadow Maps for Linear Lights

Page 1. Area-Subdivision Algorithms z-buffer Algorithm List Priority Algorithms BSP (Binary Space Partitioning Tree) Scan-line Algorithms

Simulating Soft Shadows with Graphics Hardware

Local vs. Global Illumination & Radiosity

CHAPTER 1 Graphics Systems and Models 3

Pipeline Operations. CS 4620 Lecture 14

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

EECS 487: Interactive Computer Graphics

Interactive Rendering of Globally Illuminated Glossy Scenes

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

Real-Time Rendering (Echtzeitgraphik) Dr. Michael Wimmer

The Traditional Graphics Pipeline

Creating soft shadows

RASTERISED RENDERING

Identifying those parts of a scene that are visible from a chosen viewing position, and only process (scan convert) those parts

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

The Rendering Equation & Monte Carlo Ray Tracing

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

Advanced Graphics. Global Illumination. Alex Benton, University of Cambridge Supported in part by Google UK, Ltd

Fast Calculation of Soft Shadow Textures Using Convolution

The Traditional Graphics Pipeline

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

CEng 477 Introduction to Computer Graphics Fall 2007

Computer Graphics. Bing-Yu Chen National Taiwan University The University of Tokyo

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

Intro to Ray-Tracing & Ray-Surface Acceleration

CS770/870 Spring 2017 Radiosity

Computergrafik. Matthias Zwicker. Herbst 2010

The Traditional Graphics Pipeline

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

Shadow and Environment Maps

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

Accelerated Ambient Occlusion Using Spatial Subdivision Structures

CPSC GLOBAL ILLUMINATION

Acknowledgement: Images and many slides from presentations by Mark J. Kilgard and other Nvidia folks, from slides on developer.nvidia.

CS770/870 Spring 2017 Radiosity

Recollection. Models Pixels. Model transformation Viewport transformation Clipping Rasterization Texturing + Lights & shadows

9. Illumination and Shading

Computer Graphics. Bing-Yu Chen National Taiwan University

Rasterization Overview

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

CSE 167: Introduction to Computer Graphics Lecture #10: View Frustum Culling

03 RENDERING PART TWO

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

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

CS 498 VR. Lecture 18-4/4/18. go.illinois.edu/vrlect18

CS4620/5620: Lecture 14 Pipeline

lecture 19 Shadows - ray tracing - shadow mapping - ambient occlusion Interreflections

Stencil Shadow Volumes

The Rasterization Pipeline

Thesis Report. Thesis Title: Soft Shadow Rendering in Real Time. Shihab Rezwan Manzur ID: CSE Department BRAC University

Radiosity. Johns Hopkins Department of Computer Science Course : Rendering Techniques, Professor: Jonathan Cohen

Irradiance Caching in Pixar s RenderMan

Orthogonal Projection Matrices. Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 2015

CS230 : Computer Graphics Lecture 4. Tamar Shinar Computer Science & Engineering UC Riverside

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

Homework #2. Shading, Projections, Texture Mapping, Ray Tracing, and Bezier Curves

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

Sung-Eui Yoon ( 윤성의 )

CS354R: Computer Game Technology

Chapter 11 Global Illumination. Part 1 Ray Tracing. Reading: Angel s Interactive Computer Graphics (6 th ed.) Sections 11.1, 11.2, 11.

CSE528 Computer Graphics: Theory, Algorithms, and Applications

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

Graphics and Interaction Rendering pipeline & object modelling

surface: reflectance transparency, opacity, translucency orientation illumination: location intensity wavelength point-source, diffuse source

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

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

Chapter 7 - Light, Materials, Appearance

6. Illumination, Lighting

Visualisatie BMT. Rendering. Arjan Kok

CS 428: Fall Introduction to. Radiosity. Andrew Nealen, Rutgers, /7/2009 1

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

CS 325 Computer Graphics

CS 4620 Midterm, March 21, 2017

Illumination and Geometry Techniques. Karljohan Lundin Palmerius

CS 488. More Shading and Illumination. Luc RENAMBOT

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

CS451Real-time Rendering Pipeline

CS380: Computer Graphics Introduction. Sung-Eui Yoon ( 윤성의 ) Course URL:

Soft Shadow Volumes for Ray Tracing

Transcription:

Soft Shadows: Heckbert & Herf Soft shadows [Michael Herf and Paul Heckbert] Cornell University CS 569: Interactive Computer Graphics Figure : Hard shadow images from 2 2 grid of sample points on light source. ~ SIGGRAPH'87, Anaheim,July 27-3, 987 Light source Lecture 9 ]~"~-~-- Camera (c) View from (background), the camera. Figure 2: Left: scene with square light source (foreground), occluder (center), and rectangular receiver with shadows (b) Viewtriangular from the light source. (a) View from high above the scene. on receiver. Center: Approximate soft shadows resulting from 2 2 grid of sample points; the average of the four hard shadow images in 6for sampling). This image is used as the texture on the receiver at left. Figure. Right: Correct soft shadow imagefigure (generated withof 6view. Points a simple scene. 28 Steve Marschner Lecture 9 Ordinarily, texture maps are accessed by Cornell CS569 Spring 28 filtering the texture values overpass some of the However, depth maps forrespect sha- to to region determine if atexture given map. 3-D point is illuminated with doweach calculations cannot be transformation accessed in thisofmanner. The main problight source. The points from one coordinate lem is that the filtered depth value would be compared to the depth system to being another can betoaccelerated using texture hardof the surface rendered determine whether or not mapping the surface [7].at This latter method, by of Segal al., achieves real-time is inware shadow that point. The result this et comparison would be rates,making and is soft the other leading method for interactive binary, antialiased edges impossible. Another problemsoft is that filtered depth values along edges workstation of objects would bear no the shadows can be generated on athe graphics by rendering relation the geometry of using the scene. sceneto multiple times, different points on the extended light theorder resulting accumulation buffer Oursource, solutionaveraging reverses the of theimages filteringusing and comparison steps. Thehardware z values []. of the depth map across the entire region are first compared A against the depth f the surface being rendered. sample variation of theoshadow volume approach is tothis intersect these transformation converts the in depth the region into binary and volumes with surfaces the map sceneunder to precompute the aumbra image, which regions is then filtered give the proportion f the region in penumbra on eachtosurface [6]. During othe final rendering shadow. The resulting shadows have soft, antialiased edges. Heckbert & Herf Soft Shadows The difference between ordinary texture map filtering and percentage Lecture 9 closer Most filtering is shown schematically in Figure 2. In this radiosity methods discretize each surface intoexample, a mesh of the distance from the light source to the surface to be shadowed is elements and then use discrete methods such as ray tracing or z = 49.8. The region in the depth map that it maps onto (shown on to compute The hemicube computes the hemicubes left in the figures) is a visibility. square measuring 3 pixelsmethod by 3 pixels.* visibility from would a light filter source an entire Ordinary filtering thepoint depthtomap valueshemisphere to get 22.9 by andprothe that scene a half-cube [7].a value Muchoof computation thenjecting compare to onto 49.8 to end up with f this meaning that % f the surface was in shadow. Percentage closer filtering canobe done in hardware. Radiosity meshes typically do notcomresolve pares each depth map valuetypical to 49.8artifacts and then filters bands the array o f the shadows well, however. are Mach along binary values to arrive at a value of excessively.55 meaning blurry that 55% of the surmesh element boundaries and Most face is in shadow. 2 radiosity methods are not fast enough to support interactive changes to the geometry, however. Chen s incremental radiosity method is Percentage closer filtering A region[5]. and box filtering are used to simplify this example. The real ansquare exception algorithm, as described in subsequent sections, uses more sophisticated Our own method can be categorized next to hemicube radiosity techniques. pass, illumination integrals are evaluated at a sparse sampling of pixels. methods, since it also precomputes visibility discretely. Its technique for computing visibility also has parallels to the method of flattening objects to a plane. Precomputation of Shading. Precomputation can be taken fursurface at z = 49.8 ther, computing not just visibility but also shading. This is most 2.2 Graphics Hardware relevant to diffuse scenes, since their shading is view-independent. Some of these methods compute visibility continuously, while othcurrent graphics hardware, such as the Silicon Graphics Reality 5.2 ers compute it discretely. Engine [], can projective-transform, clip, shade, scan convert, and J Several researchers have explored continuous, x -4-----,---"-visibility methods texture tens of thousands of polygons in real-time (in /3 sec.)..2 mesh.generation. With for soft shadow computation and5. radiosity We 22.9would ~ like to exploit the speed of this hardware to simulate soft this approach, surfaces are subdivided into fully lit, penumbra, and umbra regions by splitting along.3lines or curves where visibility Typically, such hardware supports arbitrary 4 4 homogeneous.4 t.2 changes. In Chin and Feiner s soft shadow method, polygons are transformations of planar polygons, clipping to any truncated pyrasplit using BSP trees, and these sub-polygons are then pre-shaded midal frustum (right or oblique), and scan conversion with z[6]. They achieved rendering times of under a minute for simple buffering or overwriting. On SGI machines, Phong shading (once a) more Ordinary texture map computational filtering. Does not work for depth maps. scenes. Drettakis and Fiume used sophisticated per pixel) is not possible, but faceted shading (once per polygon) and geometry techniques to precompute their subdivision, and reported Gouraud shading (once per vertex) are supported. Phong shading rendering times of several seconds [9]. Surface at z = 49.8 ) / J [Michael Herf and Paul Heckbert] 5..2.3.4 2..2 ~ Sample Transform Step.55 [Reeves et al. 87] 5.2 b) Percentage closer filtering. Figure 2. Ordinary filtering versus percentage closer filtering. Lecture 9 3 284 Lecture 9 4

[Bunnell & Pellacini, GPU Gems] [Bunnell & Pellacini, GPU Gems] Lecture 9 5 Lecture 9 6 Ambient Occlusion: Main Idea Figure 5: The Galileo map [Agarwal, Ramamoorthi, Belongie, & Jensen 23] At each point find Fraction of hemisphere that is occluded Visible fraction of hemisphere: (-occlusion) And average unoccluded direction B!Use B for lighting (see later) Structured importance sampling w/ 3 samples Lecture 9 7

Computing the values: RT For each triangle { Compute center of triangle Generate rays over hemisphere Occlusion = For each ray If ray intersects objects ++occlusion Occlusion /= nrays } Computing the values: SM Create shadow maps from N lights Check visibility of point wrt each light and determine occlusion: accumulation buffer 4 samples 32 samples Computing the values: SM Ambient occlusion: using the values Modulate diffuse shading Kd * (-occlusion) * N.L Modulate irradiance map lookup 52 samples

What about B? The unoccluded direction gives an idea of where the main illumination is coming from This is called the bent normal Computing the values: RT For each triangle { Compute center of triangle Generate rays over hemisphere Occlusion = Avg dir = (,,) For each ray If ray intersects objects ++occlusion Else avg dir += ray.dir Occlusion /= nrays Normalize (avg dir) } [CS 467 slides] [CS 467 slides] unshadowed diffuse shading Lecture 9 5 ambient occlusion map Lecture 9 6

[CS 467 slides] combined diffuse and ambient Lecture 9 7