CSC418 Computer Graphics n Illumination n Lights n Lightinging models.

Slides:



Advertisements
Similar presentations
Lecture Fall 2001 Illumination and Shading Light Sources Empirical Illumination Shading Transforming Normals Tong-Yee Lee.
Advertisements

1 Graphics CSCI 343, Fall 2013 Lecture 18 Lighting and Shading.
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 Computer Graphics By : Mohammed abu Lamdy ITGD3107 University of Palestine Supervision: Assistant Professor Dr. Sana’a Wafa Al-Sayegh.
Light Issues in Computer Graphics Presented by Saleema Amershi.
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.
Based on slides created by Edward Angel
1 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Shading I.
University of New Mexico
Computer Graphics - Class 10
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2008 Tamara Munzner Lighting/Shading II Week.
IMGD 1001: Illumination by Mark Claypool
Lighting and Shading Wen-Chieh (Steve) Lin
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
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.
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 & Shading.
CHAPTER 9 Lighting © 2008 Cengage Learning EMEA. LEARNING OBJECTIVES In this chapter you will learn about: – –Light sources – –Point lights – –Spotlights.
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
Computer Graphics Lighting.
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.
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.
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.
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.
Illumination.
Announcements Office hours today 2:30-3:30 Graded midterms will be returned at the end of the class.
11/04/04© University of Wisconsin, CS559 Fall 2004 Last Time Visibility –Z-Buffer and transparency –A-buffer –Area subdivision –BSP Trees –Exact Cell-Portal.
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.
Physics 213 General Physics Lecture Last Meeting: Electromagnetic Waves, Maxwell Equations Today: Reflection and Refraction of Light.
Lecture Fall 2001 Illumination and Shading in OpenGL Light Sources Empirical Illumination Shading Transforming Normals Tong-Yee Lee.
Specular Reflection Lecture 27 Mon, Nov 10, 2003.
Cornell CS465 Spring 2004 Lecture 4© 2004 Steve Marschner 1 Shading CS 465 Lecture 4.
1 CSCE 441: Computer Graphics Lighting Jinxiang Chai.
OpenGL Shading. 2 Objectives Learn to shade objects so their images appear three-dimensional Introduce the types of light-material interactions Build.
Lighting and Reflection Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
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,
CS552: Computer Graphics Lecture 33: Illumination and Shading.
1 CSCE 441: Computer Graphics Lighting Jinxiang Chai.
Computer Graphics Ken-Yi Lee National Taiwan University (the slides are adapted from Bing-Yi Chen and Yung-Yu Chuang)
Computer Graphics: Illumination
Illumination : Hearn & Baker Ch. 10
7. Illumination Phong Illumination Diffuse, Specular and Ambient
Shading CS 465 Lecture 4 © 2004 Steve Marschner • 1.
© University of Wisconsin, CS559 Spring 2004
Isaac Gang University of Mary Hardin-Baylor
Illumination Models Chapter 14 Section 14.1 to 14.2
Chapter IX Lighting.
CS 480/680 Computer Graphics Shading.
Lighting Calculations
Presentation transcript:

CSC418 Computer Graphics n Illumination n Lights n Lightinging models

Illumination

Illumination Models n Illumination –The transport of luminous flux from light sources between points via direct and indirect paths n Lighting –The process of computing the luminous intensity reflected from a specified 3-D point n Shading –The process of assigning a color to a pixel n Illumination Models –Simple approximations of light transport –Physical models of light transport

Two Components of Illumination n Light Sources –Emission Spectrum (color) –Geometry (position and direction) –Directional Attenuation n Surface Properties (Reflectors) –Reflectance Spectrum (color) –Geometry (position, orientation, and micro-structure) –Absorption –Transmission

Ambient Light Source n Even though an object in a scene is not directly lit it will still be visible. This is because light is reflected indirectly from nearby objects. A simple hack that is commonly used to model this indirect illumination is to use of an ambient light source. Ambient light has no spatial or directional characteristics. The amount of ambient light incident on each object is a constant for all surfaces in the scene. An ambient light can have a color. n The amount of ambient light that is reflected by an object is independent of the object's position or orientation. Surface properties are used to determine how much ambient light is reflected.

Directional Light Sources n All of the rays from a directional light source have a common direction, and no point of origin. It is as if the light source was infinitely far away from the surface that it is illuminating. Sunlight is an example of an infinite light source. n n The direction from a surface to a light source is important for computing the light reflected from the surface. With a directional light source this direction is a constant for every surface. A directional light source can be colored.

Point Light Sources n The point light source emits rays in radial directions from its source. A point light source is a fair approximation to a local light source such as a light bulb. n n The direction of the light to each point on a surface changes when a point light source is used. Thus, a normalized vector to the light emitter must be computed for each point that is illuminated.

Other Light Sources n Spotlights –Point source whose intensity falls off away from a given direction –Requires a color, a point, a direction, parameters that control the rate of fall off n Area Light Sources –Light source occupies a 2-D area (usually a polygon or disk) –Generates soft shadows n Extended Light Sources –Spherical Light Source –Generates soft shadows

Ideal Diffuse Reflection n First, we will consider a particular type of surface called an ideal diffuse reflector. An ideal diffuse surface is, at the microscopic level a very rough surface. Chalk is a good approximation to an ideal diffuse surface. Because of the microscopic variations in the surface, an incoming ray of light is equally likely to be reflected in any direction over the hemisphere.

Lambert's Cosine Law Ideal diffuse reflectors reflect light according to Lambert's cosine law, Lambert's law states that the reflected energy from a small surface area in a particular direction is proportional to cosine of the angle between that direction and the surface normal.

Computing Diffuse Reflection n The angle between the surface normal and the incoming light ray is called the angle of incidence. n I light : intensity of the incoming light. n k d : represents the diffuse reflectivity of the surface at that wavelength. n What is the range of k d

Specular Reflection When we look at a shiny surface, such as polished metal, we see a highlight, or bright spot. Where this bright spot appears on the surface is a function of where the surface is seen from. The reflectance is view dependent.

Snell's Law n Reflection behaves according to Snell's law: –The incoming ray, the surface normal, and the reflected ray all lie in a common plane. –The angle that the reflected ray forms with the surface normal is determined by the angle that the incoming ray forms with the surface normal, and the relative speeds of light of the mediums in which the incident and reflected rays propagate according to the following expression. (Note: n l and n r are the indices of refraction)

Reflection n Reflection is a very special case of Snell's Law where the incident light's medium and the reflected rays medium is the same. Thus angle of incidence = angle of reflection

Non-ideal Reflectors n Snell's law, applies only to ideal mirror reflectors. n In general, most of the reflected light travels in the direction of the ideal ray. However, because of microscopic surface variations we might expect some of the light to be reflected just slightly offset from the ideal reflected ray. As we move farther and farther, in the angular sense, from the reflected ray we expect to see less light reflected.

Phong Illumination n Phong Illumination approximates specular fall-off with no physical basis, yet it is one of the most commonly used illumination models in computer graphics. n The cosine term is maximum when the surface is viewed from the mirror direction and falls off to 0 when viewed at 90 degrees away from it. The scalar n shiny controls the rate of this fall off. 

Effect of the n shiny coefficient n The diagram below shows the how the reflectance drops off in a Phong illumination model. For a large value of the n shiny coefficient, the reflectance decreases rapidly with increasing viewing angle.

Computing Phong Illumination

Blinn & Torrance Variation n In this equation the angle of specular dispersion is computed by how far the surface's normal is from a vector bisecting the incoming light direction and the viewing direction.

Phong Examples

Phong Illumination model

Where do we Illuminate? n To this point we have discussed how to compute an illumination model at a point on a surface. n Which points on the surface is the illumination model applied? n Illumination can be costly… …and then God said

Next Lecture …let there be “shading”