Shading Surface can either (both) 1.Emit light. E.g. light bult 2.Reflect light. E.g. Mirror.

Slides:



Advertisements
Similar presentations
Computer Graphics - Shading -
Advertisements

SI23 Introduction to Computer Graphics
5.1 si31_2001 SI31 Advanced Computer Graphics AGR Lecture 5 A Simple Reflection Model.
Illumination Lighting and Shading CSE 470/598 Introduction to Computer Graphics Arizona State University Dianne Hansford.
1 Graphics CSCI 343, Fall 2013 Lecture 18 Lighting and Shading.
CAP 4703 Computer Graphic Methods Prof. Roy Levow Chapter 6.
CS 480/680 Computer Graphics Shading 2 Dr. Frederick C Harris, Jr.
Virtual Realism LIGHTING AND SHADING. Lighting & Shading Approximate physical reality Ray tracing: Follow light rays through a scene Accurate, but expensive.
1 Computer Graphics By : Mohammed abu Lamdy ITGD3107 University of Palestine Supervision: Assistant Professor Dr. Sana’a Wafa Al-Sayegh.
Lighting and Illumination Lighting is the major problem in computer graphics, for either realism or real-time compositions- harder than modeling Consider.
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
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.
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.
CS 376 Introduction to Computer Graphics 03 / 30 / 2007 Instructor: Michael Eckmann.
6.1 Vis_04 Data Visualization Lecture 6 - A Rough Guide to Rendering.
CS5500 Computer Graphics March 26, Shading Reference: Ed Angel’s book.
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.
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.
CS 480/680 Computer Graphics Shading I Dr. Frederick C Harris, Jr.
CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination.
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
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
1 Shading I Shandong University Software College Instructor: Zhou Yuanfeng
Shading (introduction to rendering). Rendering  We know how to specify the geometry but how is the color calculated.
Copyright  1999 by James H. Money. All rights reserved. Except as permitted under United States Copyright Act of 1976, no part of this publication may.
CSC418 Computer Graphics n Illumination n Lights n Lightinging models.
THE RAY MODEL OF LIGHT Section 11.4.
Steve Sterley. Real World Lighting Physical objects tend to interact with light in three ways: Absorption (black body) Reflection (mirror) Transmission.
Illumination and Shading How to shade surfaces based on the position,orientation,characteristics of the surfaces and the light sources illuminating them.
CSE 381 – Advanced Game Programming GLSL Lighting.
Illumination.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
CS447/ Realistic Rendering -- Shading-- Introduction to 2D and 3D Computer Graphics.
Specular Reflection Lecture 27 Mon, Nov 10, 2003.
Cornell CS465 Spring 2004 Lecture 4© 2004 Steve Marschner 1 Shading CS 465 Lecture 4.
Laws of Reflection and Plane Mirror Images
Illumination and Shading Prof. Lizhuang Ma Shanghai Jiao Tong University.
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.
Computer Graphics Lecture 25 Fasih ur Rehman. Last Class Shading.
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)
Light. Intensity calculation = wavelength I( ) = wavelength intensity of light reaching eye I( ) = I diff ( ) + I spec ( ) + I refl ( ) + I trans ( )
Computer Graphics: Illumination
7. Illumination Phong Illumination Diffuse, Specular and Ambient
Light at a Surface: Important terms:
Unit-7 Lighting and Shading
CSE 470 Introduction to Computer Graphics Arizona State University
Fundamentals of Computer Graphics Part 6 Shading
Isaac Gang University of Mary Hardin-Baylor
Advanced Computer Graphics
Lighting and Shading (I)
Simple Illumination CSE 681.
CS 480/680 Computer Graphics Shading.
Presentation transcript:

Shading Surface can either (both) 1.Emit light. E.g. light bult 2.Reflect light. E.g. Mirror

Shading Rendering equation Cannot solved in general Even by numerical method.

Shading Approximation of rendering equation Radiosity (slow) Ray tracing (slow) Phong Reflection Model similar to ray tracing Consider only single interaction (between light source & surface) Two independent parts of the problem Light source Reflection model (between light and material)

Shading How refection model works: 1.Light directly to your eyes 2.Light reflect from the surface 3.Single/multiple interaction between rays and object.

Shading When light strikes a surface, Some of it is abosrbed, Some of it is reflected. If the surface is opaque, reflection and absorption account for all the light striking the surface. Surface is translucent, some light transmitted through the material (& interact with other objects).

Shading 1.An object illuminated by white light appears red because it absorbs most of the incident light but reflects light in the red range of frequencies. 2.A shiny object appears so because its surface is smooth. Conversely, a dull object has a rough surface. 3.The shading of objects also depends on the orientation of their surfaces, a factor that is characterized by the normal vector at each point.

Classification of Surface 1.Specular surface appear shiny because most of the light that is reflected is scattered in a narrow range of angle close to the angle of reflection. Mirrors are perfectly specular surfaces. 2.Diffuse surfaces are characterized by reflected light being scattered in all directions. Perfectly diffuse surfaces scatter light equally in all directions and thus appear the same to all viewer. 3.Translucent surfaces allow some light to pentrate the surface and to emerge from another location on the object. This process of refraction characterizes glass and water.

Light Source There are four basic types of light sources: 1.Ambient Light. 2.Point light 3.Spot Lights 4.Distance Light. We describe a source through a three component intensity or luminance function I=[I r, I g, I b ]

Ambient Light In some rooms, such as in certain classrooms or kitchens, the lights have been designed and positioned to provide uniform illumination throughout the room. This uniform lighting is called ambient light. I a = [I ar, I ag, I ab ]

Point Light An ideal point source emits light equally in all direction. I(p 0 ) = [Ir(p 0 ), Ig(p 0 ), Ib(p 0 )]. i(p,p 0 ) = I(p 0 ) /|p-p 0 | 2 Or i(p,p 0 ) = I(p 0 ) /a+bd+cd 2 where d=|p-p 0 |

SpotLight Apex: p s Direction: L s Angle:  How rapidly the light intensity drops off: Cos e . 0<  < . Notice that cos  = s  l, l is the direction of the light, s is a vector from apex to the surface. The angle between s and l is . Both s and l are unit length.

Phong Reflection Model The model uses four vectors, l, n, v, r, to calculate a color for an arbitrary point p on the surface. l: point from p to the light. N: normal of p on the surface V: point from p to the eye. R: reflection vector for the vector from light to p.

Phong Model The Phong model supports the three types of material-light interactions: ambient, diffuse, and specular. Suppose that we have a set of point sources. We assume that each source can have separate ambient, diffuse, and specular components for each of the three primary color. We need 9 coefficients to characterize these terms at any point p on the surface. Li=

Phong Model For each point, we have 9 coefficients that we can place in matrix of reflection terms of the form: Ri = We can then compute the contribution for each color source by adding the ambient, diffuse, and specular components. E.g. The red intensity that we see at p from source i: I ir = R ira L ira +R ird L ird +R irs L irs =I ira +I ird +I irs