University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2008 Tamara Munzner Lighting/Shading II Week.

Slides:



Advertisements
Similar presentations
1GR2-00 GR2 Advanced Computer Graphics AGR Lecture 6 Physically Based Reflection Model.
Advertisements

5.1 si31_2001 SI31 Advanced Computer Graphics AGR Lecture 5 A Simple Reflection Model.
1 Graphics CSCI 343, Fall 2013 Lecture 18 Lighting and Shading.
Local Reflection Model Jian Huang, CS 594, Fall 2002.
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
Light Issues in Computer Graphics Presented by Saleema Amershi.
Torrance Sparrow Model of Reflectance + Oren Nayar Model of Reflectance.
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.
Chapter 16.3 – Reflection and Color
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 2007 Tamara Munzner Lighting/Shading III Week.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2005 Tamara Munzner Color Week 5, Fri Feb.
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 2007 Tamara Munzner Lighting/Shading I Week.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2005 Tamara Munzner Lighting and Shading Week.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2007 Tamara Munzner Vision/Color II, Virtual.
University of Texas at Austin CS395T - Advanced Image Synthesis Spring 2006 Don Fussell Previous lecture Reflectance I BRDF, BTDF, BSDF Ideal specular.
Rendering (彩現 渲染).
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2007 Tamara Munzner Lighting/Shading II Week.
3-D Computer Vision CSc83029 / Ioannis Stamos 3-D Computer Vision CSc Radiometry and Reflectance.
6.1 si31_2001 SI31 Advanced Computer Graphics AGR Lecture 6 Physically Based Reflection Model.
1 CSCE 641: Computer Graphics Lighting Jinxiang Chai.
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 Lighting Week 5, Mon 29 Sep 2003 recap: picking, light sources lighting.
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,
Course Website: Computer Graphics 16: Illumination.
Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006
LIGHTING Part One - Theory based on Chapter 6. Lights in the real world Lights bounce off surfaces and reflect colors, scattering light in many directions.
Shading Surface can either (both) 1.Emit light. E.g. light bult 2.Reflect light. E.g. Mirror.
CS 480/680 Computer Graphics Shading I Dr. Frederick C Harris, Jr.
Illumination.
Fundamentals of Computer Graphics Part 6 Shading prof.ing.Václav Skala, CSc. University of West Bohemia Plzeň, Czech Republic ©2002 Prepared with Angel,E.:
CS 445 / 645: Introductory Computer Graphics
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2010 Tamara Munzner Lighting/Shading II Week.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
MIT EECS 6.837, Durand and Cutler Local Illumination.
CS 445: Introduction to Computer Graphics David Luebke University of Virginia Visibility Calculations and Occlusion Culling.
CSC418 Computer Graphics n Illumination n Lights n Lightinging models.
CS 445 / 645 Introduction to Computer Graphics Lecture 14 Lighting Lighting.
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.
Advanced Illumination Models Chapter 7 of “Real-Time Rendering, 3 rd Edition”
Illumination.
Announcements Office hours today 2:30-3:30 Graded midterms will be returned at the end of the class.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2010 Tamara Munzner Lighting/Shading I Week.
Illumination and Shading
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2008 Tamara Munzner Color II, Lighting/Shading.
Lecture Fall 2001 Illumination and Shading in OpenGL Light Sources Empirical Illumination Shading Transforming Normals Tong-Yee Lee.
02/2/05© 2005 University of Wisconsin Last Time Reflectance part 1 –Radiometry –Lambertian –Specular.
1 CSCE 441: Computer Graphics Lighting Jinxiang Chai.
Lighting/Shading University of British Columbia
OpenGL Shading. 2 Objectives Learn to shade objects so their images appear three-dimensional Introduce the types of light-material interactions Build.
1 CSCE 441: Computer Graphics Lighting Jinxiang Chai.
David Luebke3/16/2016 CS 551 / 645: Introductory Computer Graphics David Luebke
Illumination Models. Introduction 1 Illumination model: Given a point on a surface, what is the perceived color and intensity? Known as Lighting Model,
CPSC 314 LIGHTING AND SHADING UGRAD.CS.UBC.CA/~CS314 slide credits: Mikhail Bessmeltsev et al 1.
CS552: Computer Graphics Lecture 33: Illumination and Shading.
1 CSCE 441: Computer Graphics Lighting Jinxiang Chai.
1 of 32 Computer Graphics Color. 2 of 32 Basics Of Color elements of color:
Computer Graphics: Illumination
Isaac Gang University of Mary Hardin-Baylor
Illumination Models Chapter 14 Section 14.1 to 14.2
Presentation transcript:

University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2008 Tamara Munzner Lighting/Shading II Week 7, Wed Feb 27

2 Review: HSV Color Space hue: dominant wavelength, “color” saturation: how far from grey value/brightness: how far from black/white cannot convert to RGB with matrix alone true luminance information not available

3 Review: YIQ Color Space color model used for color TV Y is luminance (same as CIE) I & Q are color (not same I as HSI!) using Y backwards compatible for B/W TVs conversion from RGB is linear green is much lighter than red, and red lighter than blue Q I

4 Review: Light Sources directional/parallel lights point at infinity: (x,y,z,0) T point lights finite position: (x,y,z,1) T spotlights position, direction, angle ambient lights

5 Ambient Light Sources scene lit only with an ambient light source Light Position Not Important Viewer Position Not Important Surface Angle Not Important

6 Directional Light Sources scene lit with ambient and directional light Light Position Not Important Viewer Position Not Important Surface Angle Important

7 Point Light Sources scene lit with ambient and point light source Light Position Important Viewer Position Important Surface Angle Important

8 Light Sources geometry: positions and directions coordinate system used depends on when you specify standard: world coordinate system effect: lights fixed wrt world geometry demo: alternative: camera coordinate system effect: lights attached to camera (car headlights) points and directions undergo normal model/view transformation illumination calculations: camera coords

9 Types of Reflection specular (a.k.a. mirror or regular) reflection causes light to propagate without scattering. diffuse reflection sends light in all directions with equal energy. glossy/mixed reflection is a weighted combination of specular and diffuse.

10 Specular Highlights

11 Reflectance Distribution Model most surfaces exhibit complex reflectances vary with incident and reflected directions. model with combination + + = specular + glossy + diffuse = reflectance distribution

12 Surface Roughness at a microscopic scale, all real surfaces are rough cast shadows on themselves “mask” reflected light: shadow Masked Light

13 Surface Roughness notice another effect of roughness: each “microfacet” is treated as a perfect mirror. incident light reflected in different directions by different facets. end result is mixed reflectance. smoother surfaces are more specular or glossy. random distribution of facet normals results in diffuse reflectance.

14 Physics of Diffuse Reflection ideal diffuse reflection very rough surface at the microscopic level real-world example: chalk microscopic variations mean incoming ray of light equally likely to be reflected in any direction over the hemisphere what does the reflected intensity depend on?

15 Lambert’s Cosine Law ideal diffuse surface reflection the energy reflected by a small portion of a surface from a light source in a given direction is proportional to the cosine of the angle between that direction and the surface normal reflected intensity independent of viewing direction depends on surface orientation wrt light often called Lambertian surfaces

16 Lambert’s Law intuitively: cross-sectional area of the “beam” intersecting an element of surface area is smaller for greater angles with the normal.

17 Computing Diffuse Reflection depends on angle of incidence: angle between surface normal and incoming light I diffuse = k d I light cos  in practice use vector arithmetic I diffuse = k d I light (n l) always normalize vectors used in lighting!!! n, l should be unit vectors scalar (B/W intensity) or 3-tuple or 4-tuple (color) k d : diffuse coefficient, surface color I light : incoming light intensity I diffuse : outgoing light intensity (for diffuse reflection) nl 

18 Diffuse Lighting Examples Lambertian sphere from several lighting angles: need only consider angles from 0° to 90° why? demo: Brown exploratory on reflection ploratories/applets/reflection2D/reflection_2d_java_browser.html

19 diffuse plus specular Specular Reflection shiny surfaces exhibit specular reflection polished metal glossy car finish specular highlight bright spot from light shining on a specular surface view dependent highlight position is function of the viewer’s position

20 Specular Highlights Michiel van de Panne

21 Physics of Specular Reflection at the microscopic level a specular reflecting surface is very smooth thus rays of light are likely to bounce off the microgeometry in a mirror-like fashion the smoother the surface, the closer it becomes to a perfect mirror

22 Optics of Reflection reflection follows Snell’s Law: incoming ray and reflected ray lie in a plane with the surface normal angle the reflected ray forms with surface normal equals angle formed by incoming ray and surface normal  (l)ight =  (r)eflection

23 Non-Ideal Specular Reflectance Snell’s law applies to perfect mirror-like surfaces, but aside from mirrors (and chrome) few surfaces exhibit perfect specularity how can we capture the “softer” reflections of surface that are glossy, not mirror-like? one option: model the microgeometry of the surface and explicitly bounce rays off of it or…

24 Empirical Approximation we expect most reflected light to travel in direction predicted by Snell’s Law but because of microscopic surface variations, some light may be reflected in a direction slightly off the ideal reflected ray as angle from ideal reflected ray increases, we expect less light to be reflected

25 Empirical Approximation angular falloff how might we model this falloff?

26 n shiny : purely empirical constant, varies rate of falloff k s : specular coefficient, highlight color no physical basis, works ok in practice v Phong Lighting most common lighting model in computer graphics (Phong Bui-Tuong, 1975)