Illumination. Thomas Funkhouser Princeton University C0S 426, Fall 2000

Similar documents
Illumination. Courtesy of Adam Finkelstein, Princeton University

Lighting and Reflectance COS 426

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

Ray-Tracing. Misha Kazhdan

Today. Part 1: Ray casting Part 2: Lighting Part 3: Recursive Ray tracing Part 4: Acceleration Techniques

Indirect Illumination

Indirect Illumination

Global Illumination. Connelly Barnes CS 4810: Graphics

CS5620 Intro to Computer Graphics

Lighting and Shading

Lighting and Shading. Slides: Tamar Shinar, Victor Zordon

Reading. Ray Tracing. Eye vs. light ray tracing. Geometric optics. Required:

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

CENG 477 Introduction to Computer Graphics. Ray Tracing: Shading

Reading. Ray Tracing. Eye vs. light ray tracing. Geometric optics. Required: Watt, sections , (handout) Further reading:

Raytracing. COSC 4328/5327 Scott A. King

Ø Sampling Theory" Ø Fourier Analysis Ø Anti-aliasing Ø Supersampling Strategies" Ø The Hall illumination model. Ø Original ray tracing paper

Illumination Models & Shading

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

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

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

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

Lecture 19: All Together with Refraction

Today we will start to look at illumination models in computer graphics

Illumination & Shading

Illumination in Computer Graphics

Chapter 10. Surface-Rendering Methods. Somsak Walairacht, Computer Engineering, KMITL

Lighting affects appearance

3D Rendering. Course Syllabus. Where Are We Now? Rendering. 3D Rendering Example. Overview. Rendering. I. Image processing II. Rendering III.

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

Understanding Variability

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

Computer Graphics. Illumination Models and Surface-Rendering Methods. Somsak Walairacht, Computer Engineering, KMITL

CS 5625 Lec 2: Shading Models

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

Lecture 17: Recursive Ray Tracing. Where is the way where light dwelleth? Job 38:19

Illumination Models and Surface-Rendering Methods. Chapter 10

Lighting and Shading

Capturing light. Source: A. Efros

Surface Rendering Methods

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

Lighting Models. CS116B Chris Pollett Mar 21, 2004.

CSE 681 Illumination and Phong Shading

Visualisatie BMT. Rendering. Arjan Kok

Shading I Computer Graphics I, Fall 2008

Global Illumination. COMP 575/770 Spring 2013

Introduction to Computer Vision. Introduction CMPSCI 591A/691A CMPSCI 570/670. Image Formation

Given: scene specification (object positions, optical properties p of the surface, viewer position, viewing direction, )

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

Illumination and Shading

COMP 175 COMPUTER GRAPHICS. Lecture 11: Recursive Ray Tracer. COMP 175: Computer Graphics April 9, Erik Anderson 11 Recursive Ray Tracer

Simple Lighting/Illumination Models

Implementation Issues

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

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

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

CS770/870 Spring 2017 Color and Shading

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

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

Comp 410/510 Computer Graphics. Spring Shading

Illumination Models. To calculate the color of an illuminated position on the

3D Rendering and Ray Casting

Introduction Ray tracing basics Advanced topics (shading) Advanced topics (geometry) Graphics 2010/2011, 4th quarter. Lecture 11: Ray tracing

Turn on the Lights: Reflectance

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

COMP371 COMPUTER GRAPHICS

3D Rendering and Ray Casting

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

Reflection and Shading

Ray Tracing. Brian Curless CSEP 557 Fall 2016

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

Lighting. Figure 10.1

Illumination & Shading: Part 1

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

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

Computer Vision Systems. Viewing Systems Projections Illuminations Rendering Culling and Clipping Implementations

The Rendering Equation. Computer Graphics CMU /15-662

Photorealism: Ray Tracing

Reflection and Refraction

Ray Casting. Outline. Similar to glulookat derivation. Foundations of Computer Graphics

Sung-Eui Yoon ( 윤성의 )

Reflection and Refraction

Virtual Reality for Human Computer Interaction

Lecture 10: Ray tracing

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

Computer Graphics. Illumination and Shading

EE Light & Image Formation

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

x ~ Hemispheric Lighting

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

Geometrical modeling of light scattering from paper substrates

Complex Shading Algorithms

surface: reflectance transparency, opacity, translucency orientation illumination: location intensity wavelength point-source, diffuse source

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

CMSC427 Shading Intro. Credit: slides from Dr. Zwicker

Rendering. Generate an image from geometric primitives II. Rendering III. Modeling IV. Animation. (Michael Bostock, CS426, Fall99)

CS 488. More Shading and Illumination. Luc RENAMBOT

Ray Tracing. Kjetil Babington

Lighting affects appearance

Supplement to Lecture 16

Transcription:

llumination homas Funkhouser Princeton University C0 426, Fall 2000 ay Casting mage aycastcamera camera, cene scene, int width, int height { mage image = new magewidth, height; for int i = 0; i < width; i { for int j = 0; j < height; j { ay ray = ConstructayhroughPixelcamera, i, j; ntersection hit = Findntersectionray, scene; image[i][j] = GetColorscene, ray, hit; } } return image; } Wireframe 1

ay Casting mage aycastcamera camera, cene scene, int width, int height { mage image = new magewidth, height; for int i = 0; i < width; i { for int j = 0; j < height; j { ay ray = ConstructayhroughPixelcamera, i, j; ntersection hit = Findntersectionray, scene; image[i][j] = GetColorscene, ray, hit; } } return image; } Without llumination ay Casting mage aycastcamera camera, cene scene, int width, int height { mage image = new magewidth, height; for int i = 0; i < width; i { for int j = 0; j < height; j { ay ray = ConstructayhroughPixelcamera, i, j; ntersection hit = Findntersectionray, scene; image[i][j] = GetColorscene, ray, hit; } } return image; } With llumination 2

llumination How do we compute radiance for a sample ray? image[i][j] = GetColorscene, ray, hit; ngel Figure 6.2 Goal Must derive computer models for... Emission at light sources cattering at surfaces eception at the camera esirable features Concise Efficient to compute ccurate 3

Overview irect llumination Emission at light sources cattering at surfaces Global illumination hadows efractions nter-object reflections irect llumination Modeling ight ources x,y,z,θ,φ,λ... describes the intensity of energy, leaving a light source, arriving at locationx,y,z,... from direction θ,φ,... with wavelength λ x,y,z ight 4

Empirical Models deally measure irradiant energy for all situations oo much storage ifficult in practice λ OpenG ight ource Models imple mathematical models: Point light irectional light pot light 5

Point ight ource Models omni-directional point source e.g., bulb intensity 0, position px, py, pz, factors k c, k l, k q for attenuation with distance d ight d px, py, pz 0 = k c k ld k q d 2 irectional ight ource Models point light source at infinity e.g., sun intensity 0, direction dx,dy,dz dx, dy, dz o attenuation with distance = 0 6

! " pot ight ource Models point light source with direction e.g., uxo intensity 0, position px, py, pz, direction dx, dy, dz attenuation d px, py, pz ight γ k d 0 = k c k ld q 2 Overview irect llumination Emission at light sources cattering at surfaces Global illumination hadows efractions nter-object reflections irect llumination 7

# $ % & ' Modeling urface eflectance s θ,φ,γ,ψ,λ... describes the amount of incident energy, arriving from direction θ,φ,... leaving in direction γ,ψ, with wavelength λ urface Empirical Models deally measure radiant energy for all combinations of incident angles oo much storage ifficult in practice λ ψ,λ urface θ,φ 8

*, -. / 0 OpenG eflectance Model imple analytic model: diffuse reflection specular reflection emission ambient Based on model proposed by Phong urface OpenG eflectance Model imple analytic model: diffuse reflection specular reflection emission ambient Based on Phong model proposed illumination by model Phong urface 9

1 2 iffuse eflection ssume surface reflects equally in all directions Examples: chalk, clay urface iffuse eflection How much light is reflected? epends on angle of incident light d = dcosθ θ d d urface 10

3 4 5 6 7 iffuse eflection ambertian model cosine law dot product θ urface = OpenG eflectance Model imple analytic model: diffuse reflection specular reflection emission ambient urface 11

8 9 pecular eflection eflection is strongest near mirror angle Examples: mirrors, metals θ θ pecular eflection How much light is seen? epends on angle of incident light and angle to viewer iewer α θ θ 12

: ; < = > pecular eflection Phong Model cosα n iewer α θ θ = n OpenG eflectance Model imple analytic model: diffuse reflection specular reflection emission ambient urface 13

? @ B Emission epresents light eminating directly from polygon Emission 0 OpenG eflectance Model imple analytic model: diffuse reflection specular reflection emission ambient urface 14

C E F mbient erm epresents reflection of all indirect illumination his is a total hack avoids complexity of global illumination! OpenG eflectance Model imple analytic model: diffuse reflection specular reflection emission ambient urface 15

G H J OpenG eflectance Model imple analytic model: diffuse reflection specular reflection emission ambient urface OpenG eflectance Model um diffuse, specular, emission, and ambient eonard McMillan, M 16

17 urface llumination Calculation ingle light source: n E = iewer α θ θ urface llumination Calculation Multiple light sources: = i i n i i i E 2 iewer 1

M O Overview irect llumination Emission at light sources cattering at surfaces Global illumination hadows ransmissions nter-object reflections Global llumination Global llumination Greg arson 18

19 hadows hadow terms tell which light sources are blocked P Cast ray towards each light source i Q i = 0 if ray is blocked, i = 1 otherwise ngel Figure 6.44 = n E hadow erm ay Casting race primary rays from camera irect illumination from unblocked lights only = n E

20 n E = ecursive ay racing lso trace secondary rays from hit surfaces Global illumination from mirror reflection and transparency Mirror reflections race secondary ray in direction of mirror reflection Evaluate radiance along secondary ray and include it into illumination model n E = adiance for mirror reflection ray

21 ransparency race secondary ray in direction of refraction U Evaluate radiance along secondary ray and include it into illumination model n E = adiance for refraction ray n E = ransparency ransparency coefficient is fraction transmitted = 1 if object is translucent, = 0 if object is opaque W 0 < < 1if object is semi-translucent ransparency Coefficient

X efractive ransparency For thin surfaces, can ignore change in direction ssume light travels straight through surface η i η r Θr Θ i Θ i efractive ranparency For solid objects, apply nell s law: η sin Θ = η sin Θ r r i i η i η r Θ i Θr ηi = cosθi cosθr η r ηi η r 22

23 ecursive ay racing ay tree represents illumination computation ay traced through scene ay tree n E = ecursive ay racing ay tree represents illumination computation ay traced through scene ay tree n E =

Y Z ecursive ay racing GetColor calls ayrace recursively mage ayracecamera camera, cene scene, int width, int height { mage image = new magewidth, height; for int i = 0; i < width; i { for int j = 0; j < height; j { ay ray = ConstructayhroughPixelcamera, i, j; ntersection hit = Findntersectionray, scene; image[i][j] = GetColorscene, ray, hit; } } return image; } ummary ay casting direct llumination Usually use simple analytic approximations for light source emission and surface reflectance ecursive ray tracing global illumination ncorporate shadows, mirror reflections, and pure refractions ll of this is an approximation so that it is practical to compute More on global illumination later! 24

[ \ ] ^ _ llumination erminology adiant power [flux] Φ ate at which light energy is transmitted in Watts. adiant ntensity Power radiated onto a unit solid angle in direction in Watts/sr» e.g.: energy distribution of a light source inverse square law adiance adiant intensity per unit projected surface area in Watts/m 2 sr» e.g.: light carried by a single ray no inverse square law rradiance E ncident flux density on a locally planar area in Watts/m 2» e.g.: light hitting a surface along a adiosity B Exitant flux density from a locally planar area in Watts/ m 2 25