# CSE 167: Lecture #8: Lighting. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

Size: px
Start display at page:

Download "CSE 167: Lecture #8: Lighting. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011"

## Transcription

1 CSE 167: Introduction to Computer Graphics Lecture #8: Lighting Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

2 Announcements Homework project #4 due Friday, October 28 Introduction: Oct 24 at 4pm in lab 250 Grading: Oct 28 starting at 1:30pm in lab 260 Late submissions for project #3 accepted until this Friday This Friday, Oct 21: late+early grading starts at 2pm Midterm exam: Thursday, Oct 27, 2-3:20pm in class Midterm tutorial: Tuesday, Oct 25, 3:45pm-5pm, Atkinson Hall, room 4004 We will provide blank index cards 2

4 Light Sources Light sources can have complex properties Geometric area over which light is produced Anisotropy (directionally dependent) Variation in color Reflective surfaces act as light sources (indirect light) Interactive rendering is based on simple, standard light sources 4

5 Light Sources At each point on surfaces we need to know Direction of incoming light (the L vector) Intensity of incoming light (the c l values) Standard light sources in OpenGL Directional: from a specific direction Point light source: from a specific point Spotlight: from a specific point with intensity that depends on the direction 5

6 Directional Light Light from a distant source Light rays are parallel Direction and intensity are the same everywhere As if the source were infinitely far away Good approximation of sunlight Specified by a unit length direction vector, and a color 6 Light source Receiving surface

7 Point Lights Simple model for light bulbs Point that radiates light in all directions equally Light vector varies across the surface Intensity drops off proportionally to the inverse square of the distance from the light Reason for inverse square falloff: Surface area A of sphere: A = 4 π r 2 7

8 Point Lights p c src Light source c l v c l Receiving surface v 8

9 Attenuation Sometimes, it is desirable to modify the inverse square falloff behavior of point lights Common (OpenGL) model for distance attenuation c l = c src k 2 c + k l p v + k q p v Not physically accurate 9

10 Spotlights Like point source, but intensity depends on direction Parameters Position, the location of the source Spot direction, the center axis of the light Falloff parameters Beam width (cone angle) The way the light tapers off at edges of the beam (cosine exponent) 10

11 Spotlights Light source Receiving surface 11

12 Spotlights Photograph of spotlight Spotlights in OpenGL 12

13 Per-Triangle, -Vertex, -Pixel Shading Scene data Shading operations Once per triangle Once per vertex Once per pixel Modeling and viewing transformation Shading Projection Rasterization, visibility 13 Image

15 Per-Vertex Shading Known as Gouraud shading (Henri Gouraud 1971) Interpolate vertex colors across triangles OpenGL default Advantages Fast Smoother than flat shading Disadvantages Problems with small highlights 15

16 Per-Pixel Shading Also known as Phong interpolation (not to be confused with Phong illumination model) Rasterizer interpolates normals across triangles Illumination model evaluated at each pixel Implemented using fragment shaders (later today) Advantages Higher quality than Gouraud shading Disadvantages Much slower 16

17 Gouraud vs. Per-Pixel Shading Gouraud has problems with highlights More triangles would improve result, but impact frame rate Gouraud Per-pixel 17

18 Shading in OpenGL // Somewhere in the initialization part of your // program glenable(gl_lighting); glenable(gl_light0); // Make sure vertex colors are used as material properties glenable(gl_color_material); glcolormaterial(gl_front, GL_DIFFUSE); glcolormaterial(gl_front, GL_SPECULAR); // Create light components Glfloat ambientlight[] = { 0.2f, 0.2f, 0.2f, 1.0f }; Glgloat diffuselight[] = { 0.8f, 0.8f, 0.8, 1.0f }; Glfloat specularlight[] = { 0.5f, 0.5f, 0.5f, 1.0f }; Glfloat position[] = { -1.5f, 1.0f, -4.0f, 1.0f }; // Assign created components to GL_LIGHT0 gllightfv(gl_light0, GL_AMBIENT, ambientlight); gllightfv(gl_light0, GL_DIFFUSE, diffuselight); gllightfv(gl_light0, GL_SPECULAR, specularlight); gllightfv(gl_light0, GL_POSITION, position); 18

19 Shading in OpenGL Shading computations (diffuse, specular, ambient) are performed automatically (unless you use shader programs) 19

20 Shading in OpenGL Need to provide per vertex normals Shading is performed in camera space Position, direction of light sources is transformed by GL_MODELVIEW matrix If light sources should be fixed relative to objects Set GL_MODELVIEW to desired object-to-camera transform Choose object space coordinates for light position Will be transformed using current GL_MODELVIEW Lots of details, highly recommend OpenGL programming guide

21 Transforming Normals If the object-to-camera transformation M includes shearing or scaling, transforming normals using M does not work: Transformed normals are not perpendicular to surfaces any more To avoid the problem, we need to transform the normals differently: by transforming the end points of the normal vectors separately or using Find derivation on-line at: OpenGL does this automatically for us on the GPU 21

23 Configurable Pipeline Before programmable shaders: APIs (OpenGL, Direct3D) to configure the rendering pipeline Enable/disable functionality E.g., lighting, texturing Set parameters for given functionality E.g., light direction, texture blending mode 23 Scene data Modeling and viewing transformation Shading Projection Rasterization, visibility Image

24 Configurable Pipeline Disadvantages Restricted to preset functionality Limited types of light sources (directional, point, spot) Limited set of reflection models (ambient, diffuse, Phong) Limited use of texture maps More flexibility desired for more photorealistic effects 24

25 Demo NVIDIA Time Machine 25

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

CSE 167: Introduction to Computer Graphics Lecture #7: Lights Jürgen P. Schulze, Ph.D. University of California, San Diego Spring Quarter 2015 Announcements Thursday in-class: Midterm Can include material

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

CSE 167: Introduction to Computer Graphics Lecture #6: Lights Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2014 Announcements Project 2 due Friday, Oct. 24 th Midterm Exam

### CSE 167: Lecture #8: GLSL. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

CSE 167: Introduction to Computer Graphics Lecture #8: GLSL Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012 Announcements Homework project #4 due Friday, November 2 nd Introduction:

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

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

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

### Light Sources. Spotlight model

lecture 12 Light Sources sunlight (parallel) Sunny day model : "point source at infinity" - lighting - materials: diffuse, specular, ambient spotlight - shading: Flat vs. Gouraud vs Phong light bulb ambient

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

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

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

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ω

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

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

CSE 167: Introduction to Computer Graphics Lecture #8: Textures Jürgen P. Schulze, Ph.D. University of California, San Diego Spring Quarter 2016 Announcements Project 2 due this Friday Midterm next Tuesday

### Surface shading: lights and rasterization. Computer Graphics CSE 167 Lecture 6

Surface shading: lights and rasterization Computer Graphics CSE 167 Lecture 6 CSE 167: Computer Graphics Surface shading Materials Lights Rasterization 2 Scene data Rendering pipeline Modeling and viewing

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

### CSE 167: Lecture #4: Vertex Transformation. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

CSE 167: Introduction to Computer Graphics Lecture #4: Vertex Transformation Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012 Announcements Project 2 due Friday, October 12

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

CSE 167: Introduction to Computer Graphics Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013 Today Course organization Course overview 2 Course Staff Instructor Jürgen Schulze,

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

### Pipeline Operations. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 11

Pipeline Operations CS 4620 Lecture 11 1 Pipeline you are here APPLICATION COMMAND STREAM 3D transformations; shading VERTEX PROCESSING TRANSFORMED GEOMETRY conversion of primitives to pixels RASTERIZATION

### Methodology for Lecture. Importance of Lighting. Outline. Shading Models. Brief primer on Color. Foundations of Computer Graphics (Spring 2010)

Foundations of Computer Graphics (Spring 2010) CS 184, Lecture 11: OpenGL 3 http://inst.eecs.berkeley.edu/~cs184 Methodology for Lecture Lecture deals with lighting (teapot shaded as in HW1) Some Nate

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

### CS 148, Summer 2012 Introduction to Computer Graphics and Imaging

http://www.ann.jussieu.fr/~frey/papers/scivi/cook%20r.l.,%20a%20reflectance%20model%20for%20computer%20graphics.pdf CS 148, Summer 2012 Introduction to Computer Graphics and Imaging f(~v 2 ) A 3 A 1 f(~v

### Lighting/Shading III. Week 7, Wed Mar 3

University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2010 Tamara Munzner Lighting/Shading III Week 7, Wed Mar 3 http://www.ugrad.cs.ubc.ca/~cs314/vjan2010 reminders News don't need to tell

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.

### Pipeline Operations. CS 4620 Lecture 14

Pipeline Operations CS 4620 Lecture 14 2014 Steve Marschner 1 Pipeline you are here APPLICATION COMMAND STREAM 3D transformations; shading VERTEX PROCESSING TRANSFORMED GEOMETRY conversion of primitives

CT4510: Computer Graphics Illumination and Shading BOCHANG MOON Photorealism The ultimate goal of rendering is to produce photo realistic images. i.e., rendered images should be indistinguishable from

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

DH2323 DGI15 INTRODUCTION TO COMPUTER GRAPHICS AND INTERACTION LIGHTING AND SHADING Christopher Peters HPCViz, KTH Royal Institute of Technology, Sweden chpeters@kth.se http://kth.academia.edu/christopheredwardpeters

### Exercise Max. Points Total 90

University of California San Diego Department of Computer Science CSE167: Introduction to Computer Graphics Fall Quarter 2014 Midterm Examination #1 Thursday, October 30 th, 2014 Instructor: Dr. Jürgen

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

### Illumination Model. The governing principles for computing the. Apply the lighting model at a set of points across the entire surface.

Illumination and Shading Illumination (Lighting) Model the interaction of light with surface points to determine their final color and brightness OpenGL computes illumination at vertices illumination Shading

### INF3320 Computer Graphics and Discrete Geometry

INF3320 Computer Graphics and Discrete Geometry Visual appearance Christopher Dyken and Martin Reimers 23.09.2009 Page 1 Visual appearance Real Time Rendering: Chapter 5 Light Sources and materials Shading

### Shading in OpenGL. Outline. Defining and Maintaining Normals. Normalization. Enabling Lighting and Lights. Outline

CSCI 420 Computer Graphics Lecture 10 Shading in OpenGL Normal Vectors in OpenGL Polygonal Shading Light Source in OpenGL Material Properties in OpenGL Approximating a Sphere [Angel Ch. 6.5-6.9] Jernej

### Light Transport Baoquan Chen 2017

Light Transport 1 Physics of Light and Color It s all electromagnetic (EM) radiation Different colors correspond to radiation of different wavelengths Intensity of each wavelength specified by amplitude

Fall 2017 CSCI 420: Computer Graphics 5.2 Shading in OpenGL Hao Li http://cs420.hao-li.com 1 Outline Normal Vectors in OpenGL Polygonal Shading Light Sources in OpenGL Material Properties in OpenGL Example:

### 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 OpenGL computes illumination at vertices illumination Shading

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

CSE 167: Introduction to Computer Graphics Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016 Today Course organization Course overview 2 Course Staff Instructor Jürgen Schulze,

### Projections and Hardware Rendering. Brian Curless CSE 557 Fall 2014

Projections and Hardware Rendering Brian Curless CSE 557 Fall 2014 1 Reading Required: Shirley, Ch. 7, Sec. 8.2, Ch. 18 Further reading: Foley, et al, Chapter 5.6 and Chapter 6 David F. Rogers and J. Alan

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

CSE 167: Introduction to Computer Graphics Lecture #5: Rasterization Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2015 Announcements Project 2 due tomorrow at 2pm Grading window

### Deferred Rendering Due: Wednesday November 15 at 10pm

CMSC 23700 Autumn 2017 Introduction to Computer Graphics Project 4 November 2, 2017 Deferred Rendering Due: Wednesday November 15 at 10pm 1 Summary This assignment uses the same application architecture

### Introduction to Computer Graphics. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

CSE 167: Introduction to Computer Graphics Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011 Today Course overview Course organization Vectors and Matrices 2 What is computer

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

### CSE 167: Introduction to Computer Graphics Lecture #4: Vertex Transformation

CSE 167: Introduction to Computer Graphics Lecture #4: Vertex Transformation Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2013 Announcements Project 2 due Friday, October 11

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

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

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

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

### CS Surface Rendering

CS10101001 Surface Rendering Junqiao Zhao 赵君峤 Department of Computer Science and Technology College of Electronics and Information Engineering Tongji University Surface rendering How do we choose a color

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

### Pipeline Operations. CS 4620 Lecture 10

Pipeline Operations CS 4620 Lecture 10 2008 Steve Marschner 1 Hidden surface elimination Goal is to figure out which color to make the pixels based on what s in front of what. Hidden surface elimination

### Shading , Fall 2004 Nancy Pollard Mark Tomczak

15-462, Fall 2004 Nancy Pollard Mark Tomczak Shading Shading Concepts Shading Equations Lambertian, Gouraud shading Phong Illumination Model Non-photorealistic rendering [Shirly, Ch. 8] Announcements Written

### CSE 167: Lecture #5: Rasterization. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

CSE 167: Introduction to Computer Graphics Lecture #5: Rasterization Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012 Announcements Homework project #2 due this Friday, October

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

### Computer Graphics Coursework 1

Computer Graphics Coursework 1 Deadline Deadline: 4pm, 24/10/2016 4pm 23/10/2015 Outline The aim of the coursework is to modify the vertex and fragment shaders in the provided OpenGL framework to implement

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

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

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

### CSE 167: Lecture 11: Textures 2. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011

CSE 167: Introduction to Computer Graphics Lecture 11: Textures 2 Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2011 Announcements Homework assignment #5 due Friday, Nov 4,

### CS 381 Computer Graphics, Fall 2008 Midterm Exam Solutions. The Midterm Exam was given in class on Thursday, October 23, 2008.

CS 381 Computer Graphics, Fall 2008 Midterm Exam Solutions The Midterm Exam was given in class on Thursday, October 23, 2008. 1. [4 pts] Drawing Where? Your instructor says that objects should always be

### CSE 167: Introduction to Computer Graphics Lecture #11: Visibility Culling

CSE 167: Introduction to Computer Graphics Lecture #11: Visibility Culling Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2017 Announcements Project 3 due Monday Nov 13 th at

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

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

Illumination & Shading Light Sources Empirical Illumination Shading Lecture 15 CISC440/640 Spring 2015 Illumination Models Computer Graphics Jargon: Illumination - the transport luminous flux from light

### Exercise Max. Points Total 80

University of California San Diego Department of Computer Science CSE167: Introduction to Computer Graphics Fall Quarter 2016 Midterm Examination #1 Thursday, October 13 th, 2016 Instructor: Dr. Jürgen

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

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

### Virtual Reality for Human Computer Interaction

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

### Illumination and Shading ECE 567

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 Intro to Computer Graphics. ANSWER KEY: Midterm Examination. November 18, Instructor: Sam Buss, UC San Diego

CSE 167 - Intro to Computer Graphics ANSWER KEY: Midterm Examination November 18, 2003 Instructor: Sam Buss, UC San Diego Write your name or initials on every page before beginning the exam. You have 75

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

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

CSE 167: Introduction to Computer Graphics Lecture #9: Visibility Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2018 Announcements Midterm Scores are on TritonEd Exams to be

### -=Bui Tuong Phong's Lighting=- University of Utah, but with shaders. Anton Gerdelan Trinity College Dublin

-=Bui Tuong Phong's Lighting=- University of Utah, 1973 but with shaders Anton Gerdelan Trinity College Dublin Before we do anything - normals Q. What does a normal do? Q. How do we usually calculate them?

### Objectives. Introduce the OpenGL shading Methods 1) Light and material functions on MV.js 2) per vertex vs per fragment shading 3) Where to carry out

Objectives Introduce the OpenGL shading Methods 1) Light and material functions on MV.js 2) per vertex vs per fragment shading 3) Where to carry out 1 Steps in OpenGL shading Enable shading and select

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

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

### CSE 167: Lecture #17: Volume Rendering. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

CSE 167: Introduction to Computer Graphics Lecture #17: Volume Rendering Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012 Announcements Thursday, Dec 13: Final project presentations

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

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

### Lets assume each object has a defined colour. Hence our illumination model is looks unrealistic.

Shading Models There are two main types of rendering that we cover, polygon rendering ray tracing Polygon rendering is used to apply illumination models to polygons, whereas ray tracing applies to arbitrary

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

### Lighting. CSC 7443: Scientific Information Visualization

Lighting Why Lighting? What light source is used and how the object response to the light makes difference Ocean looks bright bluish green in sunny day but dim gray green in cloudy day Lighting gives you

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

### CSE 167: Introduction to Computer Graphics Lecture #8: Scene Graph. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2015

CSE 167: Introduction to Computer Graphics Lecture #8: Scene Graph Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2015 Announcements Thursday: Midterm exam Friday: Project 3

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

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

### Computer Graphics I Lecture 11

15-462 Computer Graphics I Lecture 11 Midterm Review Assignment 3 Movie Midterm Review Midterm Preview February 26, 2002 Frank Pfenning Carnegie Mellon University http://www.cs.cmu.edu/~fp/courses/graphics/

### Homework #2. Shading, Ray Tracing, and Texture Mapping

Computer Graphics Prof. Brian Curless CSE 457 Spring 2000 Homework #2 Shading, Ray Tracing, and Texture Mapping Prepared by: Doug Johnson, Maya Widyasari, and Brian Curless Assigned: Monday, May 8, 2000

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

### University of British Columbia CPSC 314 Computer Graphics Sep-Dec Tamara Munzner (guest lecturing) Lighting/Shading

University of British Columbia CPSC 314 Computer Graphics Sep-Dec 2010 Tamara Munzner (guest lecturing) Lighting/Shading Lighting 2 Rendering Pipeline Geometry Database Model/View Transform. Lighting Perspective

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

### CS 130 Final. Fall 2015

CS 130 Final Fall 2015 Name Student ID Signature You may not ask any questions during the test. If you believe that there is something wrong with a question, write down what you think the question is trying

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

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

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

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