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

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

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

The Rendering Equation and Path Tracing

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

CENG 477 Introduction to Computer Graphics. Ray Tracing: Shading

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

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

Virtual Reality for Human Computer Interaction

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

Global Illumination The Game of Light Transport. Jian Huang

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

CMSC427 Shading Intro. Credit: slides from Dr. Zwicker

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

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

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

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

Local vs. Global Illumination & Radiosity

BRDF Computer Graphics (Spring 2008)

Illumination and Shading - II

CS770/870 Spring 2017 Radiosity

Lighting. Figure 10.1

Radiometry and reflectance

Lighting and Reflectance COS 426

rendering equation computer graphics rendering equation 2009 fabio pellacini 1

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

Computer Graphics. Illumination and Shading

Radiometry & BRDFs CS295, Spring 2017 Shuang Zhao

CS770/870 Spring 2017 Radiosity

Understanding Variability

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

Lecture 15: Shading-I. CITS3003 Graphics & Animation

Comp 410/510 Computer Graphics. Spring Shading

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

6. Illumination, Lighting

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

Lighting and Shading Computer Graphics I Lecture 7. Light Sources Phong Illumination Model Normal Vectors [Angel, Ch

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

Global Illumination and the Rendering Equation

CSE 681 Illumination and Phong Shading

COMPUTER GRAPHICS COURSE. LuxRender. Light Transport Foundations

Global Illumination. COMP 575/770 Spring 2013

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

Introduction to Computer Graphics 7. Shading

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

Lecture 7 - Path Tracing

Simple Lighting/Illumination Models

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

The Rendering Equation & Monte Carlo Ray Tracing

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

The Rendering Equation. Computer Graphics CMU /15-662

GLOBAL ILLUMINATION. Christopher Peters INTRODUCTION TO COMPUTER GRAPHICS AND INTERACTION

CS5620 Intro to Computer Graphics

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

LIGHTING AND SHADING

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

782 Schedule & Notes

CS 5625 Lec 2: Shading Models

Shading 1: basics Christian Miller CS Fall 2011

CPSC / Illumination and Shading

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

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

Illumination. Courtesy of Adam Finkelstein, Princeton University

Reflection and Shading

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

Today s class. Simple shadows Shading Lighting in OpenGL. Informationsteknologi. Wednesday, November 21, 2007 Computer Graphics - Class 10 1

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

Lighting affects appearance

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

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

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

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

Capturing light. Source: A. Efros

Module 5: Video Modeling Lecture 28: Illumination model. The Lecture Contains: Diffuse and Specular Reflection. Objectives_template

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

Radiometry. Computer Graphics CMU /15-662, Fall 2015

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

Local Reflection Models

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

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

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

CS 4600 Fall Utah School of Computing

Illumination & Shading

Shading. Brian Curless CSE 557 Autumn 2017

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

Reflection models and radiometry Advanced Graphics

Surface Rendering Methods

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

Illumination and Shading

Global Illumination and Radiosity

Homework #2. Shading, Ray Tracing, and Texture Mapping

WHY WE NEED SHADING. Suppose we build a model of a sphere using many polygons and color it with glcolor. We get something like.

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

Complex Shading Algorithms

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

Shading. Shading = find color values at pixels of screen (when rendering a virtual 3D scene).

Global Rendering. Ingela Nyström 1. Effects needed for realism. The Rendering Equation. Local vs global rendering. Light-material interaction

Stochastic Path Tracing and Image-based lighting

Shading I Computer Graphics I, Fall 2008

Introduction to Visualization and Computer Graphics

Modelling of radiative heat transfer applying computer graphics software

Transcription:

Global Illumination CMPT 361 Introduction to Computer Graphics Torsten Möller

Reading Foley, van Dam (better): Chapter 16.7-13 Angel: Chapter 5.11, 11.1-11.5 2

Limitation of local illumination A concrete example: L: distant light source (a) Global illumination (GIM): can model shadows, multiple inter-object reflections (we used an ambient term in LIM), etc. (b) Local illumination (LIM): all spheres look the same if no light decay; each rendered independently 3

Illumination in OpenGL Use the Phong local illumination model and consider only direct illumination by light sources Self-emission possible There is also a global ambient light source Flat and smooth (default) shading models are supported Geometric primitives go through the graphics pipeline independently Visibility is handled using the depth buffer User has to simulate global illumination with own implementation 4

Recall: LIM summary The color of a point p due to light source L: I = global_ambient + self_emission + ambient + attenuation * [diffuse + specular] Global ambient component independent of any light Emission term is unaffected by any light source and it does not affect any other surface (only used to color the emitter) To deal with colors, get I R, I G, IB For multiple light sources: sum the intensity I s and normalize 5

Global illumination Try to figure out how to illuminate the whole scene dependently Local illumination model is still needed in the process Incorporate all lights in the scene, especially reflected light off objects in the scene, not just those directly from light sources 6

Global illumination model (GIM) Brute-force solution: for all light sources for all light rays in all directions trace ray until it hits screen or leaves the room computationally intractable Two established algorithms: Ray tracing: discretize the image plane Radiosity: discretize the environment Both are simplified treatment of the rendering equation 7

Images from global illumination Ray Tracing University of Utah Radiosity 8

GI - models Two approaches to its understanding mathematical classification according to types of interaction in the scene 9

Physically Based Illumination Everything so far has been pretty heuristic cannot model: wavelength dependent phenomena anisotropic behaviours many other physical phenomena (real physics) ongoing research - main early contributions Blinn (1977), Cook, Torrance (1982) Kajiya (1985), Cabral et al (1987) Hanrahan, Krüger (1993) 10

Some terminology Flux: the rate at which light energy is emitted; this is measured in watts (W) solid angle: angle at the apex of a cone; measured by the area on a sphere centered at the apex that the cone covers steradian (sr): is a unit; 1sr is the solid angle of a cone that intercepts an area equal to the square of the sphere's radius. e.g., there are 2π steradians in a hemisphere. 11

More confusing terminologies radiant intensity : flux radiated into a unit solid angle, i.e., 1sr, measured in W/sr = intensity from a point source radiance I: radiant intensity per unit of projected surface area, measured in W/(sr m 2 ) = intensity from a surface irradiance (flux density) E: incident flux per (un-projected) unit surface area, in W/m 2 E i = I i (N L)d i = Machiraju/Zhang/Möller I i cos i d i 12

Bidirectional reflectivity (BR) bidirectional reflectivity ρ : ratio of reflected radiance (intensity) to the incident irradiance (flux density) responsible for it = I r E i I r = I i (N L)d i 13

One resulting illumination equation Typical model: BR is part diffuse and part specular Taking into account light from other surfaces, i.e., add an ambient term, we get an illumination equation: I r = a I a + 1 j n I ij (N L j )(k d d + k s s )d i There are many ways of improving upon this see [F] 14

A Typical BRDF 15

GIM: rendering equation Follow the physical law of energy conservation (light is a form of energy) Need to assume a closed environment Imagine an infinite number of rays bouncing around with energy absorption, emission, and reflection We reach a steady state, an equilibrium, which we compute, from the rendering equation Ray tracing is seen as one way of simplifying the rendering equation 16

Kajiya s rendering equation (1986) Consider two points x and x in the scene. We have Interpretation: Light leaving x arriving at x has two components: self emission from x, and reflection at x from other points x Occlusion between x and x is encoded in g(x, x) x x x 17

Terms in the rendering equation I (x, x): total light intensity leaving x and arriving at x Visibility factor: g(x, x) = 0 if x is blocked from x g(x, x) = 1/d 2 or other attenuation factor otherwise, where d is the distance between x and x ε(x, x): self emission from x in the direction of x x x x 18

Terms in the rendering equation x : any other point in the scene ρ(x, x, x): bidirectional reflectance distribution function or BRDF at x Ratio between reflected and incident light intensity at x with respect to x (out-going direction) and x (in-coming direction) Specifies how much of I(x, x ) from x gets reflected in the direction of x 19

The rendering equation Integral is taken over all surfaces in the scene To solve for the unknown I s, we require: A model of the emitted light ε (property of surface) A model for the BRDF ρ (property of surface) Visibility information g (determined by geometry) 20

Solving the rendering equation Equation is complex no analytic solution in general practical algorithms perform lots of simplification If we can solve for the I s, then we know how much light intensity is received (from all other points) at each point in the scene, i.e., a color can be assigned this is view independent In practice, points become small patches that discretize the scene (patch flat shaded) a coarse approximation 21

Simplifying the rendering equation Ray tracing view dependent Consider I(x, x) only for x (a pixel) on the image plane Consider I(x, x) only for x along ray from the eye to pixel x Consider only perfect reflections and refractions, thus a very small subset of rays Radiosity view independent Discretize the scene into small patches to be flat shaded Each patch is assumed to be perfectly diffuse Project patches onto image plane using computed colors this is ok for diffuse surfaces (look the same) 22

Comment on light source In ray tracing, we assumed point light sources There is only one shadow ray to consider per light source In radiosity, light sources are modeled using patches, so we can have area light sources more realistic 23

GI - path notation At a point incoming light may be scattered or reflected diffusely or specularly and may have come from a multitude of interactions itself. For pairs of surfaces we have: diffuse to diffuse transfer specular to diffuse transfer diffuse to specular transfer specular to specular transfer 24

GI - path notation Radiosity: diffuse to diffuse (Whitted) ray-tracing: specular to specular string notation (Heckbert 90): L - light source E - eye point path specify transfer mechanism 4 possibilities: DD, DS, SD, SS 25

GI - path notation 26

GI - path notation Complete algorithm: L(D S)*E local reflection model: LD S hidden surface removal: LD SE - string of length 1 shadow algorithm typically need at least string of length 2 27

GI - Solutions Brute-force solution: for all light sources for all light rays in all directions trace ray until it hits screen or leaves the room computationally intractable approximation of brute-force: constrain light-object interaction consider small subset of the rays 28

GI -(Whitted) ray tracing Traces light rays in reversed direction hence is view-dependent hybrid: includes a local illumination for each hit point we include the contribution of the direct light before we continue with the reflected (transmitted) ray 29

GI -(Whitted) ray tracing 30

GI -(Whitted) ray tracing 31

GI -(Whitted) ray tracing Includes direct diffuse reflection (LD), but not diffuse-diffuse (DD) restricted to specular reflection path characterization: LS*E or LDS*E rendering equation: integral over sphere simplifies to two directions - light direction and perfect reflected (refracted) ray 32

GI - Radiosity Implements diffuse-diffuse no rays - patches interact scene needs to be divided into patches view-independent one pass computes light distribution in the whole scene second pass renders one particular viewpoint 33

GI - Radiosity Start with light source distribute light to all patches in scene select the patch with the highest contribution and do the same repeat the interaction of light rays between two patches is averaged and expressed as a form factor called progressive refinement 34

GI - Radiosity Consider visibility between patches in the end - each patch has constant radiosity path: LD*E rendering equation: 35

GI - Radiosity Ray-traced with main light turned off typical for indoor scenes no diffuse interations - problem! 36

GI - Radiosity Same scene as before - main light turned off computed using a radiosity method scene accounts for diffuse interactions 37