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

Similar documents
Global Illumination and Radiosity

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

Global Illumination. COMP 575/770 Spring 2013

The Rendering Equation and Path Tracing

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

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

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

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

Local vs. Global Illumination & Radiosity

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

CS354R: Computer Game Technology

Rendering Light Reflection Models

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

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

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

Shading / Light. Thanks to Srinivas Narasimhan, Langer-Zucker, Henrik Wann Jensen, Ravi Ramamoorthi, Hanrahan, Preetham

Global Illumination and the Rendering Equation

CSE 681 Illumination and Phong Shading

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

Dynamic Ambient Occlusion and Indirect Lighting. Michael Bunnell NVIDIA Corporation

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

Virtual Reality for Human Computer Interaction

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

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

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

The Rendering Equation. Computer Graphics CMU /15-662

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

Sung-Eui Yoon ( 윤성의 )

CS635 Spring Department of Computer Science Purdue University

Shading and Illumination

Lighting. Figure 10.1

Illumination Algorithms

GLOBAL ILLUMINATION. Christopher Peters INTRODUCTION TO COMPUTER GRAPHICS AND INTERACTION

Rendering Light Reflection Models

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

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

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

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

Light Transport CS434. Daniel G. Aliaga Department of Computer Science Purdue University

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

03 RENDERING PART TWO

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

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

The Rendering Equation & Monte Carlo Ray Tracing

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

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

CS770/870 Spring 2017 Radiosity

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

Motivation: Monte Carlo Rendering. Sampling and Reconstruction of Visual Appearance. Caustics. Illumination Models. Overview of lecture.

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

Outline of Lecture. Real-Time High Quality Rendering. Geometry or Vertex Pipeline. Basic Hardware Pipeline. Pixel or Fragment Pipeline

CS452/552; EE465/505. Intro to Lighting

CS770/870 Spring 2017 Radiosity

Lighting and Shading

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

CS5620 Intro to Computer Graphics

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

Light Reflection Models

CMSC427 Shading Intro. Credit: slides from Dr. Zwicker

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

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

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

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

Shading, lighting, & BRDF Theory. Cliff Lindsay, PHD

Comp 410/510 Computer Graphics. Spring Shading

Raytracing CS148 AS3. Due :59pm PDT

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

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

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

Graphics Pipeline. CS535 Fall Daniel G. Aliaga Department of Computer Science Purdue University

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

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

Illumination and Shading

COMP371 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

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

Monte Carlo Ray-tracing and Rendering

Global Illumination The Game of Light Transport. Jian Huang

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

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

Photorealism: Ray Tracing

CENG 477 Introduction to Computer Graphics. Ray Tracing: Shading

Anti-aliasing. Images and Aliasing

CPSC 314 LIGHTING AND SHADING

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

Lighting affects appearance

6. Illumination, Lighting

Color and Light CSCI 4229/5229 Computer Graphics Fall 2016

Recent Advances in Monte Carlo Offline Rendering

Virtual Spherical Lights for Many-Light Rendering of Glossy Scenes

Illumination & Shading: Part 1

Illumination & Shading

Lighting and Materials

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

Point based global illumination is now a standard tool for film quality renderers. Since it started out as a real time technique it is only natural

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

Lighting and Shading. Slides: Tamar Shinar, Victor Zordon

NVIDIA Case Studies:

Shading I Computer Graphics I, Fall 2008

And if that 120MP Camera was cool

Transcription:

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

Recall: Lighting and Shading Light sources Point light Models an omnidirectional light source (e.g., a bulb) Directional light Models an omnidirectional light source at infinity Spot light Models a point light with direction Light model Ambient light Diffuse reflection Specular reflection

Recall: Lighting and Shading Diffuse reflection Lambertian model

Recall: Lighting and Shading Specular reflection Phong model

Recall: Lighting and Shading Well.there is much more

For example Reflection -> Bidirectional Reflectance Distribution Functions (BRDF) Diffuse, Specular -> Diffuse Interreflection, Specular Interreflection Color bleeding Transparency, Refraction Scattering Subsurface scattering Through participating media And more!

Illumination Models So far, you considered mostly local (direct) illumination Light directly from light sources to surface No shadows (actually is a global effect) Global (indirect) illumination: multiple bounces of light Hard and soft shadows Reflections/refractions (you kinda saw already) Diffuse and specular interreflections

Welcome to Global Illumination Direct illumination + indirect illumination; e.g. Direct = reflections, refractions, shadows, Indirect = diffuse and specular inter-reflection, with global illumination only diffuse inter-reflection direct illumination

Global Illumination Direct illumination + indirect illumination; e.g. Direct = reflections, refractions, shadows, Indirect = diffuse and specular inter-reflection,

Reflectance Equation Lets start with the diffuse illumination equation and generalize Define the all encompassing reflectance equation Then specialize to the subset called the rendering equation

Reflectance Equation diffuse_illumination = 0 + I L K D l n

Reflectance Equation l n diffuse_illumination = 0 + I L K D l n

Reflectance Equation i x r L ( x, ) L ( x, ) L ( x, ) f ( x,, )( n) diffuse_illumination = r r e r i i i r i 0 + I L K D l n [Slides with help from Pat Hanrahan and Henrik Jensen]

Reflectance Equation i x r L ( x, ) L ( x, ) L ( x, ) f ( x,, )( n) r r e r i i i r i Reflected Light Emission Incident BRDF Cosine of (Output Image) Light (from Incident angle [Slides with help from Pat Hanrahan and Henrik Jensen] light source)

Reflectance Equation i x r Sum over all light sources L ( x, ) L ( x, ) L ( x, ) f ( x,, )( n) r r e r i i i r i Reflected Light Emission Incident BRDF (Output Image) Light (from light source) Cosine of Incident angle

Reflectance Equation d i i x r L ( x, ) L ( x, ) L ( x, ) f( x,, ) cos d r r e r i i i r i i Reflected Light (Output Image) Emission Replace sum with integral Incident Light (from light source) BRDF Cosine of Incident angle

Reflectance Equation d i i x r L ( x, ) L ( x, ) L ( x, ) f( x,, ) cos d r r e r i i i r i i

The Challenge L ( x, ) L ( x, ) L ( x, ) f ( x,, ) cos d r r e r i i i r i i Computing reflectance equation requires knowing the incoming radiance from surfaces But determining incoming radiance requires knowing the reflected radiance from surfaces

Surfaces (interreflection) x da Global Illumination d i i x r Lr ( x, r ) Le ( x, r ) Lr ( x, i ) f ( x, i, r ) cosidi Reflected Light (Output Image) Emission Reflected Light (from prev surface) BRDF Cosine of Incident angle

Rendering Equation (Kajiya 1986)

Rendering Equation Surfaces (interreflection) x da d i i x r Lr ( x, r ) Le ( x, r ) Lr ( x, i ) f ( x, i, r ) cosidi Reflected Light (Output Image) UNKNOWN Emission Reflected BRDF Cosine of Light Incident angle KNOWN UNKNOWN KNOWN KNOWN

Reflected Light (Output Image) UNKNOWN Rendering Equation Lr ( x, r ) Le ( x, r ) Lr ( x, i ) f ( x, i, r ) cosidi Emission Reflected BRDF Cosine of Light Incident angle KNOWN UNKNOWN KNOWN KNOWN After applying to simple math and simplifications, it turns we can approximately express the above as L EKL L, E are vectors, K is the light transport matrix

Rendering as a Linear Operator 2 3 L E KE K E K E... Emission directly From light sources Direct Illumination on surfaces Global Illumination (One bounce indirect) [Mirrors, Refraction] (Two bounce indirect) [Caustics, etc ]

Ray Tracing 2 3 L E KE KEKE... Emission directly From light sources OpenGL Shading Direct Illumination on surfaces Global Illumination (One bounce indirect) [Mirrors, Refraction] (Two bounce indirect) [Caustics, etc ]

Rendering Equation and Global Illumination Topics Local-approximations to Global Illumination Diffuse/Specular Ambient Occlusion Global Illumination Algorithms Ray tracing Path tracing Radiosity Bidirectional Reflectance Distribution Functions (BRDF)

Rendering Equation and Global Illumination Topics Local-approximations to Global Illumination Diffuse/Specular Ambient Occlusion Global Illumination Algorithms Ray tracing Path tracing Radiosity Bidirectional Reflectance Distribution Functions (BRDF)

Ambient Occlusion It is a lighting technique to increase the realism of a 3D scene by a cheap imitation of global illumination

History In 1998, Zhukov introduced obscurances in the paper An Ambient Light IlluminationModel. The effect of obscurances : we just need to evaluate the hiddenness or occlusion of the point by considering the objects around it.

Occlusion Factor/Map

Ambient Occlusion in a Phong Illumination Model I I a I a I d I s IA occ( p) Modulate the intensity by an occlusion factor Constant ambient intensity rendering

Inside-Looking-Out Approach: Ray Casting Cast rays from p in uniform pattern across the hemisphere. Each surface point is shaded by a ratio of ray intersections to number of original samples. Subtracting this ratio from 1 gives us dark areas in the occluded portions of the surface. e.g.: Cast 13 rays 9 intersections, so occ(p)=?

Inside-Looking-Out Approach: Ray Casting Cast rays from p in uniform pattern across the hemisphere. Each surface point is shaded by a ratio of ray intersections to number of original samples. Subtracting this ratio from 1 gives us dark areas in the occluded portions of the surface. e.g.: Cast 13 rays 9 intersections, so occ(p)=4/13; Color * 4/13

Inside-Looking-Out Approach: Hardware Rendering Render the view at low-res from p toward normal N Rasterize black geometry against a white background Take the (cosine-weighted) average of rasterized fragments. 11 black fragments Color * 14/25

Comments Potentially huge pre-computation time per scene Stores occlusion factor as vertex attributes Thus needs a dense sampling of vertices Variations on sampling method Inside-out algorithm outside-in alternative (not explained)

Outside-Looking-In Approach What would you do?

Outside-Looking-In: One option is [Sattler et. al 2004] Fall 2011 36

[Sattler et al. 2004] For each light on the light sphere Take the depth map (for occlusion query) Use occlusion query to determine the visibility matrix

Another option: Screen-Based AO SHANMUGAM, P., AND ARIKAN, O. 2007. Hardware Accelerated Ambient Occlusion Techniques on GPUs. In Proceedings of ACM Symposium in Interactive 3D Graphics and Games, ACM.

Screen-Based AO

What would you do? Screen-Based AO

Rendering Equation and Global Illumination Topics Local-approximations to Global Illumination Diffuse/Specular Ambient Occlusion Global Illumination Algorithms Ray tracing Path tracing Radiosity Bidirectional Reflectance Distribution Functions (BRDF)

Radiosity Radiosity, inspired by ideas from heat transfer, is an application of a finite element method to solving the rendering equation for scenes with purely diffuse surfaces. The main idea of the method is to store illumination values on the surfaces of the objects, as the light is propagated starting at the light sources. [Radiosity slides heavily based on Dr. Mario Costa Sousa, Dept. of of CS, U. Of Calgary]

Radiosity Calculating the overall light propagation within a scene, for short global illumination is a very difficult problem. With a standard ray tracing algorithm, this is a very time consuming task, since a huge number of rays have to be shot.

Radiosity (Computer Graphics) Assumption #1: surfaces are diffuse emitters and reflectors of energy, emitting and reflecting energy uniformly over their entire area. Assumption #2: an equilibrium solution can be reached; that all of the energy in an environment is accounted for, through absorption and reflection. Also viewpoint independent: the solution will be the same regardless of the viewpoint of the image.

Radiosity Equation: B i E i i B j F ij

Ray Tracing

Radiosity

The Radiosity Equation B i E i i B j F ij Radiosity of surface i Emissivity of surface i Radiosity of surface j Form Factor of surface j relative to surface i Reflectivity of surface i will absorb a certain percentage of light energy which strikes the surface Surface i Surface j accounts for the physical relationship between the two surfaces

The Radiosity Equation B i E i i B j F ij Energy emitted by surface i Surface j Surface i

The Radiosity Equation B i E i i B j F ij Energy reaching surface i from other surfaces Surface j Surface i

The Radiosity Equation B i E i i B j F ij Energy reflected by surface i Surface j Surface i

Classic Radiosity Algorithm Mesh Surfaces into Elements Compute Form Factors Between Elements Solve Linear System for Radiosities Reconstruct and Display Solution

Radiosity Matrix E i B i E i i n j1 F ij B j B i What is the matrix form? (like Ax=b ) B i i n j1 F ij B j E i

Radiosity Matrix n j j ij i i i B F E B 1 n n nn n n n n n n n E E E B B B F F F F F F F F F 2 1 2 1 2 1 2 2 22 2 21 2 1 1 12 1 11 1 1 1 1 i n j j ij i i E B F B 1 E i B i

Radiosity Matrix The "full matrix" radiosity solution calculates the form factors between each pair of surfaces in the environment, then forms a series of simultaneous linear equations. This matrix equation is solved for the "B" values, which can be used as the final intensity (or color) value of each surface. n n nn n n n n n n n E E E B B B F F F F F F F F F 2 1 2 1 2 1 2 2 22 2 21 2 1 1 12 1 11 1 1 1 1

Artifacts

What can you do?

Increase Resolution

Adaptively Mesh

e.g., Discontinuity Meshing

More examples

Rendering Equation and Global Illumination Topics Local-approximations to Global Illumination Diffuse/Specular Ambient Occlusion Global Illumination Algorithms Ray tracing Path tracing Radiosity Bidirectional Reflectance Distribution Functions (BRDF)

Measuring BRDFs BRDF is 4-dimensional, though simpler measurements (0D/1D/2D/3D) are often useful

Measuring Reflectance 0º/45º Diffuse Measurement 45º/45º Specular Measurement

Gloss Measurements Haze is the width of a specular peak

BRDF Measurements Next step up: measure over a 1- or 2-D space

Or a 4D space Gonioreflectometers

Image-Based BRDF Measurement A camera acquires with each picture a 2D image of sampled measurements Requires mapping light angles to camera pixels

Ward s BRDF Measurement Setup

Ward s BRDF Measurement Setup Each picture captures light from a hemisphere of angles