Local vs. Global Illumination & Radiosity

Similar documents
The Rendering Equation & Monte Carlo Ray Tracing

Lightscape A Tool for Design, Analysis and Presentation. Architecture Integrated Building Systems

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

CS770/870 Spring 2017 Radiosity

CS770/870 Spring 2017 Radiosity

Raytracing & Epsilon. Today. Last Time? Forward Ray Tracing. Does Ray Tracing Simulate Physics? Local Illumination

Global Illumination. Global Illumination. Direct Illumination vs. Global Illumination. Indirect Illumination. Soft Shadows.

A Brief Overview of. Global Illumination. Thomas Larsson, Afshin Ameri Mälardalen University

Global Illumination and Radiosity

Global Illumination. CSCI 420 Computer Graphics Lecture 18. BRDFs Raytracing and Radiosity Subsurface Scattering Photon Mapping [Ch

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

Global Illumination. CMPT 361 Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller

Global Illumination. Global Illumination. Direct Illumination vs. Global Illumination. Indirect Illumination. Soft Shadows.

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

Global Illumination CS334. 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

Ray Tracing. Last Time? Reading for Today. Reading for Today

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

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

Schedule. MIT Monte-Carlo Ray Tracing. Radiosity. Review of last week? Limitations of radiosity. Radiosity

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

MIT Monte-Carlo Ray Tracing. MIT EECS 6.837, Cutler and Durand 1

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

CMSC427 Shading Intro. Credit: slides from Dr. Zwicker

Computer Graphics. Lecture 10. Global Illumination 1: Ray Tracing and Radiosity. Taku Komura 12/03/15

Today. Global illumination. Shading. Interactive applications. Rendering pipeline. Computergrafik. Shading Introduction Local shading models

I have a meeting with Peter Lee and Bob Cosgrove on Wednesday to discuss the future of the cluster. Computer Graphics

Global Illumination The Game of Light Transport. Jian Huang

Global Illumination. COMP 575/770 Spring 2013

Illumination & Shading: Part 1

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

Today. Global illumination. Shading. Interactive applications. Rendering pipeline. Computergrafik. Shading Introduction Local shading models

EECS 487: Interactive Computer Graphics

CSE 167: Introduction to Computer Graphics Lecture #6: Lights. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016

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

CS580: Ray Tracing. Sung-Eui Yoon ( 윤성의 ) Course URL:

Ray Tracing. Last Time? Today. Ray Casting. Durer s Ray Casting Machine. Reading for Today

Ray Tracing. Quiz Discussion. Announcements: Final Projects. Last Time? Durer s Ray Casting Machine. Today

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

Topic 9: Lighting & Reflection models 9/10/2016. Spot the differences. Terminology. Two Components of Illumination. Ambient Light Source

Advanced Ray Tracing

Sung-Eui Yoon ( 윤성의 )

Global Illumination. Why Global Illumination. Pros/Cons and Applications. What s Global Illumination

Topic 9: Lighting & Reflection models. Lighting & reflection The Phong reflection model diffuse component ambient component specular component

Lighting and Shading

Illumination and Shading

Photon Mapping. Due: 3/24/05, 11:59 PM

Rendering Light Reflection Models

Radiance. Radiance properties. Radiance properties. Computer Graphics (Fall 2008)

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

Simple Lighting/Illumination Models

Computer Graphics. Illumination and Shading

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

CS-184: Computer Graphics. Today. Lecture #16: Global Illumination. Sunday, November 8, 2009

Anti-aliasing. Images and Aliasing

Distributed Ray Tracing

CSE 681 Illumination and Phong Shading

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

Shading I Computer Graphics I, Fall 2008

Computer Graphics. Ray Tracing. Based on slides by Dianna Xu, Bryn Mawr College

Ray Tracing. Announcements: Quiz. Last Time? Today. Durer s Ray Casting Machine. Ray Casting

CS5620 Intro to Computer Graphics

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

Illumination. Michael Kazhdan ( /657) HB Ch. 14.1, 14.2 FvDFH 16.1, 16.2

Radiosity. Early Radiosity. Page 1

Shadows. COMP 575/770 Spring 2013

Consider a partially transparent object that is illuminated with two lights, one visible from each side of the object. Start with a ray from the eye

Paths, diffuse interreflections, caching and radiometry. D.A. Forsyth

Path Tracing part 2. Steve Rotenberg CSE168: Rendering Algorithms UCSD, Spring 2017

Photorealism vs. Non-Photorealism in Computer Graphics

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

03 RENDERING PART TWO

Today. Acceleration Data Structures for Ray Tracing. Cool results from Assignment 2. Last Week: Questions? Schedule

CSE 167: Lecture #7: Color and Shading. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

Sung-Eui Yoon ( 윤성의 )

Illumination Algorithms

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

CS130 : Computer Graphics Lecture 8: Lighting and Shading. Tamar Shinar Computer Science & Engineering UC Riverside

INFOGR Computer Graphics. J. Bikker - April-July Lecture 10: Shading Models. Welcome!

Lighting and Shading. Slides: Tamar Shinar, Victor Zordon

S U N G - E U I YO O N, K A I S T R E N D E R I N G F R E E LY A VA I L A B L E O N T H E I N T E R N E T

Overview. Radiometry and Photometry. Foundations of Computer Graphics (Spring 2012)

Raytracing CS148 AS3. Due :59pm PDT

Anti-aliasing and Monte Carlo Path Tracing. Brian Curless CSE 457 Autumn 2017

Rendering Light Reflection Models

Lecture 15: Shading-I. CITS3003 Graphics & Animation

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

COMP3421. Global Lighting Part 2: Radiosity

Specular reflection. Lighting II. Snell s Law. Refraction at boundary of media

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

Shadows & Programmable Shaders

Light Reflection Models

CPSC 314 LIGHTING AND SHADING

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

Capturing light. Source: A. Efros

Local Illumination physics. Law of reflection and Snell s law of refraction

Shading. Brian Curless CSE 557 Autumn 2017

Last Time: Acceleration Data Structures for Ray Tracing. Schedule. Today. Shadows & Light Sources. Shadows

Introduction. Lighting model Light reflection model Local illumination model Reflectance model BRDF

Lecture 7 - Path Tracing

Transcription:

Last Time? Local vs. Global Illumination & Radiosity Ray Casting & Ray-Object Intersection Recursive Ray Tracing Distributed Ray Tracing An early application of radiative heat transfer in stables. Reading for Today Other Reading for Today "An improved illumination model for shaded display" Turner Whitted, 1980. "Distributed Ray Tracing", Cook, Porter, & Carpenter, SIGGRAPH 1984.

Shadows Shadows & Light Sources one shadow ray per intersection per point light source no shadow rays http://www.davidfay.com/index.php clear bulb http://3media.initialized.org/photos/2000-10-18/index_gall.htm frosted bulb http://www.pa.uky.edu/~sciworks/light/preview/bulb2.htm one shadow ray Soft Shadows Antialiasing Supersampling multiple shadow rays to sample area light source multiple rays per pixel one shadow ray point light area light lots of shadow rays jaggies w/ antialiasing

Reflection Glossy Reflection one reflection ray per intersection multiple reflection rays Justin Legakis perfect mirror Motion Blur Depth of Field Sample objects temporally multiple rays per pixel Rob Cook film focal length polished surface Justin Legakis

Ray Tracing Algorithm Analysis Ray casting Lots of primitives Recursive Distributed Ray Tracing Effects Soft shadows Anti-aliasing Glossy reflection Motion blur Depth of field cost height * width * num primitives * intersection cost * size of recursive ray tree * num shadow rays * num supersamples * num glossy rays * num temporal samples * num focal samples *... can we reduce this? these can serve double duty HW3: Raytracing & Epsilon intersects light @ t = 25.2 intersects sphere1 @ t = -0.01 intersects sphere1 @ t = 10.6 intersects light @ t = 26.9 intersects sphere2 @ t = 0.01 intersects sphere2 @ t = 14.3 Solution: advance the ray start position epsilon distance along the ray direction OR ignore all intersections < epsilon (rather than < 0) eye Image from Zachary Lynn What s a good value for epsilon? Depends on hardware precision & scene dimensions Today BRDF Local Illumination Ratio of light coming from one direction that gets reflected in another direction Bidirectional Reflectance Distribution Function BRDF Ideal Diffuse Reflectance Ideal Specular Reflectance The Phong Model Why is Global Illumination Important? Radiosity Matrix Calculating the Form Factors Advanced Radiosity 4D R(i,φi ; o, φo) Note: BRDF for isotropic materials is 3D

Incoming Radiance Ideal Diffuse Reflectance The amount of light received by a surface depends on incoming angle Assume surface reflects equally in all directions (a.k.a. Lambertian) An ideal diffuse surface is, at the microscopic level, a very rough surface Examples: chalk, clay, some paints Bigger at normal incidence (Winter/Summer difference) 1.4X (@45 ) 1X (@0 ) http://www.shsu.edu/~dl_www/bkonline/1 31online/f02latitude/02index.htm By how much? n db = da cos Same as: l. n (dot product with normal) l db da Non-Ideal Reflectors Ideal Specular Reflectance Assume surface reflects only in mirror direction View dependent Microscopic surface elements are oriented in the same direction as the surface Examples: mirrors, highly polished metals n r l Surface Real materials tend to be neither ideal diffuse nor ideal reflective Highlight is blurry, looks glossy Surface

Non-Ideal Reflectors The Phong Model Most light reflects in the ideal reflected direction Microscopic surface variations will reflect light just slightly offset How much light is reflected? An empirical (observational) model How much light is reflected specularly? Depends on the angle α, between the ideal reflection direction r and the viewer direction l ks: specular reflection coefficient q : specular reflection exponent n l r Camera Effect of the q exponent α v Surface The Phong Model Ambient Illumination Sum of three components: In a typical room, everything receives at least a little bit of light Ambient illumination represents the reflection of all indirect illumination diffuse reflection + specular reflection + ambient. q=1 q=2 q=4 q=8 q=16 q=32 q=64 q=128 Surface This is a total hack! variations in Phong specular exponent

Questions? Today Local Illumination Why is Global Illumination Important? The Cornell Box Radiosity vs. Ray Tracing Radiosity Matrix Calculating the Form Factors Advanced Radiosity Lightscape http://www.lightscape.com Why Global Illumination? Why Radiosity? Simulate all light inter-reflections (indirect lighting) Sculpture by John Ferren Diffuse panels in a room, a lot of the light is indirect: it is reflected by walls. How have we dealt with this so far? photograph: Ambient term to fake some uniform indirect light ray tracing indirect illumination + (no ambient term) right answer diagram from above: = it is smooth, but not constant! Henrik Wann Jensen eye

Radiosity vs. Ray Tracing Reading for Tuesday photograph Original sculpture by John Ferren lit by daylight from behind. Ray traced image. A standard Image rendered with radiosity. ray tracer cannot simulate the note color bleeding effects. interreflection of light between diffuse surfaces. simulation The Cornell Box Goral, Torrance, Greenberg & Battaile Modeling the Interaction of Light Between Diffuse Surfaces SIGGRAPH '84 Visualizing Inter-reflections Careful calibration and measurement allows for comparison between physical scene & simulation direct illumination (0 bounces) photograph simulation Light Measurement Laboratory Cornell University, Program for Computer Graphics 1 bounce 2 bounces Note: image brightness not constant between images images by Micheal Callahan http://www.cs.utah.edu/~shirley/classes/cs684_98/students/callahan/bounce/

Radiosity vs. Ray Tracing Today Ray tracing is an image-space algorithm If the camera is moved, we have to start over Radiosity is computed in object-space View-independent (just don't move the light) Can pre-compute complex lighting to allow interactive walkthroughs Radiosity Overview Local Illumination Why is Global Illumination Important? Radiosity Matrix Calculating the Form Factors Advanced Radiosity Discrete Radiosity Equation Discretize the scene into n patches, over which the radiosity is constant Surfaces are assumed to be perfectly Lambertian (diffuse) reflect incident light in all directions with equal intensity The scene is divided into a set of small areas, or patches. The radiosity, Bi, of patch i is the total rate of energy leaving a surface. The radiosity over a patch is constant. Units for radiosity: Watts / steradian * meter2 light leaving patch i material reflectivity Aj n B i = E i + ρ i Fij B j j= 1 light emitted from patch i ω' x' Ai form factor The equation is recursive, but it can be solved iteratively

Radiosity in Matrix Form n B i = E i + ρ i Fij B j j= 1 Solving the Radiosity Matrix Initialize all radiosity values to 0 Each iteration, update the radiosity of each patch by gathering the contribution of radiosities from all other patches: n simultaneous equations with n unknown Bi values can be written in matrix form: solve for Bi A solution yields a single radiosity value Bi for each patch in the environment, a view-independent solution. Interpolating Vertex Radiosities Radiosity values on iteration t+1 Radiosity values on iteration t Radiosity values only increase on each iteration This method is fundamentally a Gauss-Seidel relaxation Questions? Bi radiosity values are constant over the extent of a patch. How are they mapped to the vertex radiosities (intensities) needed by the renderer? Average the radiosities of patches that contribute to the vertex Vertices on the edge of a surface are assigned values extrapolation Factory simulation. Program of Computer Graphics, Cornell University. 30,000 patches.

Today Calculating the Form Factor Fij Fij = fraction of light energy leaving patch j that arrives at patch i Takes account of both: Local Illumination Why is Global Illumination Important? Radiosity Equation/Matrix Calculating the Form Factors Advanced Radiosity geometry (size, orientation & position) visibility (are there any occluders?) patch j patch j patch i patch i patch j patch i Calculating the Form Factor Fij Form Factor Determination Fij = fraction of light energy leaving patch j that arrives at patch i The Nusselt analog: the form factor of a patch is equivalent to the fraction of the unit circle that is formed by taking the projection of the patch onto the hemisphere surface and projecting it down onto the circle. patch j j r i patch i Fij = 1 Ai Ai Aj cos i cos j Vij daj dai π r2

Hemicube Algorithm Form Factor from Ray Casting A hemicube is constructed around the center of each patch Faces of the hemicube are divided into "pixels" Each patch is projected (rasterized) onto the faces of the hemicube Each pixel stores its pre-computed form factor The form factor for a particular patch is just the sum of the pixels it overlaps Patch occlusions are handled similar to z-buffer rasterization Cast n rays between the two patches Questions? Today Compute visibility (what fraction of rays do not hit an occluder) Integrate the point-to-point form factor Permits the computation of the patch-to-patch form factor, as opposed to point-to-patch Ai Local Illumination Why is Global Illumination Important? Radiosity Equation/Matrix Calculating the Form Factors Advanced Radiosity Progressive Radiosity Adaptive Subdivision Discontinuity Meshing Hierarchical Radiosity Lightscape http://www.lightscape.com Use this for HW3! Aj

Stages in a Radiosity Solution Input Geometry Emittance & Reflectance Properties Form Factor Calculation Why so costly? > 90% Solve the Radiosity Matrix < 10% (n3 for naive visibility calculation) Radiosity Solution Camera Position & Orientation Visualization (Rendering) Calculation & storage of n2 form factors ~ 0% Radiosity Image Reordering the Solution for PR Shooting: the radiosity of all patches is updated for each iteration: This method is fundamentally a Southwell relaxation Progressive Refinement Goal: Provide frequent and timely updates to the user during computation Key Idea: Update the entire image at every iteration, rather than a single patch How? Instead of summing the light received by one patch, distribute the radiance of the patch with the most undistributed radiance. Progressive Refinement w/out Ambient Term

Progressive Refinement with Ambient Term Questions? Lightscape Reading for Friday: Today photograph http://www.lightscape.com Local Illumination Why is Global Illumination Important? Radiosity Equation/Matrix Calculating the Form Factors Advanced Radiosity Progressive Radiosity Adaptive Subdivision Discontinuity Meshing Hierarchical Radiosity simulation Goral, Torrance, Greenberg & Battaile Modeling the Interaction of Light Between Diffuse Surfaces SIGGRAPH '84

Increasing the Accuracy of the Solution What s wrong with this picture? Adaptive Subdivision of Patches Image quality is a function of patch size Compute a solution on a uniform initial mesh, then refine the mesh in areas that exceed some error tolerance: shadow boundaries other areas with a high radiosity gradient Discontinuity Meshing Improved solution (1021 subpatches) Adaptive subdivision (1306 subpatches) Optional Reading for Friday: Limits of umbra and penumbra Captures nice shadow boundaries Complex geometric computation to construct mesh penumbra Coarse patch solution (145 patches) source blocker umbra Fast and Accurate Hierarchical Radiosity Using Global Visibility Durand, Drettakis, & Puech 1999

Hierarchical Radiosity Practical Problems with Radiosity Group elements when the light exchange is not important Meshing Breaks the quadratic complexity Control non trivial, memory cost memory robustness Form factors computation Cow-cow form factor? Diffuse limitation extension to specular takes too much memory Questions? Lightscape http://www.lightscape.com