Illumination Models. Introduction 1 Illumination model: Given a point on a surface, what is the perceived color and intensity? Known as Lighting Model,

Slides:



Advertisements
Similar presentations
SI31 Advanced Computer Graphics AGR
Advertisements

2IV60 Computer graphics set 8: Illumination Models and Surface-Rendering Methods Jack van Wijk TU/e.
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.
1 Computer Graphics By : Mohammed abu Lamdy ITGD3107 University of Palestine Supervision: Assistant Professor Dr. Sana’a Wafa Al-Sayegh.
Illumination and Shading
Osvetljevanje in senčenje (lighting - shading)
Based on slides created by Edward Angel
Illumination Model & Surface-rendering Method 박 경 와.
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 III Week.
IMGD 1001: Illumination by Mark Claypool
Lighting and Shading Wen-Chieh (Steve) Lin
(conventional Cartesian reference system)
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.
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.
©Larry F. Hodges (modified by Amos Johnson) 1 Shading Models.
Coordinate Systems X Y Z (conventional Cartesian reference system) X Y Z.
University of British Columbia CPSC 414 Computer Graphics © Tamara Munzner 1 Shading Week 5, Wed 1 Oct 2003 recap: lighting shading.
Shading, Surfaces & Textures
Illumination and Shading
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Shading I Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
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.
Shading (introduction to rendering). Rendering  We know how to specify the geometry but how is the color calculated.
COMPUTER GRAPHICS CS 482 – FALL 2014 AUGUST 27, 2014 FIXED-FUNCTION 3D GRAPHICS MESH SPECIFICATION LIGHTING SPECIFICATION REFLECTION SHADING HIERARCHICAL.
CSC418 Computer Graphics n Illumination n Lights n Lightinging models.
Rendering Overview CSE 3541 Matt Boggus. Rendering Algorithmically generating a 2D image from 3D models Raster graphics.
CS 325 Introduction to Computer Graphics 03 / 26 / 2010 Instructor: Michael Eckmann.
University of Texas at Austin CS 378 – Game Technology Don Fussell CS 378: Computer Game Technology Basic Rendering Pipeline and Shading Spring 2012.
CSE 381 – Advanced Game Programming GLSL Lighting.
Illumination.
Illumination and Shading
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
CS 325 Introduction to Computer Graphics 03 / 29 / 2010 Instructor: Michael Eckmann.
CS 445 / 645 Introduction to Computer Graphics Lecture 15 Shading Shading.
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
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.
Render methods. Contents Levels of rendering Wireframe Plain shadow Gouraud Phong Comparison Gouraud-Phong.
Illumination and Shading Sang Il Park Sejong University.
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
David Luebke3/16/2016 CS 551 / 645: Introductory Computer Graphics David Luebke
Computer Graphics Lecture 25 Fasih ur Rehman. Last Class Shading.
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.
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.
Chapter 14 Shading Models.
CSC461: Lecture 23 Shading Computation
Illumination and Shading
Fundamentals of Computer Graphics Part 6 Shading
Illumination and Shading
Chapter 14 Shading Models.
Illumination Model 고려대학교 컴퓨터 그래픽스 연구실.
Illumination Model 고려대학교 컴퓨터 그래픽스 연구실.
CS 480/680 Computer Graphics Shading.
Presentation transcript:

Illumination Models

Introduction 1 Illumination model: Given a point on a surface, what is the perceived color and intensity? Known as Lighting Model, or Shading Model Surface rendering: Apply the Illumination model to color all pixels of the surface.

Introduction 2 Example: Illumination model gives color vertices, Surface is displayed via interpolation of these colors.

Introduction 3 Illumination: Physics: –Material properties, light sources, relative positions, properties medium Psychology: –Perception, what do we see –Color! Often approximating models

Light sources 1 Light source: object that radiates energy. Sun, lamp, globe, sky… Intensity I = (I red, I green, I blue ) If I red = I green = I blue : white light

Light sources 2 Simple model: point light source -position P and intensity I -Light rays along straight lines -Good approximation for small light sources

Light sources 3 Simpler yet: point light source at infinity -Direction V and intensity I -Sunlight V

Light sources 4 Damping: intensity of light decreases with distance Energy is distributed over area sphere, hence I l = I / d 2, with d distance to light source. In practice often too ‘agressive’, hence I l = I / (a 0 +a 1 d+a 2 d 2 ) If light source at infinity: No damping with distance d

Light sources 5 Directed light source, spotlight: Light is primarily send in direction of V light. P Q ll light cone  V light

Light sources 6 More subtle: Let I decrease with increasing angle  P Q ll light cone  V light

Surface illumination 1 When light hits a surface, three things can happen: reflection transmission absorption

Surface illumination 2 Suppose, a light source radiates white light, consisting of red, green and blue light. reflection transmission absorption If only red light is reflected, then we see a red surface.

Surface illumination 3 Diffuse reflection: Light is uniformly reflected in all directions Specular reflection: Light is stronger reflected in one direction. specular reflection diffuse reflection

Surface illumination 4 Ambient light: light from the environment. Undirected light, models reflected light of other objects.

Basic illumination model 1 Basic illumination model: Ambient light; Point light sources; Ambient reflection; Diffuse reflection; Specular reflection.

Basic illumination model 2 Ambient light: environment light. Undirected light, models reflected light of other objects.

Basic illumination model 3 Perfect diffuse reflector: light is reflected uniformly in all directions. dA/cos   dA

Basic illumination model 4 Perfect diffuse reflector: light is reflected uniformly in all directions.. N L  dA/cos   dA Lambert’s law: Reflected energy is proportional with cos , where  denotes the angle between the normal N and a vector to the light source L.

Basic illumination model 5 Perfect diffuse reflector: light is reflected uniformly in all directions. N L IlIl P surf P source

Basic illumination model 6 Perfect specular reflector: light is only reflected in one direction. Angle of incidence is angle of reflection. N L R  

Basic illumination model 7 Imperfect specular reflector: light is distributed in the direction of the angle of reflection, dependent on the roughness of the surface. N L R N L R gladruw    

Basic illumination model 8 Phong model: empirical model for specular reflection N  L  R V 

Basic illumination model 9 Phong model: empirical model for specular reflection N  L  R V 

Basic illumination model 10 Phong model: calculating the vectors N L R L N.L V

Basic illumination model 11 N L  R V  H Phong model: variant with halfway vector H. Use  instead of  If light source and viewer far away: H  constant.

Basic illumination model 12 All together:

Color (reprise): Light intensity I and reflection coefficients k: (r,g,b) triplets So for instance: Plastic: k d is colored (r,g,b), k s is grey (w,w,w) Metal: k d and k s same color Basic model: simple but effective. It can be done much better though… Basic illumination model 13

Transparancy 1 Transparant object: -reflected and transmitted light -refraction -scattering

Transparancy 2 Snell’s law of refraction: N ii L R T ii rr

Transparancy 3 Thin surface: -double refraction -shift of light ray

Transparancy 3 Very thin surface: -Discard shift Poor result for silhouette edges…

Atmospheric effects 1 Atmospheric effects: -dust, smoke, vapor -colors are dimmed -objects less well visible

Atmospheric effects 2 = [ 1  0.25 ]

Rendering polygons 1 Basic illumination model: Can be used per point, but that’s somewhat expensive More efficient: Illumination model gives color for some points; Surface is filled in using interpolation of these colors.

Rendering polygons 2 Constant-intensity rendering aka flat surface rendering: Determine color for center of polygon; Fill the polygon with a constant color. Ok if: Object consists of planar faces, and Light sources are far away, and Eye point is far away, or Polygons are about a pixel in size.

Rendering polygons 2 Constant-intensity rendering aka flat surface rendering: Determine color for center of polygon; Fill the polygon with a constant color. Highlights not visible, Facetted appearance, increased by Mach banding effect.

Human perception: edges are given emphasis, contrast is increased near edges. Mach banding Angel (2000)

Rendering polygons 2 Gouraud surface rendering: Determine average normal on vertices; Determine color for vertices; Interpolate the colors per polygon (incrementally). N1N1 N2N2 N3N3 N4N4 V

Rendering polygons 3 Gouraud surface rendering: Much better result for curved surfaces Errors near highlights Linear interpolation still gives Mach banding Silhouettes are still not smooth GouraudFlat

Rendering polygons 4 Phong surface rendering: Determine average normal per vertex; Interpolate normals per polygon (incrementally); Calculate color per pixel. Fast Phong surface rendering: Like Phong surface rendering, but use 2 nd order approximation of color over polygon:

Rendering polygons 5 Phong surface rendering: Even better result for curved surfaces No errors at high lights No Mach banding Silhouettes remain coarse More expensive than flat or Gouraud shading

Rendering polygons 5 Gouraud Flat Phong