Simple Illumination CSE 681.

Slides:



Advertisements
Similar presentations
SI23 Introduction to Computer Graphics
Advertisements

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.
Computer Graphics I, Fall 2010 Shading II.
1 Graphics CSCI 343, Fall 2013 Lecture 18 Lighting and Shading.
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.
Illumination and Shading
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
IMGD 1001: Illumination by Mark Claypool
1 CSCE 641: Computer Graphics Lighting Jinxiang Chai.
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.
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 & Shading.
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.
CS 445 / 645: Introductory Computer Graphics
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.
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.
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.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
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.
Local Illumination and Shading
Day 06 Vertex Shader for Ambient-Diffuse-Specular Lighting.
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.
In the name of God Computer Graphics. Where We Stand So far we know how to: –Transform between spaces –Draw polygons Next –Deciding a pixel’s intensity.
OpenGL Shading. 2 Objectives Learn to shade objects so their images appear three-dimensional Introduce the types of light-material interactions Build.
David Luebke3/16/2016 CS 551 / 645: Introductory Computer Graphics David Luebke
CS552: Computer Graphics Lecture 33: Illumination and Shading.
Computer Graphics Ken-Yi Lee National Taiwan University (the slides are adapted from Bing-Yi Chen and Yung-Yu Chuang)
Computer Graphics: Illumination
Illumination and Shading. Illumination (Lighting) Model the interaction of light with surface points to determine their final color and brightness OpenGL.
Illumination and Shading Prof. Lizhuang Ma Shanghai Jiao Tong University.
Computer Graphics (fall,2010) School of Computer Science University of Seoul Minho Kim.
1 Dr. Scott Schaefer Lighting. 2/49 Lighting/Illumination Color is a function of how light reflects from surfaces to the eye Global illumination accounts.
7. Illumination Phong Illumination Diffuse, Specular and Ambient
Shading CS 465 Lecture 4 © 2004 Steve Marschner • 1.
© University of Wisconsin, CS559 Spring 2004
Shading To determine the correct shades of color on the surface of graphical objects.
Lighting.
Illumination Model How to compute color to represent a scene
CSE 470 Introduction to Computer Graphics Arizona State University
Lesson 14 Key Concepts and Notes
Reflection and Refraction
Isaac Gang University of Mary Hardin-Baylor
Chapter IX Lighting.
Mirror Reflections and Images
Illumination and Shading
Last Time Liang-Barsky Details Weiler-Atherton clipping algorithm
Computer Graphics (Fall 2003)
Illumination Model 고려대학교 컴퓨터 그래픽스 연구실.
Illumination Model 고려대학교 컴퓨터 그래픽스 연구실.
CS 480/680 Computer Graphics Shading.
Reflection and Refraction
Reflection and Refraction
CSC418 Computer Graphics Raytracing Shadows Global Illumination.
Lighting Calculations
Presentation transcript:

Simple Illumination CSE 681

Types Ambient lighting indirect light hitting the object by reflecting off of other surfaces - color of surface reflecting it Diffuse light reflecting off the object by being absorbed by the surface (subsurface scattering) and reemitted equally in all directions Specular light reflecting immediately off the surface - directional and color of light source CSE 681

Ambient Radiosity - calculate amount of each surface visible from given point on object and propagate reflected light through environment Approximation - use constant as amount of indirect Light hitting each surface and Add to diffuse light hitting object Or Reflect portion of ambient light (OpenGL) CSE 681

Diffuse Light hitting surface direct from light source Scatters equally in all direction (get absorbed in surface and emerges in random direction) Because it is absorbed, the reflected light is the color of the object CSE 681

Diffuse Light View independent Reflectance function Amount of incoming light is function of incoming direction CSE 681

Diffuse Calculate area of delta area projected onto plane perpendicular to direction of light rays Projected area = sin(q) = cos(f) = N·L L f N dA L q CSE 681

Specular Light hitting surface direct from light source It reflects directly off of surface of object and is reflected primarily at angle from normal equal to angle coming in (incident angle) Because it is not absorbed, the reflected light is the color of the light source CSE 681

Specular Phong Model for Specular Reflection: Calculate direction of reglection and use cosine falloff as view deviates from that direction Direction of Reflection view dependent Light Reflectance function Deviation from direction of reflection CSE 681

Specular N (E·N) N (E·N)N - E RE E·N E (E·N)N + (E·N)N - E CSE 681

Specular N RE – refection vector of E L RL – refection vector of L RL q q Cos(q) = E· RL = L· RE Use RE dot L because RE only has to be calculated once, and it gets reused in Reflection Raise it to a power (material property) to control how fast the specular component falls off. Multiply by color of light. OR CSE 681

Illumination Model Assume single, white light source Add coefficient of reflectivity for diffuse, Kd , and specular light, Ks Add intensity of light, I Assume ambient term is incoming light to be diffusely reflected CSE 681

Multiple Light Sources Add in the effects of a light source if and only if the face is a FRONT FACE with respect to the light based on sign of N·L di = 0 if light is behind face = 1 if light is in front of face Assume multiple colored light sources Diffuse - color of object (cobj) Specular - color of light source (ci) Use L· RE to avoid recomputing reflection vector CSE 681

Some of the Options Ambient term wavelength dependent Each light contributes to ambient light: ambienti Light has different diffuse and specular intensities Calculate Light reflection vector instead of Eye reflection vector Use bisecting vector between L and E, compare to N for specular (see next slide) Reflection coefficients wavelength dependent (separate r, g, b values) Light color affects diffuse color CSE 681

Specular Alternative specular calculation N H - bisects angle made by L and E H L a Compare H to N (cosine of angle) E q/2 = a H = (E+L)/|E+L| CSE 681