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

Size: px
Start display at page:

## Transcription

1 Lecture 15: Shading-I CITS3003 Graphics & Animation E. Angel and D. Shreiner: Interactive Computer Graphics 6E Addison-Wesley 2012

2 Objectives Learn that with appropriate shading so objects appear as threedimensional in the rendered image. Introduce the types of light-material interactions global vs local. Understand some light sources and how to represent them. Introduce the Phong shading model that can be used with real time graphics hardware. Understand different surface types. 2

3 3D Perception How do we perceive objects as 3D? Stereo vision is one reason but we can still perceive 3D even we look with one eye. Hidden surface removal gives us depth perception. Shading is another way how we perceive 3D objects. 3

4 What is Shading? Light reflection from 3D objects is a function of material properties (colour) as well as the shape of the object. We will study how objects and light interacts that results in a shaded image of the object We will then study how shading is achieved in a graphics pipeline in a way that is - Efficient - Suits the pipeline architecture 4

5 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 5

6 Shading Why does the image of a real sphere look like Light-material interactions cause each point to have a different color or shade Need to consider - Light sources - Material properties - Location of viewer - Surface orientation 6

7 Scattering Light strikes object A - Some scattered. - Some absorbed. Some of scattered light strikes object B - Some scattered. - Some absorbed. Some of this scattered light strikes A and so on. 7

8 Rendering Equation The infinite scattering and absorption of light can be described by the rendering equation - Which cannot be solved in general - Ray tracing is a special case for perfectly reflecting surfaces Rendering equation is global and includes - Shadows - Multiple scatterings from object to object 8

9 Global Effects shadow translucent surface multiple reflection 9

10 Local vs Global Rendering Correct shading requires a global calculation involving all objects and light sources - This is incompatible with pipeline architecture which shades each polygon independently (i.e., local rendering) In computer graphics, especially real time graphics, we are happy if things look right - There exist many techniques for approximating global effects 10

11 Light-Material Interaction Light that strikes an object is partially absorbed and partially scattered (reflected) The amount reflected determines the colour and brightness of the object - A surface appears red under white light because the red component of the light is reflected and the rest is absorbed The reflected light is scattered in a manner that depends on the smoothness and orientation of the surface 11

12 Light Sources General light sources are difficult to work with because we must integrate light coming from all points on the source 12

13 Finite Light Source & Shadows Real light sources have a finite size Parts that do not see the light source at all will be the darkest (inner shadow circle) Parts that see the full light sources will be the brightest (outside the two circles) Parts that see the light source partially will have brightness values in between the two extremes depending on how much of the light source is visible (outer circle excluding the inner circle) umbra penumbra

14 Simple Light Sources A point source - Is the simplest light source. - Is modelled with a position p 0 = (x, y, z, 1) T and an illumination intensity I = I r, I g, I b. - Illuminates equally in all directions. A distance term can be incorporated to attenuate I. A spotlight - Is modelled with a cone whose apex is at p 0, a direction l s, the cone angle θ, and a intensity I = I r, I g, I b. - Is a point source whose emitted light is restricted to a narrow range of angles. - If θ = 180, the spotlight becomes a point source. A distance term can be incorporated to attenuate I. A point source illuminating a surface. 14

15 Light Attenuation with Distance For point light sources, light intensity decreases with the square of the distance i.e. multiply the intensity by 1 d2 (where d is the distance from light source) Point sources are easy to model but they result in harsh (unrealistic) rendering with very sharp drop in brightness and crisp shadows. Hence, the light attenuation is generally modelled by a quadratic 1 term 2 (where a, b, c are user defined parameters) a+bd+cd

16 Simple Light Sources (cont.) A directional light source - Is also known as a distance light source. - Illuminates objects with parallel rays of light. - Is modelled with a direction d = (x, y, z, 0) T and a and intensity I = I r, I g, I b. A distance light source Ambient light - Models the same amount of light everywhere in the scene. The ambient illumination I a = I r, I g, I b is therefore characterized by an intensity that is identical at every point in the scene. - Can also be used to model the integration of multiple sources on a reflecting surface in the scene. 16

17 The Phong Reflection Model The Phong Model: Is a simple model that can be computed rapidly Has three terms - Diffuse term - Specular term - Ambient term Uses the four vectors below to calculate a colour for an arbitrary point p on a surface: - Vector l (to light source) - Vector v (to viewer or camera) - Vector n (Normal vector at p) - Vector r (Perfect reflector of l with respect to n) 17

18 Surface Types For smooth surfaces, the reflected light concentrates more in the direction that is a perfect mirror reflection of the incident light. For rough surfaces, the reflected light scatters in all directions smooth surface rough surface 18

19 Lambertian Surface Perfectly diffuse reflector Light scattered equally in all directions Amount of light reflected is proportional to the vertical component of incoming light - i.e., reflected light ~cos θ i - where cos θ i = l n when vectors l and n are normalized to unit vectors. - There are also three coefficients, k r, k g, k b that show how much of each color component is reflected (these coefficients are specific to the surface, i.e., different types of surfaces have different values). 19

20 Specular Surfaces Whereas a diffuse surface is rough, a specular surface is smooth. Smooth surfaces show specular highlights due to incoming light being reflected in directions concentrated close to the direction of a perfect reflection. Specular highlight shows colour of the light source (rather than of the object) 20

21 Modeling Specular Relections Phong proposed using a term cos α φ that drops off as the angle between the viewer and the ideal reflection increased Each of these terms has a red, green, and blue component. This formula repeats 3 times, one for each component. ~ means proportional to. I ref ~ k s I cos α φ reflected Intensity specular reflectivity coefficient of surface shininess coefficient of material incoming intensity f 21

22 The Shininess Coefficient α Values between 100 and 200 correspond to metals. Values between 5 and 10 give surfaces that look like plastic. The cos α φ function with φ varying from -90 to 90 degrees for different α values φ 22

23 Ambient Light Ambient light is the result of multiple interactions between (large) light sources and the objects in the environment Amount and color depend on both the colour of the light(s) and the material properties of the object Add k a I a to diffuse and specular terms reflection coef of surface (the subscript a is short for ambient ) intensity of ambient light 23

24 Further Reading Interactive Computer Graphics A Top-Down Approach with Shader-Based OpenGL by Edward Angel and Dave Shreiner, 6 th Ed, 2012 Sec Light and Matter Sec Light Sources Sec The Phong Reflection Model 24

### 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

### 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

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

### 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

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

### 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

### 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

### 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

### 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

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.

### 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

### 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

### 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

### 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

### 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

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

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) Why do we need Lighting

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

### 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

### 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

### 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

### 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

### 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

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

### 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

### 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

### 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

### 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

### 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

### 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

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

Objectives Shading in OpenGL Introduce the OpenGL shading methods - per vertex shading vs per fragment shading - Where to carry out Discuss polygonal shading - Flat - Smooth - Gouraud CITS3003 Graphics

### 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

### 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 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));

### 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

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

### 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?

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

### Supplement to Lecture 16

Supplement to Lecture 16 Global Illumination: View Dependent CS 354 Computer Graphics http://www.cs.utexas.edu/~bajaj/ Notes and figures from Ed Angel: Interactive Computer Graphics, 6 th Ed., 2012 Addison

### 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

### 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

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

Computer Graphics Ray Tracing Based on slides by Dianna Xu, Bryn Mawr College Ray Tracing Example Created by Anto Matkovic Ray Tracing Example Ray Tracing Example Ray Tracing Most light rays do not reach

### 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

### 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

### Global Rendering. Ingela Nyström 1. Effects needed for realism. The Rendering Equation. Local vs global rendering. Light-material interaction

Effects needed for realism Global Rendering Computer Graphics 1, Fall 2005 Lecture 7 4th ed.: Ch 6.10, 12.1-12.5 Shadows Reflections (Mirrors) Transparency Interreflections Detail (Textures etc.) Complex

### 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

### 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

### 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

### 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

### 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

### 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

### 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,

### 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

### 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. Shading = find color values at pixels of screen (when rendering a virtual 3D scene).

Light Shading Shading Shading = find color values at pixels of screen (when rendering a virtual 3D scene). Shading Shading = find color values at pixels of screen (when rendering a virtual 3D scene). Same

### 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

### 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

### Shading Intro. Shading & Lighting. Light and Matter. Light and Matter

Shading Intro Shading & Lighting Move from flat to 3-D models Orthographic view of sphere was uniformly color, thus, a flat circle A circular shape with many gradations or shades of color Courtesy of Vincent

### 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

### 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

### 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

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

### 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

### 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

### Assignment #2. (Due date: 11/6/2012)

Computer Vision I CSE 252a, Fall 2012 David Kriegman Assignment #2 (Due date: 11/6/2012) Name: Student ID: Email: Problem 1 [1 pts] Calculate the number of steradians contained in a spherical wedge with

### 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

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

### 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

### CHAPTER5. We have learned to build three-dimensional graphical models and to LIGHTING AND SHADING

LIGHTING AND SHADING CHAPTER5 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

### Problem Set 4 Part 1 CMSC 427 Distributed: Thursday, November 1, 2007 Due: Tuesday, November 20, 2007

Problem Set 4 Part 1 CMSC 427 Distributed: Thursday, November 1, 2007 Due: Tuesday, November 20, 2007 Programming For this assignment you will write a simple ray tracer. It will be written in C++ without

### 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

### 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

### 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

### Turn on the Lights: Reflectance

Turn on the Lights: Reflectance Part 2: Shading Tuesday, October 15 2012 Lecture #14 Goal of Shading Model simple light sources Point light sources Extended light sources Ambient lighting Model lighting

### 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

### 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

### 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

### Introduction to Computer Graphics with WebGL

Introduction to Computer Graphics with WebGL Ed Angel Classical Viewing Computer Graphics with WebGL Ed Angel, 204 Classical Viewing Viewing requires three basic elements - One or more objects - A viewer

### 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.

### 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

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

Illumination and Shading Computer Graphics COMP 770 (236) Spring 2007 Instructor: Brandon Lloyd 2/14/07 1 From last time Texture mapping overview notation wrapping Perspective-correct interpolation Texture

### TSBK 07! Computer Graphics! Ingemar Ragnemalm, ISY

1(84) Information Coding / Computer Graphics, ISY, LiTH TSBK 07 Computer Graphics Ingemar Ragnemalm, ISY 1(84) Lecture 5 3D graphics part 3 Illumination Illumination applied: Shading Surface detail: Mappings

### Local Reflection Models

Local Reflection Models Illumination Thus Far Simple Illumination Models Ambient + Diffuse + Attenuation + Specular Additions Texture, Shadows, Used in global algs! (Ray tracing) Problem: Different materials

### 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

### OpenGL Lighting Computer Graphics Spring Frank Palermo

OpenGL Lighting 15-462 Computer Graphics Spring 2009 Frank Palermo OpenGL is just a bunch of hacks. -Adrien Treuille What Adrien Means... What Adrien means is that OpenGL was designed to produce reasonable-looking

Illumination and Shading Light sources emit intensity: assigns intensity to each wavelength of light Humans perceive as a colour - navy blue, light green, etc. Exeriments show that there are distinct I

### 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

### 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

### 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

### 6. Illumination, Lighting

Jorg s Graphics Lecture Notes 6. Illumination, Lighting 1 6. Illumination, Lighting No ray tracing in OpenGL! ray tracing: direct paths COP interreflection: soft shadows, color bleeding. umbra, penumbra,

### 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

### 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

### University of Victoria CSC 305 Shading. Brian Wyvill 2016

University of Victoria CSC 305 Shading Brian Wyvill 2016 The illuminating Hemisphere Energy and Intensity Energy is the intensity integrated over the solid angle through which it acts. Intensity is not

### CS6670: Computer Vision

CS6670: Computer Vision Noah Snavely Lecture 20: Light, reflectance and photometric stereo Light by Ted Adelson Readings Szeliski, 2.2, 2.3.2 Light by Ted Adelson Readings Szeliski, 2.2, 2.3.2 Properties

1 Illumination Models and Shading Motivation: In order to produce realistic images, we must simulate the appearance of surfaces under various lighting conditions. Illumination Models: Given the illumination

Lighting and Shading Today: Local Illumination Solving the rendering equation is too expensive First do local illumination Then hack in reflections and shadows Local Shading: Notation light intensity in,