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

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

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

Ray Tracing. CSCI 420 Computer Graphics Lecture 15. Ray Casting Shadow Rays Reflection and Transmission [Ch ]

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

Global Illumination. COMP 575/770 Spring 2013

COMP371 COMPUTER GRAPHICS

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

Illumination Algorithms

Local vs. Global Illumination & Radiosity

Part I The Basic Algorithm. Principles of Photon Mapping. A two-pass global illumination method Pass I Computing the photon map

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

Rendering Part I (Basics & Ray tracing) Lecture 25 December 1, 2015

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

The Rendering Equation. Computer Graphics CMU /15-662

Lecture 7 - Path Tracing

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

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

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

The Rendering Equation and Path Tracing

CENG 477 Introduction to Computer Graphics. Ray Tracing: Shading

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

Korrigeringar: An introduction to Global Illumination. Global Illumination. Examples of light transport notation light

CS-184: Computer Graphics. Today. Lecture 22: Radiometry! James O Brien University of California, Berkeley! V2014-S

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

Ray Tracing. Local Illumination. Object Space: Global Illumination. Image Space: Backward Ray Tracing. First idea: Forward Ray Tracing

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

Rendering. Mike Bailey. Rendering.pptx. The Rendering Equation

To Do. Advanced Computer Graphics. Course Outline. Course Outline. Illumination Models. Diffuse Interreflection

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

Illumination. The slides combine material from Andy van Dam, Spike Hughes, Travis Webb and Lyn Fong

CMSC427 Shading Intro. Credit: slides from Dr. Zwicker

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

Biased Monte Carlo Ray Tracing

Assignment 3: Path tracing

The Rendering Equation & Monte Carlo Ray Tracing

Photon Maps. The photon map stores the lighting information on points or photons in 3D space ( on /near 2D surfaces)

Global Illumination The Game of Light Transport. Jian Huang

The Rendering Equation. Computer Graphics CMU /15-662, Fall 2016

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

Final Project: Real-Time Global Illumination with Radiance Regression Functions

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

Photorealism: Ray Tracing

02 Shading and Frames. Steve Marschner CS5625 Spring 2016

Ray-Tracing. Misha Kazhdan

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

Reflection models and radiometry Advanced Graphics

Precomputed Radiance Transfer: Theory and Practice

Advanced Graphics. Path Tracing and Photon Mapping Part 2. Path Tracing and Photon Mapping

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

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

Lighting. Figure 10.1

Announcements. Radiometry and Sources, Shadows, and Shading

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

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

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

Other Rendering Techniques CSE 872 Fall Intro You have seen Scanline converter (+z-buffer) Painter s algorithm Radiosity CSE 872 Fall

Global Illumination and Radiosity

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

Photon Mapping. Michael Doggett Department of Computer Science Lund university

Radiometry & BRDFs CS295, Spring 2017 Shuang Zhao

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

Simple Lighting/Illumination Models

Image Formation: Light and Shading. Introduction to Computer Vision CSE 152 Lecture 3

Lecture 12: Photon Mapping. Biased Methods

Anti-aliasing. Images and Aliasing

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

COMPUTER GRAPHICS AND INTERACTION

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

Lecture 18: Primer on Ray Tracing Techniques

Today. Participating media. Participating media. Rendering Algorithms: Participating Media and. Subsurface scattering

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

Computer Graphics (CS 4731) Lecture 16: Lighting, Shading and Materials (Part 1)

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

COMPUTER GRAPHICS COURSE. LuxRender. Light Transport Foundations

Computer Graphics (CS 543) Lecture 7b: Intro to lighting, Shading and Materials + Phong Lighting Model

Announcements. Image Formation: Light and Shading. Photometric image formation. Geometric image formation

Image Synthesis. Global Illumination. Why Global Illumination? Achieve more photorealistic images

Global Illumination and the Rendering Equation

Interactive Methods in Scientific Visualization

MITOCW MIT6_172_F10_lec18_300k-mp4

6. Illumination, Lighting

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

RAYTRACING. Christopher Peters INTRODUCTION TO COMPUTER GRAPHICS AND INTERACTION. HPCViz, KTH Royal Institute of Technology, Sweden

Stochastic Path Tracing and Image-based lighting

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

Radiometry. Radiometry. Measuring Angle. Solid Angle. Radiance

Color and Light. CSCI 4229/5229 Computer Graphics Summer 2008

Shading I Computer Graphics I, Fall 2008

Lecture 15: Shading-I. CITS3003 Graphics & Animation

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

Shading. Brian Curless CSE 557 Autumn 2017

11/2/2010. In the last lecture. Monte-Carlo Ray Tracing : Path Tracing. Today. Shadow ray towards the light at each vertex. Path Tracing : algorithm

Introduction to Radiosity

Indirect Illumination

CS 5625 Lec 2: Shading Models

Reflection and Shading

03 RENDERING PART TWO

Raytracing. COSC 4328/5327 Scott A. King

Monte Carlo Ray-tracing and Rendering

Transcription:

CSCI 420 Computer Graphics Lecture 18 Global Illumination Jernej Barbic University of Southern California BRDFs Raytracing and Radiosity Subsurface Scattering Photon Mapping [Ch. 13.4-13.5] 1

Global Illumination Lighting based on the full scene Lighting based on physics (optics) Traditionally represented by two algorithms Raytracing 1980 Radiosity 1984 More modern techniques include photon mapping and many variations of raytracing and radiosity ideas Source: Dianne Hansford, Arizona State Univ. 2

Direct Illumination vs. Global Illumination single (or few) bounces of the light only for example, ray casting no recursion (or shallow recursion only) fast lighting calculations based on light and normal vectors reflected, scattered and transmitted light many (infinite) number of bounces physically based light transport 3

Indirect Illumination Color Bleeding 4

Soft Shadows Shadows are much darker where the direct and indirect illuminations are occluded. Such shadows are important for sitting the sphere in the scene. They are difficult to fake without global illumination. 5

Caustics Transmitted light that refocuses on a surface, usually in a pretty pattern Not present with direct illumination 6

Light Transport and Global Illumination Diffuse to diffuse Diffuse to specular Specular to diffuse Specular to specular Ray tracing (viewer dependent) Light to diffuse Specular to specular Radiosity (viewer independent) Diffuse to diffuse 7

Path Types OpenGL L(D S)E Ray Tracing LDS*E Radiosity LD*E Path Tracing attempts to trace all rays in a scene 8

Images Rendered With Global Illumination Caustics Color bleeding Area light sources and soft shadows 9

Outline Direct and Indirect Illumination Bidirectional Reflectance Distribution Function Raytracing and Radiosity Subsurface Scattering Photon Mapping 10

Solid Angle 2D angle subtended by object O from point x: Length of projection onto unit circle at x Measured in radians (0 to 2π) 3D solid angle subtended by O from point x: Area of of projection onto unit sphere at x Measured in steradians (0 to 4π) J. Stewart 11

Light Emitted from a Surface Radiance (L): Power (φ) per unit area per unit solid angle Measured in W / m 2 str da is projected area (perpendicular to given direction) Radiosity (B): Radiance integrated over all directions Power from per unit area, measured in W / m 2 B Ω = L( θ, φ) cosθdω 12

Bidirectional Reflectance Distribution Function (BRDF) If a ray hits a surface point at angle ω i, how much light bounces into the direction given by angle ω o? It depends on the type of material. 13

Bidirectional Reflectance Distribution General model of light reflection Hemispherical function 6-dimensional (location, 4 angles, wavelength) A. Wilkie 14

BRDF Examples BRDF is a property of the material There is no formula for most materials Ideal Specular Ideal Diffuse Measure BRDFs for different materials (and store in a table) Rough Specular Directional Diffuse 15

Material Examples Marschner et al. 2000 16

BRDF Isotropy Rotation invariance of BRDF Reduces 4 angles to 2 Holds for a wide variety of surfaces Anisotropic materials Brushed metal Others? 17

Rendering Equation L is the radiance from a point x on a surface in a given direction ω E is the emitted radiance from a point: E is non-zero only if x is emissive V is the visibility term: 1 when the surfaces are unobstructed along the direction ω, 0 otherwise G is the geometry term, which depends on the geometric relationship (such as distance) between the two surfaces x and x It includes contributions from light bounced many times off surfaces f r is the BRDF 18

Outline Direct and Indirect Illumination Bidirectional Reflectance Distribution Function Raytracing and Radiosity Subsurface Scattering Photon Mapping 19

Raytracing From: http://jedi.ks.uiuc.edu/~johns/raytracer/raygallery/stills.html 20

Raytracing Albrecht Duerer, Underweysung der Messung mit dem Zirkel und Richtscheyt (Nurenberg, 1525), Book 3, figure 67. 21

Raycasting vs. Raytracing Raycasting Raytracing 22

Raytracing: Pros Simple idea and nice results Inter-object interaction possible Shadows Reflections Refractions (light through glass, etc.) Based on real-world lighting 23

Raytracing: Cons Slow Speed often highly scene-dependent Lighting effects tend to be abnormally sharp, without soft edges, unless more advanced techniques are used Hard to put into hardware 24

Supersampling I Problem: Each pixel of the display represents one single ray Aliasing Unnaturally sharp images Solution: Send multiple rays through each pixel and average the returned colors together 25

Supersampling II Direct supersampling Split each pixel into a grid and send rays through each grid point Adaptive supersampling Split each pixel only if it s significantly different from its neighbors Jittering Send rays through randomly selected points within the pixel 26

The Radiosity Method Cornell University 27

The Radiosity Method Divide surfaces into patches (e.g., each triangle is one patch) Model light transfer between patches as system of linear equations Important assumptions: Diffuse reflection only No specular reflection No participating media (no fog) No transmission (only opaque surfaces) Radiosity is constant across each patch Solve for R, G, B separately 28

(Idealized) Radiosity Computation Division into patches Form factor calculation Scene Geometry Reflectance Properties Solution of radiosity eqn Radiosity Image Visualization Viewing Conditions 29

Radiosity: Pros Can change camera position and re-render with minimal re-computation Inter-object interaction possible Soft shadows Indirect lighting Color bleeding Accurate simulation of energy transfer 30

Radiosity: Cons Precomputation must be re-done if anything moves Large computational and storage costs Non-diffuse light not represented Mirrors and shiny objects hard to include Lighting effects tend to be blurry (not sharp) Not applicable to procedurally defined surfaces 31

Radiosity Equation For each patch i: Variables B i = radiosity (unknown) E i = emittance of light sources (given; some patches are light sources) ρ i = reflectance (given) F ij = form factor from i to j (computed) fraction of light emitted from patch i arriving at patch j A i = area of patch i (computed) 32

The Form Factor F ij is dimensionless V ij = 0 if occluded 1 if not occluded (visibility factor) 33

Radiosity Example Museum simulation. Program of Computer Graphics, Cornell University. 50,000 patches. Note indirect lighting from ceiling. 34

Outline Direct and Indirect Illumination Bidirectional Reflectance Distribution Function Raytracing and Radiosity Subsurface Scattering Photon Mapping 35

Subsurface Scattering Translucent objects: skin, marble, milk Light penetrates the object, scatters and exits Important and popular in computer graphics 36

Subsurface Scattering Jensen et al. 2001 Using only BRDF With subsurface light transport 37

Subsurface Scattering Source: Wikipedia direct only subsurface scattered only combined 38

Outline Direct and Indirect Illumination Bidirectional Reflectance Distribution Function Raytracing and Radiosity Subsurface Scattering Photon Mapping 39

Photon Mapping From http://graphics.ucsd.edu/~henrik/images/global.html 40

Photon Mapping Basics Enhancement to raytracing Can simulate caustics Can simulate diffuse inter-reflections (e.g., the "bleeding" of colored light from a red wall onto a white floor, giving the floor a reddish tint) Can simulate clouds or smoke 41

Photon Mapping Photons are emitted (raytraced) from light sources Photons either bounce or are absorbed Photons are stored in a photon map, with both position and incoming direction Photon map is decoupled from the geometry (often stored in a kd-tree) Photon Map 42

Photon Mapping Raytracing step uses the closest N photons to each ray intersection and estimates the outgoing radiance Specular reflections can be done using usual raytracing to reduce the number of photons needed Numerous extensions to the idea to add more complex effects 43

Photon Mapping: Pros Preprocessing step is view independent, so only needs to be re-done if the lighting or positions of objects change Inter-object interaction includes: Shadows Indirect lighting Color bleeding Highlights and reflections Caustics current method of choice Works for procedurally defined surfaces 44

Photon Mapping: Cons Still time-consuming, although not as bad as comparable results from pure raytracing Photon map not easy to update if small changes are made to the scene 45

Photon Mapping Example 224,316 caustic photons, 3095 global photons 46

Photon Mapping Example 47

Summary Direct and Indirect Illumination Bidirectional Reflectance Distribution Function Raytracing and Radiosity Subsurface Scattering Photon Mapping 48