The Rendering Equation. Computer Graphics CMU /15-662

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

Global Illumination The Game of Light Transport. Jian Huang

CMSC427 Shading Intro. Credit: slides from Dr. Zwicker

The Rendering Equation and Path Tracing

Monte Carlo Ray Tracing. Computer Graphics CMU /15-662

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

Lecture 7 - Path Tracing

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

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

Ray Tracing: Special Topics CSCI 4239/5239 Advanced Computer Graphics Spring 2018

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

Timothy Walsh. Reflection Models

Lighting affects appearance

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

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

Radiometry and reflectance

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

CS 5625 Lec 2: Shading Models

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

THE goal of rendering algorithms is to synthesize images of virtual scenes. Global illumination

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

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

rendering equation computer graphics rendering equation 2009 fabio pellacini 1

CENG 477 Introduction to Computer Graphics. Ray Tracing: Shading

Raytracing. COSC 4328/5327 Scott A. King

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

2/1/10. Outline. The Radiance Equation. Light: Flux Equilibrium. Light: Radiant Power. Light: Equation. Radiance. Jan Kautz

Radiometry & BRDFs CS295, Spring 2017 Shuang Zhao

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

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

Fundamentals of Rendering - Reflectance Functions

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

Lights, Surfaces, and Cameras. Light sources emit photons Surfaces reflect & absorb photons Cameras measure photons

Choosing the Right Algorithm & Guiding

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

782 Schedule & Notes

COMP371 COMPUTER GRAPHICS

The Rendering Equation & Monte Carlo Ray Tracing

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

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

Stochastic Path Tracing and Image-based lighting

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

Monte Carlo Integration of The Rendering Equation. Computer Graphics CMU /15-662, Spring 2017

Fundamentals of Rendering - Reflectance Functions

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

Light. Electromagnetic wave with wave-like nature Refraction Interference Diffraction

Lecture 22: Basic Image Formation CAP 5415

Reflection models and radiometry Advanced Graphics

COMPUTER GRAPHICS COURSE. LuxRender. Light Transport Foundations

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

CS6670: Computer Vision

CS6670: Computer Vision

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

The Rendering Equation Philip Dutré. Course 4. State of the Art in Monte Carlo Global Illumination Sunday, Full Day, 8:30 am - 5:30 pm

BRDF Computer Graphics (Spring 2008)

Assignment 3: Path tracing

Global Illumination. COMP 575/770 Spring 2013

Motivation. Monte Carlo Path Tracing. Monte Carlo Path Tracing. Monte Carlo Path Tracing. Monte Carlo Path Tracing

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

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

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

Monte Carlo Ray-tracing and Rendering

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

dq dt I = Irradiance or Light Intensity is Flux Φ per area A (W/m 2 ) Φ =

Shading. Brian Curless CSE 557 Autumn 2017

BRDFs. Steve Rotenberg CSE168: Rendering Algorithms UCSD, Spring 2017

dq dt I = Irradiance or Light Intensity is Flux Φ per area A (W/m 2 ) Φ =

Announcements. Radiometry and Sources, Shadows, and Shading

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

Philpot & Philipson: Remote Sensing Fundamentals Interactions 3.1 W.D. Philpot, Cornell University, Fall 12

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

Monte-Carlo Ray Tracing. Antialiasing & integration. Global illumination. Why integration? Domains of integration. What else can we integrate?

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

Biased Monte Carlo Ray Tracing

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

Recall: Basic Ray Tracer

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

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

Lecture 12: Photon Mapping. Biased Methods

Understanding Variability

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

Biased Monte Carlo Ray Tracing:

Local vs. Global Illumination & Radiosity

Capturing light. Source: A. Efros

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

CS 563 Advanced Topics in Computer Graphics Irradiance Caching and Particle Tracing. by Stephen Kazmierczak

Lighting and Shading. Slides: Tamar Shinar, Victor Zordon

REAL-TIME GPU PHOTON MAPPING. 1. Introduction

02 Shading and Frames. Steve Marschner CS5625 Spring 2016

Illumination and Shading - II

Computergrafik. Matthias Zwicker Universität Bern Herbst 2016

Illumination. Courtesy of Adam Finkelstein, Princeton University

Lighting and Materials

CSE 681 Illumination and Phong Shading

Shading. Reading. Pinhole camera. Basic 3D graphics. Brian Curless CSE 557 Fall Required: Shirley, Chapter 10

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

13 Distribution Ray Tracing

Interactive Methods in Scientific Visualization

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

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

Transcription:

The Rendering Equation Computer Graphics CMU 15-462/15-662

Review: What is radiance? Radiance at point p in direction N is radiant energy ( #hits ) per unit time, per solid angle, per unit area perpendicular to N. radiant flux solid angle projected area* *Confusing point: this cosine has to do w/ parameterization of sphere, not Lambert s law

Intuition: Radiance and Irradiance irradiance radiance in direction ω angle between ω and normal

Incident vs. Exitant Radiance INCIDENT EXITANT In both cases: intensity of illumination is highly dependent on direction (not just location in space or moment in time).

The Rendering Equation Core functionality of photorealistic renderer is to estimate radiance at a given point p, in a given direction ω o Summed up by the rendering equation (Kajiya): outgoing/observed radiance emitted radiance (e.g., light source) incoming radiance angle between incoming direction and normal point of interest direction of interest all directions in hemisphere scattering function incoming direction Key challenge: to evaluate incoming radiance, we have to compute yet another integral. I.e., rendering equation is recursive.

Recursive Raytracing Basic strategy: recursively evaluate rendering equation! (This is why you re writing a ray tracer rasterizer isn t enough!)

Renderer measures radiance along a ray y o, d Pinhole x At each bounce, want to measure radiance traveling in the direction opposite the ray direction.

Renderer measures radiance along a ray y o, d Pinhole x Radiance entering camera in direction d = light from scene light sources that is reflected off surface in direction d.

How does reflection of light affect the outgoing radiance?

Reflection models Reflection is the process by which light incident on a surface interacts with the surface such that it leaves on the incident (same) side without change in frequency Choice of reflection function determines surface appearance

Some basic reflection functions Ideal specular Perfect mirror Ideal diffuse Uniform reflection in all directions Glossy specular Majority of light distributed in reflection direction Retro-reflective Reflects light back toward source Diagrams illustrate how incoming light energy from given direction is reflected in various directions.

Materials: diffuse

Materials: plastic

Materials: red semi-gloss paint

Materials: Ford mystic lacquer paint

Materials: mirror

Materials: gold

Materials

Models of Scattering How can we model scattering of light? Many different things that could happen to a photon: - bounces off surface - transmitted through surface - bounces around inside surface - absorbed & re-emitted - What goes in must come out! (Total energy must be conserved) In general, can talk about probability* a particle arriving from a given direction is scattered in another direction *Somewhat more complicated than this, because some light is absorbed!

Hemispherical incident radiance At any point on any surface in the scene, there s an incident radiance field that gives the directional distribution of illumination at the point Consider view of hemisphere from this point

Diffuse reflection Exitant radiance is the same in all directions Incident radiance Exitant radiance

Ideal specular reflection Incident radiance is flipped around normal to get exitant radiance Incident radiance Exitant radiance

Plastic Incident radiance gets flipped and blurred Incident radiance Exitant radiance

Copper More blurring, plus coloration (nonuniform absorption across frequencies) Incident radiance Exitant radiance

Scattering off a surface: the BRDF Bidirectional reflectance distribution function Encodes behavior of light that bounces off surface Given incoming direction ω i, how much light gets scattered in any given outgoing direction ω o? Describe as distribution f r (ω i ω o ) why less than or equal? where did the rest of the energy go?! Helmholtz reciprocity Q: Why should Helmholtz reciprocity hold? Think about little mirrors bv (Szymon Rusinkiewicz)

Radiometric description of BRDF For a given change in the incident irradiance, how much does the exitant radiance change?

Example: Lambertian reflection Assume light is equally likely to be reflected in each output direction Z L o (! o )= H 2 f r L i (! i ) cos i d! i =f r ZH 2 L i (! i ) cos i d! i f r = c =f r E albedo (between 0 and 1) f r =

Example: perfect specular reflection [Zátonyi Sándor]

Geometry of specular reflection Top-down view ~n (looking down on surface)! i! o i o i o = o = i! o =! i + 2(! i ~n)~n

Specular reflection BRDF L i ( i, i) L o ( o, o) i o Dirac delta f r ( i, i; o, o) = (cos i cos o ) cos i ( i o ± ) Strictly speaking, f r is a distribution, not a function In practice, no hope of finding reflected direction via random sampling; simply pick the reflected direction!

Transmission In addition to reflecting off surface, light may be transmitted through surface. Light refracts when it enters a new medium.

Snell s Law Transmitted angle depends on index of refraction of medium incident ray is in and index of refraction of medium light is entering. Medium *! i ~n Vacuum Air (sea level) Water (20 C) Glass Diamond 1.0 1.00029 1.333 1.5-1.6 2.42 * index of refraction is wavelength dependent (these are averages)! t i sin i = t sin t

Law of refraction! i ~n i sin i = t sin t q cos t = 1 sin 2 t = = s 1 s 1 i t i t 2 sin 2 i 2 (1 cos 2 i )! t Total internal reflection: When light is moving from a more optically dense medium to a less optically dense medium: > 1 t Light incident on boundary from large enough angle will not exit medium. i 1 i t 2 (1 cos 2 i ) < 0

Optical manhole Only small cone visible, due to total internal reflection (TIR)

Fresnel reflection Many real materials: reflectance increases w/ viewing angle [Lafortune et al. 1997]

Snell + Fresnel: Example Reflection (Fresnel) Refraction (Snell)

Without Fresnel (fixed reflectance/transmission)

Glass with Fresnel reflection/transmission

Anisotropic reflection Reflection depends on azimuthal angle Results from oriented microstructure of surface e.g., brushed metal

Translucent materials: Jade

Translucent materials: skin

Translucent materials: leaves

Subsurface scattering Visual characteristics of many surfaces caused by light entering at different points than it exits - Violates a fundamental [Jensen et al 2001] assumption of the BRDF - Need to generalize scattering model (BSSRDF) [Donner et al 2008]

Scattering functions Generalization of BRDF; describes exitant radiance at one point due to incident differential irradiance at another point: S(x i,! i,x o,! o ) Generalization of reflection equation integrates over all points on the surface and all directions(!) Z Z L(x o,! o )= A H 2 S(x i,! i,x o,! o ) L i (x i,! i ) cos i d! i da

BRDF

BSSRDF

Ok, so scattering is complicated! What s a (relatively simple) algorithm that can capture all this behavior?

The reflection equation dl r (! r )=f r (! i!! r )dl i (! i ) cos i Z L r (p,! r )= H 2 f r (p,! i!! r ) L i (p,! i ) cos i d! i

The reflection equation Key piece of overall rendering equation: Z L r (p,! r )= H 2 f r (p,! i!! r ) L i (p,! i ) cos i d! i Approximate integral via Monte Carlo integration Generate directions sampled from some distribution! j p(!) Compute the estimator 1 N NX j=1 f r (p,! j!! r ) L i (p,! j ) cos j p(! j ) To reduce variance p(!) should match BRDF or incident radiance function

Estimating reflected light // Assume: // Ray ray hits surface at point hit_p // Normal of surface at hit point is hit_n Vector3D wr = -ray.d; // outgoing direction Spectrum Lr = 0.; for (int i = 0; i < N; ++i) { Vector3D wi; // sample incident light from this direction float pdf; // p(wi) generate_sample(brdf, &wi, &pdf); // generate sample according to brdf Spectrum f = brdf->f(wr, wi); Spectrum Li = trace_ray(ray(hit_p, wi)); // compute incoming Li Lr += f * Li * fabs(dot(wi, hit_n)) / pdf; } return Lr / N;

The rendering equation y! i L o (p,! o )! o p Pinhole x Z L o (p,! o )=L e (p,! o )+ H 2 f r (p,! i!! o ) L i (p,! i ) cos i d! i Now that we know how to handle reflection, how do we solve the full rendering equation? Have to determine incident radiance

Key idea in (efficient) rendering: take advantage of special knowledge to break up integration into easier components.

Path tracing: overview Partition the rendering equation into direct and indirect illumination Use Monte Carlo to estimate each partition separately - One sample for each - Assumption: 100s of samples per pixel Terminate paths with Russian roulette

Direct illumination + reflection + transparency Image credit: Henrik Wann Jensen

Global illumination solution Image credit: Henrik Wann Jensen

Next Time: Monte Carlo integration