# Computer Graphics (CS 543) Lecture 7b: Intro to lighting, Shading and Materials + Phong Lighting Model

Size: px
Start display at page:

Download "Computer Graphics (CS 543) Lecture 7b: Intro to lighting, Shading and Materials + Phong Lighting Model"

## Transcription

1 Computer Graphics (CS 543) Lecture 7b: Intro to lighting, Shading and Materials + Phong Lighting Model Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI)

2 Why do we need Lighting & shading? Has visual cues for humans (shape, light position, viewer position, surface orientation, material properties, etc) Sphere without lighting & shading Sphere with lighting & shading

3 What Causes Shading? Shading caused by different angles with light, camera at different points

4 Lighting? Problem: Calculate surface color based on angle of surface with light, viewer Programmer writes vertex shader code to calculate lighting at vertices! Equation for lighting calculation = lighting model 3. Interaction between lights and objects 1. Light attributes: intensity, color, position, direction, shape 2. Surface attributes color, reflectivity, transparency, etc

5 Shading? After triangle is rasterized (converted to pixels) Per-vertex lighting calculation means color at vertices is accurate, known (red dots) Shading: Graphics hardware figures out color of interior pixels (blue dots) How? Assume linear change => interpolate Lighting (calc at vertices in vertex shader) Rasterization Find pixels belonging to each object Shading (done in hardware during rasterization)

6 Global Illumination (Lighting) Model Global illumination: model interaction of light from all surfaces in scene (track multiple bounces) shadow translucent surface multiple reflection

7 Rendering Equation The infinite reflection, scattering and absorption of light is described by the rendering equation Includes many effects (Reflection, Shadows, etc) Mathematical basis for all global illumination algorithms L o Le Lo is outgoing radiance Li incident radiance Le emitted radiance, ( x, fr( x,, ) Li( x, )( n) d fr is bidirectional reflectance distribution function (BRDF) Fraction of incident light reflected by a surface Li fr Le Lo

8 Local Illumination (Lighting) Model One bounce! Doesn t track inter-reflections, transmissions q Global Illumination (GI) is accurate, looks real But raster graphics pipeline (e.g. OpenGL) renders each polygon independently (local rendering), no GI

9 Light Sources General light sources are difficult to model (e.g. light bulb) Why? We must compute effect of light coming from all points on light source

10 Light Sources Abstractions We generally use simpler light sources Abstractions that are easier to model Point light Directional light Light intensity can be independent or dependent of the distance between object and the light source Spot light Area light

11 Light-Material Interaction Light strikes object, some absorbed, some reflected Fraction reflected determines object color and brightness Example: A surface looks red under white light because red component of light is reflected, other wavelengths absorbed

12 Phong Model Simple lighting model that can be computed quickly 3 components Diffuse Specular Ambient Compute each component separately Vertex Illumination = ambient + diffuse + specular Materials reflect each component differently

13 Phong Model Compute lighting (components) at each vertex (P) Uses 4 vectors, from vertex To light source (l) To viewer (v) Normal (n) Mirror direction (r)

14 Mirror Direction? Angle of reflection = angle of incidence Normal is determined by surface orientation r = 2 (l n ) n - l

15 Surface Roughness Smooth surfaces: more reflected light concentrated in mirror direction Rough surfaces: reflects light in all directions smooth surface rough surface

16 Diffuse Lighting Example

17 Diffuse Light Calculation How much light received from light source? Based on Lambert s Law Receive more light Receive less light

18 Diffuse Light Reflected Illumination surface received from light source, reflected equally in all directions Eye position does not matter

19 Diffuse Light Calculation light vector (from object to light) q N : surface normal Lambert s law: radiant energy D a small surface patch receives from a light source is: I: light intensity D = I x k D cos (q) q: angle between light vector and surface normal k D : Diffuse reflection coefficient. Controls how much diffuse light surface reflects

20 Specular light example Specular? Bright spot on object

21 Specular light contribution Incoming light reflected out in small surface area Specular depends on viewer position relative to mirror direction Specular bright in mirror direction Drops off away from mirror direction specular highlight Mirror direction: lots of specular Away from mirror direction A little specular

22 Specular light calculation is deviation of view angle from mirror direction Small = more specular incoming intensity q Mirror direction I s = k s I cos a p reflected intensity shininess coef Absorption coef

23 The Shininess Coefficient, a a controls falloff sharpness High a sharper falloff = small, bright highlight Low a slow falloff = large, dull highlight a between 100 and 200 = metals a between 5 and 10 = plastic look cos a

24 Specular light: Effect of α I s = k s I cos a α = 10 α = 90 α = 30 α = 270

25 Ambient Light Contribution Very simple approximation of global illumination (Lump 2 nd, 3 rd, 4 th,. etc bounce into single term) Assume to be a constant No direction! Independent of light position, object orientation, observer s position or orientation object 4 object 3 object 2 object 1 Ambient = Ia x Ka constant

26 Ambient Light Example Ambient: background light, scattered by environment

27 Light Attentuation with Distance Light reaching a surface inversely proportional to square of distance d We can multiply by factor of form 1/(ad + bd +cd 2 ) to diffuse and specular terms

28 Adding up the Components Adding all components (no attentuation term), phong model for each light source can be written as diffuse + specular + ambient I = k d I d cosq + k s I s cos a + k a I a = k d I d (l n) + k s I s (v r ) a + k a I a Note: cosq = l n cos = v r q

29 Separate RGB Components Can separate red, green and blue components. Instead of: I = k d I d (l n) + k s I s (v r ) a + k a I a We computing lighting for RGB colors separately I r = k dr I dr l n + k sr I sr (v r ) a + k ar I ar I g = k dg I dg l n + k sg I sg (v r ) a + k ag I ag I b = k db I db l n + k sb I sb (v r ) a + k ab I ab Red Green Blue Above equation is just for one light source!! For N lights, repeat calculation for each light Total illumination for a point P = S (Lighting for all lights)

30 Coefficients for Real Materials Material Ambient Kar, Kag,kab Diffuse Kdr, Kdg,kdb Specular Ksr, Ksg,ksb Exponent, a Black plastic Brass Polished Silver Figure 8.17, Hill, courtesy of McReynolds and Blythe

31 Modified Phong Model I = k d I d l n + k s I s (v r ) a + k a I a I = k d I d l n + k s I s (n h ) b + k a I a Blinn proposed using halfway vector, more efficient h is normalized vector halfway between l and v Similar results as original Phong Used in OpenGL h = ( l + v )/ l + v

32 References Interactive Computer Graphics (6 th edition), Angel and Shreiner Computer Graphics using OpenGL (3 rd edition), Hill and Kelley

### Computer Graphics (CS 4731) Lecture 16: Lighting, Shading and Materials (Part 1)

Computer Graphics (CS 4731) Lecture 16: Lighting, Shading and Materials (Part 1) Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) Why do we need Lighting & shading? Sphere

### Comp 410/510 Computer Graphics. Spring Shading

Comp 410/510 Computer Graphics Spring 2017 Shading Why we need shading Suppose we build a model of a sphere using many polygons and then color it using a fixed color. We get something like But we rather

Illumination & Shading Goals Introduce the types of light-material interactions Build a simple reflection model---the Phong model--- that can be used with real time graphics hardware Why we need Illumination

### WHY WE NEED SHADING. Suppose we build a model of a sphere using many polygons and color it with glcolor. We get something like.

LIGHTING 1 OUTLINE Learn to light/shade objects so their images appear three-dimensional Introduce the types of light-material interactions Build a simple reflection model---the Phong model--- that can

CS 543: Computer Graphics Illumination & Shading I Robert W. Lindeman Associate Professor Interactive Media & Game Development Department of Computer Science Worcester Polytechnic Institute gogo@wpi.edu

Shading Why we need shading Objectives Learn to shade objects so their images appear three-dimensional Suppose we build a model of a sphere using many polygons and color it with glcolor. We get something

### Introduction to Computer Graphics 7. Shading

Introduction to Computer Graphics 7. Shading National Chiao Tung Univ, Taiwan By: I-Chen Lin, Assistant Professor Textbook: Hearn and Baker, Computer Graphics, 3rd Ed., Prentice Hall Ref: E.Angel, Interactive

### Lecture 15: Shading-I. CITS3003 Graphics & Animation

Lecture 15: Shading-I CITS3003 Graphics & Animation E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 2012 Objectives Learn that with appropriate shading so objects appear as threedimensional

### Shading I Computer Graphics I, Fall 2008

Shading I 1 Objectives Learn to shade objects ==> images appear threedimensional Introduce types of light-material interactions Build simple reflection model Phong model Can be used with real time graphics

Computergrafik Thomas Buchberger, Matthias Zwicker Universität Bern Herbst 2008 Today Introduction Local shading models Light sources strategies Compute interaction of light with surfaces Requires simulation

### Computer Graphics. Shading. Based on slides by Dianna Xu, Bryn Mawr College

Computer Graphics Shading Based on slides by Dianna Xu, Bryn Mawr College Image Synthesis and Shading Perception of 3D Objects Displays almost always 2 dimensional. Depth cues needed to restore the third

Computergrafik Matthias Zwicker Universität Bern Herbst 2009 Today Introduction Local shading models Light sources strategies Compute interaction of light with surfaces Requires simulation of physics Global

### CS Computer Graphics: Illumination and Shading I

CS 543 - Computer Graphics: Illumination and Shading I by Robert W. Lindeman gogo@wpi.edu (with help from Emmanuel Agu ;-) Illumination and Shading Problem: Model light/surface point interactions to determine

### CS Computer Graphics: Illumination and Shading I

CS 543 - Computer Graphics: Illumination and Shading I by Robert W. Lindeman gogo@wpi.edu (with help from Emmanuel Agu ;-) Illumination and Shading Problem: Model light/surface point interactions to determine

### CSE 167: Introduction to Computer Graphics Lecture #6: Lights. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016

CSE 167: Introduction to Computer Graphics Lecture #6: Lights Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016 Announcements Thursday in class: midterm #1 Closed book Material

### Shading 1: basics Christian Miller CS Fall 2011

Shading 1: basics Christian Miller CS 354 - Fall 2011 Picking colors Shading is finding the right color for a pixel This color depends on several factors: The material of the surface itself The color and

### CS 4600 Fall Utah School of Computing

Lighting CS 4600 Fall 2015 Utah School of Computing Objectives Learn to shade objects so their images appear three-dimensional Introduce the types of light-material interactions Build a simple reflection

### Illumination in Computer Graphics

Illumination in Computer Graphics Ann McNamara Illumination in Computer Graphics Definition of light sources. Analysis of interaction between light and objects in a scene. Rendering images that are faithful

Overview Shading Shading Light-material interactions Phong model Shading polygons Shading in OpenGL Why we need shading Suppose we build a model of a sphere using many polygons and color it with glcolor.

### Objectives. Shading II. Distance Terms. The Phong Reflection Model

Shading II Objectives Introduce distance terms to the shading model. More details about the Phong model (lightmaterial interaction). Introduce the Blinn lighting model (also known as the modified Phong

### Objectives. Introduce Phong model Introduce modified Phong model Consider computation of required vectors Discuss polygonal shading.

Shading II 1 Objectives Introduce Phong model Introduce modified Phong model Consider computation of required vectors Discuss polygonal shading Flat Smooth Gouraud 2 Phong Lighting Model A simple model

Why we need shading? Suppose we build a model of a sphere using many polygons and color it with glcolor. We get something like But we want Light-material interactions cause each point to have a different

### CS130 : Computer Graphics Lecture 8: Lighting and Shading. Tamar Shinar Computer Science & Engineering UC Riverside

CS130 : Computer Graphics Lecture 8: Lighting and Shading Tamar Shinar Computer Science & Engineering UC Riverside Why we need shading Suppose we build a model of a sphere using many polygons and color

### Objectives. Continue discussion of shading Introduce modified Phong model Consider computation of required vectors

Objectives Continue discussion of shading Introduce modified Phong model Consider computation of required vectors 1 Lambertian Surface Perfectly diffuse reflector Light scattered equally in all directions

### Three-Dimensional Graphics V. Guoying Zhao 1 / 55

Computer Graphics Three-Dimensional Graphics V Guoying Zhao 1 / 55 Shading Guoying Zhao 2 / 55 Objectives Learn to shade objects so their images appear three-dimensional Introduce the types of light-material

Illumination and Shading Illumination (Lighting)! Model the interaction of light with surface points to determine their final color and brightness! The illumination can be computed either at vertices or

### CSE 167: Lecture #7: Color and Shading. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

CSE 167: Introduction to Computer Graphics Lecture #7: Color and Shading Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011 Announcements Homework project #3 due this Friday,

### Lighting and Shading. Slides: Tamar Shinar, Victor Zordon

Lighting and Shading Slides: Tamar Shinar, Victor Zordon Why we need shading Suppose we build a model of a sphere using many polygons and color each the same color. We get something like But we want 2

### Shading II. Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico

Shading II Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico 1 Objectives Continue discussion of shading Introduce modified Phong model

Shading w Foley, Section16.1 Reading Introduction So far, we ve talked exclusively about geometry. w What is the shape of an object? w How do I place it in a virtual 3D space? w How do I know which pixels

### Introduction. Lighting model Light reflection model Local illumination model Reflectance model BRDF

Shading Introduction Affine transformations help us to place objects into a scene. Before creating images of these objects, we ll look at models for how light interacts with their surfaces. Such a model

### CS452/552; EE465/505. Intro to Lighting

CS452/552; EE465/505 Intro to Lighting 2-10 15 Outline! Projection Normalization! Introduction to Lighting (and Shading) Read: Angel Chapter 5., sections 5.4-5.7 Parallel Projections Chapter 6, sections

### CPSC 314 LIGHTING AND SHADING

CPSC 314 LIGHTING AND SHADING UGRAD.CS.UBC.CA/~CS314 slide credits: Mikhail Bessmeltsev et al 1 THE RENDERING PIPELINE Vertices and attributes Vertex Shader Modelview transform Per-vertex attributes Vertex

### Shading II. CITS3003 Graphics & Animation

Shading II CITS3003 Graphics & Animation Objectives Introduce distance terms to the shading model. More details about the Phong model (lightmaterial interaction). Introduce the Blinn lighting model (also

### ECS 175 COMPUTER GRAPHICS. Ken Joy.! Winter 2014

ECS 175 COMPUTER GRAPHICS Ken Joy Winter 2014 Shading To be able to model shading, we simplify Uniform Media no scattering of light Opaque Objects No Interreflection Point Light Sources RGB Color (eliminating

### CS Illumination and Shading. Slide 1

CS 112 - Illumination and Shading Slide 1 Illumination/Lighting Interaction between light and surfaces Physics of optics and thermal radiation Very complex: Light bounces off several surface before reaching

### CS5620 Intro to Computer Graphics

So Far wireframe hidden surfaces Next step 1 2 Light! Need to understand: How lighting works Types of lights Types of surfaces How shading works Shading algorithms What s Missing? Lighting vs. Shading

Reflection and Shading R. J. Renka Department of Computer Science & Engineering University of North Texas 10/19/2015 Light Sources Realistic rendering requires that we model the interaction between light

Lessons Learned from HW Shading CS Interactive Computer Graphics Prof. David E. Breen Department of Computer Science Only have an idle() function if something is animated Set idle function to NULL, when

### Introduction to Computer Graphics. Farhana Bandukwala, PhD Lecture 14: Light Interacting with Surfaces

Introduction to Computer Graphics Farhana Bandukwala, PhD Lecture 14: Light Interacting with Surfaces Outline Computational tools Reflection models Polygon shading Computation tools Surface normals Vector

### Reading. Shading. An abundance of photons. Introduction. Required: Angel , 6.5, Optional: Angel 6.4 OpenGL red book, chapter 5.

Reading Required: Angel 6.1-6.3, 6.5, 6.7-6.8 Optional: Shading Angel 6.4 OpenGL red book, chapter 5. 1 2 Introduction An abundance of photons So far, we ve talked exclusively about geometry. Properly

### Computer Graphics (CS 543) Lecture 8 (Part 1): Physically-Based Lighting Models

Computer Graphics (CS 543) Lecture 8 (Part 1): Physically-Based Lighting Models Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) BRDF Evolution BRDFs have evolved historically

### C O M P U T E R G R A P H I C S. Computer Graphics. Three-Dimensional Graphics V. Guoying Zhao 1 / 65

Computer Graphics Three-Dimensional Graphics V Guoying Zhao 1 / 65 Shading Guoying Zhao 2 / 65 Objectives Learn to shade objects so their images appear three-dimensional Introduce the types of light-material

### Shading. Brian Curless CSE 557 Autumn 2017

Shading Brian Curless CSE 557 Autumn 2017 1 Reading Optional: Angel and Shreiner: chapter 5. Marschner and Shirley: chapter 10, chapter 17. Further reading: OpenGL red book, chapter 5. 2 Basic 3D graphics

### Shading. Brian Curless CSE 457 Spring 2017

Shading Brian Curless CSE 457 Spring 2017 1 Reading Optional: Angel and Shreiner: chapter 5. Marschner and Shirley: chapter 10, chapter 17. Further reading: OpenGL red book, chapter 5. 2 Basic 3D graphics

### CS 5625 Lec 2: Shading Models

CS 5625 Lec 2: Shading Models Kavita Bala Spring 2013 Shading Models Chapter 7 Next few weeks Textures Graphics Pipeline Light Emission To compute images What are the light sources? Light Propagation Fog/Clear?

### Visualisatie BMT. Rendering. Arjan Kok

Visualisatie BMT Rendering Arjan Kok a.j.f.kok@tue.nl 1 Lecture overview Color Rendering Illumination 2 Visualization pipeline Raw Data Data Enrichment/Enhancement Derived Data Visualization Mapping Abstract

### Simple Lighting/Illumination Models

Simple Lighting/Illumination Models Scene rendered using direct lighting only Photograph Scene rendered using a physically-based global illumination model with manual tuning of colors (Frederic Drago and

Illumination Models & Shading Lighting vs. Shading Lighting Interaction between materials and light sources Physics Shading Determining the color of a pixel Computer Graphics ZBuffer(Scene) PutColor(x,y,Col(P));

### Today we will start to look at illumination models in computer graphics

1 llumination Today we will start to look at illumination models in computer graphics Why do we need illumination models? Different kinds lights Different kinds reflections Basic lighting model 2 Why Lighting?

### Rendering. Illumination Model. Wireframe rendering simple, ambiguous Color filling flat without any 3D information

llumination Model Wireframe rendering simple, ambiguous Color filling flat without any 3D information Requires modeling interaction of light with the object/surface to have a different color (shade in

### Computer Graphics. Illumination and Shading

Rendering Pipeline modelling of geometry transformation into world coordinates placement of cameras and light sources transformation into camera coordinates backface culling projection clipping w.r.t.

### Illumination & Shading: Part 1

Illumination & Shading: Part 1 Light Sources Empirical Illumination Shading Local vs Global Illumination Lecture 10 Comp 236 Spring 2005 Computer Graphics Jargon: Illumination Models Illumination - the

### CS230 : Computer Graphics Lighting and Shading. Tamar Shinar Computer Science & Engineering UC Riverside

CS230 : Computer Graphics Lighting and Shading Tamar Shinar Computer Science & Engineering UC Riverside General light source Illumination function: [Angel and Shreiner] integrate contributions from all

### Local Illumination. CMPT 361 Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller

Local Illumination CMPT 361 Introduction to Computer Graphics Torsten Möller Graphics Pipeline Hardware Modelling Transform Visibility Illumination + Shading Perception, Interaction Color Texture/ Realism

### CSE 167: Introduction to Computer Graphics Lecture #6: Colors. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013

CSE 167: Introduction to Computer Graphics Lecture #6: Colors Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013 Announcements Homework project #3 due this Friday, October 18

### Topic 9: Lighting & Reflection models 9/10/2016. Spot the differences. Terminology. Two Components of Illumination. Ambient Light Source

Topic 9: Lighting & Reflection models Lighting & reflection The Phong reflection model diffuse component ambient component specular component Spot the differences Terminology Illumination The transport

### Topic 9: Lighting & Reflection models. Lighting & reflection The Phong reflection model diffuse component ambient component specular component

Topic 9: Lighting & Reflection models Lighting & reflection The Phong reflection model diffuse component ambient component specular component Spot the differences Terminology Illumination The transport

### OpenGl Pipeline. triangles, lines, points, images. Per-vertex ops. Primitive assembly. Texturing. Rasterization. Per-fragment ops.

OpenGl Pipeline Individual Vertices Transformed Vertices Commands Processor Per-vertex ops Primitive assembly triangles, lines, points, images Primitives Fragments Rasterization Texturing Per-fragment

### CPSC / Illumination and Shading

CPSC 599.64 / 601.64 Rendering Pipeline usually in one step modelling of geometry transformation into world coordinate system placement of cameras and light sources transformation into camera coordinate

### Raytracing. COSC 4328/5327 Scott A. King

Raytracing COSC 4328/5327 Scott A. King Basic Ray Casting Method pixels in screen Shoot ray p from the eye through the pixel. Find closest ray-object intersection. Get color at intersection Basic Ray Casting

### Lighting Models. CS116B Chris Pollett Mar 21, 2004.

Lighting Models CS116B Chris Pollett Mar 21, 2004. Outline Overview Light Sources Surface Lighting Effect Basic Illumination Models Overview An illumination model (lighting model) is used to calculate

### Color and Light. CSCI 4229/5229 Computer Graphics Summer 2008

Color and Light CSCI 4229/5229 Computer Graphics Summer 2008 Solar Spectrum Human Trichromatic Color Perception Are A and B the same? Color perception is relative Transmission,Absorption&Reflection Light

### Rendering: Reality. Eye acts as pinhole camera. Photons from light hit objects

Basic Ray Tracing Rendering: Reality Eye acts as pinhole camera Photons from light hit objects Rendering: Reality Eye acts as pinhole camera Photons from light hit objects Rendering: Reality Eye acts as

### Computer Graphics. Illumination Models and Surface-Rendering Methods. Somsak Walairacht, Computer Engineering, KMITL

Computer Graphics Chapter 10 llumination Models and Surface-Rendering Methods Somsak Walairacht, Computer Engineering, KMTL Outline Light Sources Surface Lighting Effects Basic llumination Models Polygon

### Computer Graphics. Illumination and Shading

() Illumination and Shading Dr. Ayman Eldeib Lighting So given a 3-D triangle and a 3-D viewpoint, we can set the right pixels But what color should those pixels be? If we re attempting to create a realistic

### Virtual Reality for Human Computer Interaction

Virtual Reality for Human Computer Interaction Appearance: Lighting Representation of Light and Color Do we need to represent all I! to represent a color C(I)? No we can approximate using a three-color

### Shading. Reading. Pinhole camera. Basic 3D graphics. Brian Curless CSE 557 Fall Required: Shirley, Chapter 10

Reading Required: Shirley, Chapter 10 Shading Brian Curless CSE 557 Fall 2014 1 2 Basic 3D graphics With affine matrices, we can now transform virtual 3D objects in their local coordinate systems into

### Lighting and Materials

http://graphics.ucsd.edu/~henrik/images/global.html Lighting and Materials Introduction The goal of any graphics rendering app is to simulate light Trying to convince the viewer they are seeing the real

### Reading. Shading. Introduction. An abundance of photons. Required: Angel , Optional: OpenGL red book, chapter 5.

Reading Required: Angel 6.1-6.5, 6.7-6.8 Optional: Shading OpenGL red book, chapter 5. 1 2 Introduction So far, we ve talked exclusively about geometry. What is the shape of an obect? How do I place it

### Today s class. Simple shadows Shading Lighting in OpenGL. Informationsteknologi. Wednesday, November 21, 2007 Computer Graphics - Class 10 1

Today s class Simple shadows Shading Lighting in OpenGL Wednesday, November 21, 27 Computer Graphics - Class 1 1 Simple shadows Simple shadows can be gotten by using projection matrices Consider a light

### Orthogonal Projection Matrices. Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 2015

Orthogonal Projection Matrices 1 Objectives Derive the projection matrices used for standard orthogonal projections Introduce oblique projections Introduce projection normalization 2 Normalization Rather

### Lighting and Shading Computer Graphics I Lecture 7. Light Sources Phong Illumination Model Normal Vectors [Angel, Ch

15-462 Computer Graphics I Lecture 7 Lighting and Shading February 12, 2002 Frank Pfenning Carnegie Mellon University http://www.cs.cmu.edu/~fp/courses/graphics/ Light Sources Phong Illumination Model

### Lighting and Shading II. Angel and Shreiner: Interactive Computer Graphics 7E Addison-Wesley 2015

Lighting and Shading II 1 Objectives Continue discussion of shading Introduce modified Phong model Consider computation of required vectors 2 Ambient Light Ambient light is the result of multiple interactions

Shading and Illumination OpenGL Shading Without Shading With Shading Physics Bidirectional Reflectance Distribution Function (BRDF) f r (ω i,ω ) = dl(ω ) L(ω i )cosθ i dω i = dl(ω ) L(ω i )( ω i n)dω

### Graphics and Visualization

International University Bremen Spring Semester 2006 Recap Hierarchical Modeling Perspective vs Parallel Projection Representing solid objects Displaying Wireframe models is easy from a computational

### Chapter 10. Surface-Rendering Methods. Somsak Walairacht, Computer Engineering, KMITL

Computer Graphics Chapter 10 llumination Models and Surface-Rendering Methods Somsak Walairacht, Computer Engineering, KMTL 1 Outline Light Sources Surface Lighting Effects Basic llumination Models Polygon

### CEng 477 Introduction to Computer Graphics Fall

Illumination Models and Surface-Rendering Methods CEng 477 Introduction to Computer Graphics Fall 2007 2008 Illumination Models and Surface Rendering Methods In order to achieve realism in computer generated

### Computer Graphics (CS 543) Lecture 8a: Per-Vertex lighting, Shading and Per-Fragment lighting

Computer Graphics (CS 543) Lecture 8a: Per-Vertex lighting, Shading and Per-Fragment lighting Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) Computation of Vectors To calculate

### CS452/552; EE465/505. Lighting & Shading

CS452/552; EE465/505 Lighting & Shading 2-17 15 Outline! More on Lighting and Shading Read: Angel Chapter 6 Lab2: due tonight use ASDW to move a 2D shape around; 1 to center Local Illumination! Approximate

### Raytracing CS148 AS3. Due :59pm PDT

Raytracing CS148 AS3 Due 2010-07-25 11:59pm PDT We start our exploration of Rendering - the process of converting a high-level object-based description of scene into an image. We will do this by building

### Interactive Real-Time Raycasting

Interactive Real-Time Raycasting CS184 AS4 Due 2009-02-26 11:00pm We start our exploration of Rendering - the process of converting a high-level object-based description into a graphical image for display.

### Color and Light CSCI 4229/5229 Computer Graphics Fall 2016

Color and Light CSCI 4229/5229 Computer Graphics Fall 2016 Solar Spectrum Human Trichromatic Color Perception Color Blindness Present to some degree in 8% of males and about 0.5% of females due to mutation

### Illumination. The slides combine material from Andy van Dam, Spike Hughes, Travis Webb and Lyn Fong

INTRODUCTION TO COMPUTER GRAPHIC S Illumination The slides combine material from Andy van Dam, Spike Hughes, Travis Webb and Lyn Fong Andries van Dam October 29, 2009 Illumination Models 1/30 Outline Physical

### Lecture 17: Shading in OpenGL. CITS3003 Graphics & Animation

Lecture 17: Shading in OpenGL CITS3003 Graphics & Animation E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 2012 Objectives Introduce the OpenGL shading methods - per vertex shading

### Introduction Rasterization Z-buffering Shading. Graphics 2012/2013, 4th quarter. Lecture 09: graphics pipeline (rasterization and shading)

Lecture 9 Graphics pipeline (rasterization and shading) Graphics pipeline - part 1 (recap) Perspective projection by matrix multiplication: x pixel y pixel z canonical 1 x = M vpm per M cam y z 1 This

### CS Computer Graphics: Ray Tracing Detail, Part 3

CS 543 - Computer Graphics: Ray Tracing Detail, Part 3 by Robert W. Lindeman gogo@wpi.edu (with help from Emmanuel Agu ;-) hit( ) Function for Sphere Recall that for generic sphere, there are two hit times,

### CENG 477 Introduction to Computer Graphics. Ray Tracing: Shading

CENG 477 Introduction to Computer Graphics Ray Tracing: Shading Last Week Until now we learned: How to create the primary rays from the given camera and image plane parameters How to intersect these rays

### Shading. CSE 457 Winter 2015

Shading CSE 457 Winter 2015 Reading Required: Angel chapter 5. Optional: OpenGL red book, chapter 5. 2 Basic 3D graphics With affine matrices, we can now transform virtual 3D objects in their local coordinate

### Sung-Eui Yoon ( 윤성의 )

CS380: Computer Graphics Illumination and Shading Sung-Eui Yoon ( 윤성의 ) Course URL: http://sglab.kaist.ac.kr/~sungeui/cg/ Course Objectives (Ch. 10) Know how to consider lights during rendering models

### CSE 681 Illumination and Phong Shading

CSE 681 Illumination and Phong Shading Physics tells us What is Light? We don t see objects, we see light reflected off of objects Light is a particle and a wave The frequency of light What is Color? Our

### CS Computer Graphics: Ray Tracing Detail, Part 3

CS 543 - Computer Graphics: Ray Tracing Detail, Part 3 by Robert W. Lindeman gogo@wpi.edu (with help from Emmanuel Agu ;-) hit( ) Function for Sphere Recall that for generic sphere, there are two hit times,

### CS6670: Computer Vision

CS6670: Computer Vision Noah Snavely Lecture 21: Light, reflectance and photometric stereo Announcements Final projects Midterm reports due November 24 (next Tuesday) by 11:59pm (upload to CMS) State the

Illumination and Shading Illumination and Shading z Illumination Models y Ambient y Diffuse y Attenuation y Specular Reflection z Interpolated Shading Models y Flat, Gouraud, Phong y Problems CS4451: Fall

### Illumination. Michael Kazhdan ( /657) HB Ch. 14.1, 14.2 FvDFH 16.1, 16.2

Illumination Michael Kazhdan (601.457/657) HB Ch. 14.1, 14.2 FvDFH 16.1, 16.2 Ray Casting Image RayCast(Camera camera, Scene scene, int width, int height) { Image image = new Image(width, height); for

### Shading. Brian Curless CSE 457 Spring 2015

Shading Brian Curless CSE 457 Spring 2015 1 Reading Required: Angel chapter 5. Optional: OpenGL red book, chapter 5. 2 Basic 3D graphics With affine matrices, we can now transform virtual 3D objects in

### Lighting. Figure 10.1

We have learned to build three-dimensional graphical models and to display them. However, if you render one of our models, you might be disappointed to see images that look flat and thus fail to show the