Illumination Model How to compute color to represent a scene

Slides:



Advertisements
Similar presentations
5.1 si31_2001 SI31 Advanced Computer Graphics AGR Lecture 5 A Simple Reflection Model.
Advertisements

Computer Vision Radiometry. Bahadir K. Gunturk2 Radiometry Radiometry is the part of image formation concerned with the relation among the amounts of.
1 Graphics CSCI 343, Fall 2013 Lecture 18 Lighting and Shading.
Computer graphics & visualization Global Illumination Effects.
Virtual Realism LIGHTING AND SHADING. Lighting & Shading Approximate physical reality Ray tracing: Follow light rays through a scene Accurate, but expensive.
Physically Based Illumination Models
1. What is Lighting? 2 Example 1. Find the cubic polynomial or that passes through the four points and satisfies 1.As a photon Metal Insulator.
Week 9 - Wednesday.  What did we talk about last time?  Fresnel reflection  Snell's Law  Microgeometry effects  Implementing BRDFs  Image based.
Based on slides created by Edward Angel
1 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Shading I.
University of New Mexico
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2008 Tamara Munzner Lighting/Shading III Week.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2008 Tamara Munzner Lighting/Shading II Week.
Illumination Model How to compute color to represent a scene As in taking a photo in real life: – Camera – Lighting – Object Geometry Material Illumination.
IMGD 1001: Illumination by Mark Claypool
Computer Graphics (Spring 2008) COMS 4160, Lecture 20: Illumination and Shading 2
3/23/2005 © Dr. Zachary Wartell 1 Illumination Models and Surface- Rendering Methods.
Computer Graphics (Fall 2008) COMS 4160, Lecture 19: Illumination and Shading 2
Introduction to Computer Vision CS / ECE 181B Tues, May 18, 2004 Ack: Matthew Turk (slides)
7M836 Animation & Rendering
Objectives Learn to shade objects so their images appear three- dimensional Learn to shade objects so their images appear three- dimensional Introduce.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2005 Tamara Munzner Lighting and Shading Week.
University of British Columbia CPSC 414 Computer Graphics © Tamara Munzner 1 Shading Week 5, Wed 1 Oct 2003 recap: lighting shading.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Shading I Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
Lighting & Shading.
CS 480/680 Computer Graphics Shading I Dr. Frederick C Harris, Jr.
CS 445 / 645: Introductory Computer Graphics
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
COMPUTER GRAPHICS CS 482 – FALL 2014 AUGUST 27, 2014 FIXED-FUNCTION 3D GRAPHICS MESH SPECIFICATION LIGHTING SPECIFICATION REFLECTION SHADING HIERARCHICAL.
-Global Illumination Techniques
CSC418 Computer Graphics n Illumination n Lights n Lightinging models.
David Luebke 1 10/26/2015 Lighting CS 445/645 Introduction to Computer Graphics David Luebke, Spring 2003.
Taku KomuraComputer Graphics Local Illumination and Shading Computer Graphics – Lecture 10 Taku Komura Institute for Perception, Action.
Steve Sterley. Real World Lighting Physical objects tend to interact with light in three ways: Absorption (black body) Reflection (mirror) Transmission.
Basic Illumination BRANCH :- ELECTRICAL (C11) Gohil Amit M. ( ) Joshi Jay P. ( ) Barot Mahesh P. ( ) Pandya Bhrugu I.
University of Texas at Austin CS 378 – Game Technology Don Fussell CS 378: Computer Game Technology Basic Rendering Pipeline and Shading Spring 2012.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
Illumination and Shading
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Lighting CSIS 5838: Graphics and Animation for Gaming.
Local Illumination and Shading
Cornell CS465 Spring 2004 Lecture 4© 2004 Steve Marschner 1 Shading CS 465 Lecture 4.
Where We Stand So far we know how to: –Transform between spaces –Rasterize –Decide what’s in front Next –Deciding its intensity and color.
1 CSCE 441: Computer Graphics Lighting Jinxiang Chai.
Illumination Model How to compute color to represent a scene As in taking a photo in real life: – Camera – Lighting – Object Geometry Material Illumination.
OpenGL Shading. 2 Objectives Learn to shade objects so their images appear three-dimensional Introduce the types of light-material interactions Build.
Illumination Models. Introduction 1 Illumination model: Given a point on a surface, what is the perceived color and intensity? Known as Lighting Model,
CS552: Computer Graphics Lecture 33: Illumination and Shading.
Computer Graphics Lecture 30 Mathematics of Lighting and Shading - IV Taqdees A. Siddiqi
Radiometry of Image Formation Jitendra Malik. What is in an image? The image is an array of brightness values (three arrays for RGB images)
1 CSCE 441: Computer Graphics Lighting Jinxiang Chai.
Computer Graphics: Illumination
Illumination Models and Surface-Rendering Methods CEng 477 Introduction to Computer Graphics.
Computer Graphics (fall,2010) School of Computer Science University of Seoul Minho Kim.
7. Illumination Phong Illumination Diffuse, Specular and Ambient
Shading CS 465 Lecture 4 © 2004 Steve Marschner • 1.
© University of Wisconsin, CS559 Spring 2004
Volume Visualization Chap. 10 November 20 , 2008 Jie Zhang Copyright ©
Advanced Computer Graphics
Prof. Harriet Fell Spring 2007 Lecture 26 – March 19, 2007
Lighting.
CSE 470 Introduction to Computer Graphics Arizona State University
Isaac Gang University of Mary Hardin-Baylor
Illumination Models Chapter 14 Section 14.1 to 14.2
Exploring Shaders in Unity
Chapter IX Lighting.
Illumination and Shading
Simple Illumination CSE 681.
Computer Graphics (Fall 2003)
Presentation transcript:

Illumination Model How to compute color to represent a scene As in taking a photo in real life: Camera Lighting Object Geometry Material Illumination model: Combine all to produce a color Light source Camera material property Object geometry (shape, size, location)

Ambient Light Simplest model: when all lights are off! Still sees color! Why? How to model? is the “ambient” light is the object’s “ambient” material property! A “Vector” equation: RGB Blend, flat, no 3D features

Diffuse Reflection Intensity of paper in relation with light source In coming energy: is scattered uniformly in all directions according to the “facing” of the paper Normal Vector of the paper

Model Diffuse Reflection Normal: 𝑵 θ Incoming Direction: 𝑳 Amount Scattered Proportion to the angle (θ) between 𝑵 and 𝑳 Notice: 𝑳 points away from the surface All vectors normalized Model Diffuse: 𝐼 𝑑 ∝ 𝑁 ∙ 𝐿 Proportional constant: 𝑘 𝑑 (diffuse coefficient) Introduce diffuse light source: 𝐿 𝑑 𝐼 𝑑 = 𝑘 𝑑 𝐿 𝑑 𝑁 ∙ 𝐿

Diffuse Lighting 𝐼 𝑑 = 𝑘 𝑑 𝐿 𝑑 𝑁 ∙ 𝐿 From object: From scene: Normal: 𝑵 θ Incoming Direction: 𝑳 𝐼 𝑑 = 𝑘 𝑑 𝐿 𝑑 𝑁 ∙ 𝐿 From object: 𝑘 𝑑 -- diffuse material property 𝑁 -- object geometric property From scene: 𝐿 𝑑 and 𝐿 -- Light source intensity and direction 𝑁 ∙ 𝐿 -- is a float 𝑘 𝑑 , 𝐿 𝑑 -- are RGB triples

𝑁 ∙ 𝐿 and Diffuse Lighting 𝐼= 𝑁 ∙ 𝐿 𝐼 𝑑 = 𝑘 𝑑 𝐿 𝑑 𝑁 ∙ 𝐿

Combine: Ambient and Diffuse 𝐼= 𝐼 𝑎 + 𝐼 𝑑 𝐼= 𝑘 𝑎 𝐿 𝑎 + 𝑘 𝑑 𝐿 𝑑 𝑁 ∙ 𝐿 kd(1,1,1) kd(0.8) kd(0.6) kd(0.4) kd(0.2)

Look at my White Board Marker! What are these? “shinning” white stuff? Image credit: Some random site selling random stuff Reflection of Light Sources!! In coming energy: is scattered mainly in the mirror reflection direction Visible: scattered energy is a function of how far from mirror reflection direction

Model Specular Reflection Reflection Direction of Light: 𝑹 View Direction: 𝑽 Normal: 𝑵 Incoming Direction: 𝑳 θ α Visible Amount Scattered Proportion to the angle (α) between 𝑽 and 𝑹 Notice: 𝑳 points away from the surface All vectors normalized

But, where does 𝑅 come from?? Specular Reflection 𝐼 𝑠 ∝ 𝑉 ∙ 𝑅 Proportional constant: 𝑘 𝑠 (specular coefficient) Specular light source: 𝐿 𝑠 𝐼 𝑠 = 𝑘 𝑠 𝐿 𝑠 𝑉 ∙ 𝑅 From object: 𝑘 𝑠 -- specular material property 𝑁 -- object geometric property From scene: 𝐿 𝑠 and 𝐿 -- Light source intensity and direction 𝑉 -- is defined by camera 𝑉 ∙ 𝑅 -- is a float 𝑘 𝑠 , 𝐿 𝑠 -- are RGB triples 𝑹 𝑽 𝑵 𝑳 θ α But, where does 𝑅 come from??

Need to control drop off rate Inadequacy of 𝑉 ∙ 𝑅 𝐼 𝑠 = 𝑘 𝑠 𝐿 𝑠 𝑉 ∙ 𝑅 Introduce: n – shinningness 𝐼 𝑠 = 𝑘 𝑠 𝐿 𝑠 𝑉 ∙ 𝑅 𝑛 𝑹 𝑽 𝑵 𝑳 θ α Drops off too slowly 𝑉 ∙ 𝑅 Need to control drop off rate α 90°

( 𝑉 ∙ 𝑅 ) 𝑛 and Specular Lighting 𝑛=50 𝑛=1 𝑛=10 𝑛=10 𝐼= 𝑉 ∙ 𝑅 𝑛 𝑆𝑐𝑒𝑛𝑒 𝐶𝑜𝑚𝑝𝑜𝑠𝑖𝑡𝑖𝑜𝑛: Three light sources N different on each object 𝐼 𝑠 = 𝑘 𝑠 𝐿 𝑠 𝑉 ∙ 𝑅 𝑛

Combine all: 𝐼= 𝐼 𝑎 + 𝐼 𝑑 + 𝐼 𝑠 𝐼= 𝑘 𝑎 𝐿 𝑎 + 𝑘 𝑑 𝐿 𝑑 𝑁 ∙ 𝐿 + 𝑘 𝑠 𝐿 𝑠 𝑉 ∙ 𝑅 𝑛 n=2 n=10 Scene Composition n=20 n=50

The Reflection Halfway Vector 𝑅 =2 𝑁 ∙ 𝐿 𝑁 − 𝐿 Must compute for each pixel Very expensive!! Introduce halfway vector ( 𝐻 ) 𝐻 = 𝑉 + 𝐿 2 𝐼 𝑠 = 𝑘 𝑠 𝐿 𝑠 𝑁 ∙ 𝐻 𝑛 𝑹 𝑽 𝑵 𝑳 θ α 𝑯 𝑵 𝑳 𝑽

The Phong Illumination Model 𝐼= 𝑘 𝑎 𝐿 𝑎 + 𝑘 𝑑 𝐿 𝑑 𝑁 ∙ 𝐿 + 𝑘 𝑠 𝐿 𝑠 𝑉 ∙ 𝑅 𝑛 All graphics hardware implements (maybe small variation of this mode) E.g., the H vector 𝑹 𝑵 𝑳

Evaluating the Phong Model Question: How to improve the model? Non-physically based Based on “observation” E.g., specularity: as n increase the area under the curve decreases Large n => less energy in the scene! E.g., “Ambient” term Color bleeding

Recently : describe/simulate physics Radiance: Light energy in a direction Think river: flow of energy over cross section area Irradiance: Radiance received from fixed incoming area BRDF: (material properties) Bi-directional Reflectance Distribution Function How energy reflect across surfaces Angular and Spectrum dependencies Challenges: Difficult to model correctly Computationally costly What is the ultimate goal? looks good vs. looks real

Recently: physics only if .. As long as it looks good, who cares? Games, Movies, etc. Physics: Looks real But: does it look “good”?