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

Size: px
Start display at page:

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

Transcription

1 Computer Vision I CSE 252a, Fall 2012 David Kriegman Assignment #2 (Due date: 11/6/2012) Name: Student ID: Problem 1 [1 pts] Calculate the number of steradians contained in a spherical wedge with radius r = 1, defined by θ = π 6, ψ = π 6 centered around vector ( 2 2, 2 2, 0). Problem 2 [3 pts] Consider a rectangular surface with vertices (1, 3, 3), (1, 3, 3), (1, 3, 3), and (1, 3, 3). If the radiance on the surface is L (z 2 + y 2 + 1) (with L constant) what is the irradiance arriving at position (0, 0, 0) with normal vector (1, 0, 0)? Figure 1: Problem 2 Setup Problem 3 [3 pts] a. Consider a cylinder with radius r and height h whose base is centered at z = 0 along the xy-plane. If the walls of the cylinder have constant radiance L and the top of the cylinder has constant radiance 7L, what is the irradiance E at the point (0, 0, 0) assuming that the surface at (0, 0, 0) has a normal vector of (0, 0, 1)? b. What is the irradiance if the radiance of the top is now Ld 3 where d is the distance to the center of the top (d [0, r])? Problem 4 [2 pts] A Lambertian surface is one that appears equally bright from all viewing direction. Say in other words, the emitted radiance from a Lambertian surface is not a function of outgoing direction. Assume that we have an ideal Lambertian surface which also reflects all incident lights (absorbing none), the BRDF f(θ i n, ψ i n, θ o ut, ψ o ut) of such a surface will be a constant. What is that constant? 1

2 Figure 2: Problem 3 Setup Hint: If we integrate the radiance of the surface over all directions, the total emitted energy is equal to the incoming energy. Problem 5 - Photometric Stereo [5 pts] The goal of this part of the assignment is to implement a couple of different algorithms that reconstruct a surface using the concept of photometric stereo. The majority of this problem should be done in MATLAB. There may also be sections in which you need to derive mathematical equations. Lambertian Reconstruction Photometric stereo is a technique to render depth of objects and surfaces from images of the same view with different lighting conditions. Figure 3: Synthetic Data Implement the photometric stereo technique described in Forsyth and Ponce section 2.2 and the lecture notes. a. Write a function that estimates the surface normals and albedo map using the included images and the known light directions. b. Write a program that reconstructs the depth map from the normals. You can first try the naive scanlinebased shape by integration method described in the book. If this does not work well on real images, you can use the MATLAB implementation of the Horn integration technique on the course website. c. Use these functions in a program that reads in the images and corresponding light source directions, calculates the normal and albedo map, and reconstructs the depth map. Calculating Light Direction Often times the light direction is unknown, in these cases it is required to estimate the light direction using a highly specular ball. Derive the equations to find the light direction L, using the center of the ball, C = (x, y) T, and the brightest point in the image B = (x, y) T. You may find this equation useful: L = 2N(R N) R 2

3 where R is the reflection direction and N is the surface normal. d. Write a function that calculates the light direction in a given image using your derivation. e. Write a program that calculates the light direction of all 8 spheres and uses these to reconstruct the depth map of the bottle using the functions you created in parts a, b, c and d. Do you notice any errors in this depth map? Why? Hertzmann and Seitz Reconstruction Using the surface normals with known light direction is not the only way to create 3D reconstructions. In this section, we look at a method proposed by Hertzmann and Seitz that uses the known BRDF of a material to obtain depth information. f. Implement the photometric stereo algorithm described in section 2 of Shape and Materials by Example: A Photometric Stereo Approach by Hertzmann and Seitz (can be found on the course website). g. Use the algorithm to reconstruct the 3D shape of the bottle using the set of corresponding bottle and sphere images. You may find it useful to use an algorithm to speedup the nearest-neighbor search, such as a kd-tree. What to turn in for Problem 5: Submit a hardcopy of your figures and code on the due date with the following: Your code for: Lambertian reconstruction (normals, albedo and depth). Figures of your normals, albedo and reconstruction of the synthetic data. Your code and derivation for calculating light direction as well as the output of this function on the first three sphere images, include your xy coordinates that you used for C and B. Figures of your reconstruction of the bottle with the lambertian reconstruction. Your code for: Hertzmann-Seitz implementation Figures of your reconstruction of the bottle with the Hertzmann-Seitz reconstruction. Problem 6 - Surface Rendering [5 pts] In this portion of the assignment we will be exploring different methods of approximating local illumination of objects in a scene. As discovered in the photometeric stereo portion of this homework, we know that some light models work better with different view, illumination sources and materials. Now, we will be exploring these systems from the opposite approach. In this section of the homework, you will be asked to calculate the images intensity of a 3D object with known geometry, but with various light sources, different materials, and using a number of illumination models. Lambertian Illumination One of the simplest models available to render 3D objections with illumination is the Lambertian model. This model finds the apparent brightness to an observer using the direction of the light source L and the normal vector on the surface of the object N. The brightness intensity at a given point on an object s surface, I d, with a single light source is found using the following relationship: I d = L N(I l C) where, C and I l are the the color and intensity of the light source respectively. 3

4 Phong Illumination One major drawback of Lambertian illumination is that it only considers the diffuse light in its calculation of brightness intensity. One other major component to illumination rendering is the specular component. The specular reflectance is the component of light that is reflected in a single direction, as opposed to all directions, which is the case in diffuse reflectance. One of the most used models to compute surface brightness with specular components is the Phong illumination model. This model combines ambient lighting, diffused reflectance as well as specular reflectance to find the brightness on a surface. Phong shading also considers the material in the scene which is characterized by four values: the ambient reflection constant (k a ), the diffuse reflection constant (k d ), the specular reflection constant (k s ) and α the Phong constant, which is the shininess of an object. Furthermore, since the specular component produces rays, only some of which would be observed by a single observer, the observer s viewing direction (V) must also be known. For some scene with known material parameters with M light sources the light intensity I phong on a surface with normal vector N seen from viewing direction V can be computed by: I phong = k a I a + m M { kd (L m N)I m,d + k s (R m V) α I m,s }. R m = 2N(L m N) L m where I a, is the color and intensity of the ambient lighting, I m,d and I m,s are the color values for the diffuse and specular light of the m th light source. Blinn-Phong Illumination One shader that is commonly used in graphics rendering today is a modification to the Phong model called the Blinn-Phong model. This model is the same in many respects to Phong s original model except it uses the halfway vectors to calculate the specular reflectance intensity. The halfway vectors are calculated as follows: H = L + V L + V We use this halfway vector to replace R V with N H. Rendering In this part of the assignment you will be asked to write and use the illumination model programs that you learned about in previous sections. You will be finding the light intensity using all three modeling technique for a torus shape with various lighting and material conditions. The equation of a torus in cartesian coordinates is as follows: or in parametric coordinates: T (x, y, z) = ( r 1 x 2 + y 2 ) 2 + z 2 r 2 2. x(u, v) = (r 1 + r 2 cos v) cos u y(u, v) = (r 1 + r 2 cos v) sin u z(u, v) = r 2 sin v where r 1 and r 2 represent the outer and inner radii respectively. 4

5 Figure 4: Depiction of a torus a. Write a function that calculates the Lambertian light intensity given the light direction L with color and intensity C and I l, and normal vector N. Then use this function in a program that calculates and displays the torus using each of the two lighting sources found in Table 1. Note: You do not need to worry about material coefficients in this model. b. Write a function that calculates the Phong light intensity given the material constants (k a, k d, k s, α), V, N and some number of M light sources. Then use this function in a program that calculates and displays the torus using each of the sets of coefficients found in Table 2 with each light source individually, and both light sources combined. c. Write a function that calculates the Blinn-Phong light intensity given the material constants (k a, k d, k s, α), V, N and some number of M light sources. Then use this function in a program that calculates and displays the torus using each of the sets of coefficients found in Table 2 with each light source individually, and both light sources combined. Hint: To avoid artifacts due to shadows, ensure that any negative intensities found are set to zero. Table 1: Light Sources m Location Color (RGB) 1 ( 1 3, 1 3, 1 3 )T (1, 1, 1) 2 (1, 0, 0) T (1,.5,.5) Table 2: Material Coefficients Mat. k a k d k s α Table 3: Other Parameters r 1 50px r 2 100px ˆV (0, 0, 1) T What to turn in for Problem 6: Submit a hardcopy of your figures and code on the due date with the following: Your code for: Lambertian Model, Phong Model, Blinn-Phong Model Your code for: The program(s) that used to calculate and display the toruses. Figure of all your renderings for the toruses under the different lighting conditions and materials using all 3 models. Please keep in mind that there are a number of plots, so take care to make them readable. In addition, please to jmerkow@ucsd.edu a copy of your code and figures for problems 5 and 6. Please send as a zip or tar file with [CSE252AHW2] in the subject line. 5

HW2. October 24, CSE 252A Computer Vision I Fall Assignment 2

HW2. October 24, CSE 252A Computer Vision I Fall Assignment 2 HW2 October 24, 2018 1 CSE 252A Computer Vision I Fall 2018 - Assignment 2 1.0.1 Instructor: David Kriegman 1.0.2 Assignment Published On: Wednesday, October 24, 2018 1.0.3 Due On: Wednesday, November

More information

Lecture 15: Shading-I. CITS3003 Graphics & Animation

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

More information

Lecture 22: Basic Image Formation CAP 5415

Lecture 22: Basic Image Formation CAP 5415 Lecture 22: Basic Image Formation CAP 5415 Today We've talked about the geometry of scenes and how that affects the image We haven't talked about light yet Today, we will talk about image formation and

More information

Photometric Stereo. Lighting and Photometric Stereo. Computer Vision I. Last lecture in a nutshell BRDF. CSE252A Lecture 7

Photometric Stereo. Lighting and Photometric Stereo. Computer Vision I. Last lecture in a nutshell BRDF. CSE252A Lecture 7 Lighting and Photometric Stereo Photometric Stereo HW will be on web later today CSE5A Lecture 7 Radiometry of thin lenses δa Last lecture in a nutshell δa δa'cosα δacos β δω = = ( z' / cosα ) ( z / cosα

More information

Capturing light. Source: A. Efros

Capturing light. Source: A. Efros Capturing light Source: A. Efros Review Pinhole projection models What are vanishing points and vanishing lines? What is orthographic projection? How can we approximate orthographic projection? Lenses

More information

Lights, Surfaces, and Cameras. Light sources emit photons Surfaces reflect & absorb photons Cameras measure photons

Lights, Surfaces, and Cameras. Light sources emit photons Surfaces reflect & absorb photons Cameras measure photons Reflectance 1 Lights, Surfaces, and Cameras Light sources emit photons Surfaces reflect & absorb photons Cameras measure photons 2 Light at Surfaces Many effects when light strikes a surface -- could be:

More information

Ligh%ng and Reflectance

Ligh%ng and Reflectance Ligh%ng and Reflectance 2 3 4 Ligh%ng Ligh%ng can have a big effect on how an object looks. Modeling the effect of ligh%ng can be used for: Recogni%on par%cularly face recogni%on Shape reconstruc%on Mo%on

More information

Announcement. Lighting and Photometric Stereo. Computer Vision I. Surface Reflectance Models. Lambertian (Diffuse) Surface.

Announcement. Lighting and Photometric Stereo. Computer Vision I. Surface Reflectance Models. Lambertian (Diffuse) Surface. Lighting and Photometric Stereo CSE252A Lecture 7 Announcement Read Chapter 2 of Forsyth & Ponce Might find section 12.1.3 of Forsyth & Ponce useful. HW Problem Emitted radiance in direction f r for incident

More information

CENG 477 Introduction to Computer Graphics. Ray Tracing: Shading

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

More information

Image Formation: Light and Shading. Introduction to Computer Vision CSE 152 Lecture 3

Image Formation: Light and Shading. Introduction to Computer Vision CSE 152 Lecture 3 Image Formation: Light and Shading CSE 152 Lecture 3 Announcements Homework 1 is due Apr 11, 11:59 PM Homework 2 will be assigned on Apr 11 Reading: Chapter 2: Light and Shading Geometric image formation

More information

Lighting affects appearance

Lighting affects appearance Lighting affects appearance 1 Source emits photons Light And then some reach the eye/camera. Photons travel in a straight line When they hit an object they: bounce off in a new direction or are absorbed

More information

Shading I Computer Graphics I, Fall 2008

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

More information

Illumination & Shading

Illumination & Shading 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

More information

CS5620 Intro to Computer Graphics

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

More information

Photometric Stereo.

Photometric Stereo. Photometric Stereo Photometric Stereo v.s.. Structure from Shading [1] Photometric stereo is a technique in computer vision for estimating the surface normals of objects by observing that object under

More information

Radiance. Pixels measure radiance. This pixel Measures radiance along this ray

Radiance. Pixels measure radiance. This pixel Measures radiance along this ray Photometric stereo Radiance Pixels measure radiance This pixel Measures radiance along this ray Where do the rays come from? Rays from the light source reflect off a surface and reach camera Reflection:

More information

And if that 120MP Camera was cool

And if that 120MP Camera was cool Reflectance, Lights and on to photometric stereo CSE 252A Lecture 7 And if that 120MP Camera was cool Large Synoptic Survey Telescope 3.2Gigapixel camera 189 CCD s, each with 16 megapixels Pixels are 10µm

More information

Other approaches to obtaining 3D structure

Other approaches to obtaining 3D structure Other approaches to obtaining 3D structure Active stereo with structured light Project structured light patterns onto the object simplifies the correspondence problem Allows us to use only one camera camera

More information

Announcements. Image Formation: Light and Shading. Photometric image formation. Geometric image formation

Announcements. Image Formation: Light and Shading. Photometric image formation. Geometric image formation Announcements Image Formation: Light and Shading Homework 0 is due Oct 5, 11:59 PM Homework 1 will be assigned on Oct 5 Reading: Chapters 2: Light and Shading CSE 252A Lecture 3 Geometric image formation

More information

CS4670/5760: Computer Vision Kavita Bala Scott Wehrwein. Lecture 23: Photometric Stereo

CS4670/5760: Computer Vision Kavita Bala Scott Wehrwein. Lecture 23: Photometric Stereo CS4670/5760: Computer Vision Kavita Bala Scott Wehrwein Lecture 23: Photometric Stereo Announcements PA3 Artifact due tonight PA3 Demos Thursday Signups close at 4:30 today No lecture on Friday Last Time:

More information

Announcements. Photometric Stereo. Shading reveals 3-D surface geometry. Photometric Stereo Rigs: One viewpoint, changing lighting

Announcements. Photometric Stereo. Shading reveals 3-D surface geometry. Photometric Stereo Rigs: One viewpoint, changing lighting Announcements Today Photometric Stereo, next lecture return to stereo Photometric Stereo Introduction to Computer Vision CSE152 Lecture 16 Shading reveals 3-D surface geometry Two shape-from-x methods

More information

Shading. Why we need shading. Scattering. Shading. Objectives

Shading. Why we need shading. Scattering. Shading. Objectives 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

More information

Comp 410/510 Computer Graphics. Spring Shading

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

More information

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

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,

More information

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

More information

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

More information

Illumination in Computer Graphics

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

More information

CMSC427 Shading Intro. Credit: slides from Dr. Zwicker

CMSC427 Shading Intro. Credit: slides from Dr. Zwicker CMSC427 Shading Intro Credit: slides from Dr. Zwicker 2 Today Shading Introduction Radiometry & BRDFs Local shading models Light sources Shading strategies Shading Compute interaction of light with surfaces

More information

Today. Global illumination. Shading. Interactive applications. Rendering pipeline. Computergrafik. Shading Introduction Local shading models

Today. Global illumination. Shading. Interactive applications. Rendering pipeline. Computergrafik. Shading Introduction Local shading models 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

More information

Understanding Variability

Understanding Variability Understanding Variability Why so different? Light and Optics Pinhole camera model Perspective projection Thin lens model Fundamental equation Distortion: spherical & chromatic aberration, radial distortion

More information

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

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

More information

Introduction to Computer Graphics 7. Shading

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

More information

Radiometry. Reflectance & Lighting. Solid Angle. Radiance. Radiance Power is energy per unit time

Radiometry. Reflectance & Lighting. Solid Angle. Radiance. Radiance Power is energy per unit time Radiometry Reflectance & Lighting Computer Vision I CSE5A Lecture 6 Read Chapter 4 of Ponce & Forsyth Homework 1 Assigned Outline Solid Angle Irradiance Radiance BRDF Lambertian/Phong BRDF By analogy with

More information

Announcements. Radiometry and Sources, Shadows, and Shading

Announcements. Radiometry and Sources, Shadows, and Shading Announcements Radiometry and Sources, Shadows, and Shading CSE 252A Lecture 6 Instructor office hours This week only: Thursday, 3:45 PM-4:45 PM Tuesdays 6:30 PM-7:30 PM Library (for now) Homework 1 is

More information

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

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

More information

Module 5: Video Modeling Lecture 28: Illumination model. The Lecture Contains: Diffuse and Specular Reflection. Objectives_template

Module 5: Video Modeling Lecture 28: Illumination model. The Lecture Contains: Diffuse and Specular Reflection. Objectives_template The Lecture Contains: Diffuse and Specular Reflection file:///d /...0(Ganesh%20Rana)/MY%20COURSE_Ganesh%20Rana/Prof.%20Sumana%20Gupta/FINAL%20DVSP/lecture%2028/28_1.htm[12/30/2015 4:22:29 PM] Diffuse and

More information

INFOGR Computer Graphics. J. Bikker - April-July Lecture 10: Shading Models. Welcome!

INFOGR Computer Graphics. J. Bikker - April-July Lecture 10: Shading Models. Welcome! INFOGR Computer Graphics J. Bikker - April-July 2016 - Lecture 10: Shading Models Welcome! Today s Agenda: Introduction Light Transport Materials Sensors Shading INFOGR Lecture 10 Shading Models 3 Introduction

More information

A Survey of Light Source Detection Methods

A Survey of Light Source Detection Methods A Survey of Light Source Detection Methods Nathan Funk University of Alberta Mini-Project for CMPUT 603 November 30, 2003 Abstract This paper provides an overview of the most prominent techniques for light

More information

EE Light & Image Formation

EE Light & Image Formation EE 576 - Light & Electric Electronic Engineering Bogazici University January 29, 2018 EE 576 - Light & EE 576 - Light & The image of a three-dimensional object depends on: 1. Shape 2. Reflectance properties

More information

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

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

More information

Lighting affects appearance

Lighting affects appearance Lighting affects appearance 1 Source emits photons Light And then some reach the eye/camera. Photons travel in a straight line When they hit an object they: bounce off in a new direction or are absorbed

More information

Introduction to Computer Vision. Introduction CMPSCI 591A/691A CMPSCI 570/670. Image Formation

Introduction to Computer Vision. Introduction CMPSCI 591A/691A CMPSCI 570/670. Image Formation Introduction CMPSCI 591A/691A CMPSCI 570/670 Image Formation Lecture Outline Light and Optics Pinhole camera model Perspective projection Thin lens model Fundamental equation Distortion: spherical & chromatic

More information

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

Global Illumination. CMPT 361 Introduction to Computer Graphics Torsten Möller. Machiraju/Zhang/Möller Global Illumination CMPT 361 Introduction to Computer Graphics Torsten Möller Reading Foley, van Dam (better): Chapter 16.7-13 Angel: Chapter 5.11, 11.1-11.5 2 Limitation of local illumination A concrete

More information

Illumination & Shading: Part 1

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

More information

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

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

More information

6. Illumination, Lighting

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,

More information

Lambertian model of reflectance I: shape from shading and photometric stereo. Ronen Basri Weizmann Institute of Science

Lambertian model of reflectance I: shape from shading and photometric stereo. Ronen Basri Weizmann Institute of Science Lambertian model of reflectance I: shape from shading and photometric stereo Ronen Basri Weizmann Institute of Science Variations due to lighting (and pose) Relief Dumitru Verdianu Flying Pregnant Woman

More information

Radiance. Radiance properties. Radiance properties. Computer Graphics (Fall 2008)

Radiance. Radiance properties. Radiance properties. Computer Graphics (Fall 2008) Computer Graphics (Fall 2008) COMS 4160, Lecture 19: Illumination and Shading 2 http://www.cs.columbia.edu/~cs4160 Radiance Power per unit projected area perpendicular to the ray per unit solid angle in

More information

Interactive Real-Time Raycasting

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.

More information

Raytracing. COSC 4328/5327 Scott A. King

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

More information

Sung-Eui Yoon ( 윤성의 )

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

More information

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

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

More information

Photometric Stereo. Photometric Stereo. Shading reveals 3-D surface geometry BRDF. HW3 is assigned. An example of photometric stereo

Photometric Stereo. Photometric Stereo. Shading reveals 3-D surface geometry BRDF. HW3 is assigned. An example of photometric stereo Photometric Stereo Photometric Stereo HW3 is assigned Introduction to Computer Vision CSE5 Lecture 6 Shading reveals 3-D surface geometry Shape-from-shading: Use just one image to recover shape. Requires

More information

CPSC / Texture Mapping

CPSC / Texture Mapping CPSC 599.64 / 601.64 Introduction and Motivation so far: detail through polygons & materials example: brick wall problem: many polygons & materials needed for detailed structures inefficient for memory

More information

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

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

More information

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

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

More information

Radiometry and reflectance

Radiometry and reflectance Radiometry and reflectance http://graphics.cs.cmu.edu/courses/15-463 15-463, 15-663, 15-862 Computational Photography Fall 2018, Lecture 16 Course announcements Homework 4 is still ongoing - Any questions?

More information

Illumination. Illumination CMSC 435/634

Illumination. Illumination CMSC 435/634 Illumination CMSC 435/634 Illumination Interpolation Illumination Illumination Interpolation Illumination Illumination Effect of light on objects Mostly look just at intensity Apply to each color channel

More information

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

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

More information

So far, we have considered only local models of illumination; they only account for incident light coming directly from the light sources.

So far, we have considered only local models of illumination; they only account for incident light coming directly from the light sources. 11 11.1 Basics So far, we have considered only local models of illumination; they only account for incident light coming directly from the light sources. Global models include incident light that arrives

More information

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

More information

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 Topic 9: Lighting & Reflection models Lighting & reflection The Phong reflection model diffuse component ambient component specular component Spot the differences Terminology Illumination The transport

More information

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

More information

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

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

More information

CS6670: Computer Vision

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

More information

Today. Global illumination. Shading. Interactive applications. Rendering pipeline. Computergrafik. Shading Introduction Local shading models

Today. Global illumination. Shading. Interactive applications. Rendering pipeline. Computergrafik. Shading Introduction Local shading models 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

More information

Using a Raster Display Device for Photometric Stereo

Using a Raster Display Device for Photometric Stereo DEPARTMEN T OF COMP UTING SC IENC E Using a Raster Display Device for Photometric Stereo Nathan Funk & Yee-Hong Yang CRV 2007 May 30, 2007 Overview 2 MODEL 3 EXPERIMENTS 4 CONCLUSIONS 5 QUESTIONS 1. Background

More information

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

More information

CS452/552; EE465/505. Intro to Lighting

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

More information

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

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

More information

CS 130 Final. Fall 2015

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

More information

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

More information

Lighting and Shading. Slides: Tamar Shinar, Victor Zordon

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

More information

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

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

More information

Overview. Radiometry and Photometry. Foundations of Computer Graphics (Spring 2012)

Overview. Radiometry and Photometry. Foundations of Computer Graphics (Spring 2012) Foundations of Computer Graphics (Spring 2012) CS 184, Lecture 21: Radiometry http://inst.eecs.berkeley.edu/~cs184 Overview Lighting and shading key in computer graphics HW 2 etc. ad-hoc shading models,

More information

Homework 4 Computer Vision CS 4731, Fall 2011 Due Date: Nov. 15, 2011 Total Points: 40

Homework 4 Computer Vision CS 4731, Fall 2011 Due Date: Nov. 15, 2011 Total Points: 40 Homework 4 Computer Vision CS 4731, Fall 2011 Due Date: Nov. 15, 2011 Total Points: 40 Note 1: Both the analytical problems and the programming assignments are due at the beginning of class on Nov 15,

More information

Computer Graphics. Lecture 13. Global Illumination 1: Ray Tracing and Radiosity. Taku Komura

Computer Graphics. Lecture 13. Global Illumination 1: Ray Tracing and Radiosity. Taku Komura Computer Graphics Lecture 13 Global Illumination 1: Ray Tracing and Radiosity Taku Komura 1 Rendering techniques Can be classified as Local Illumination techniques Global Illumination techniques Local

More information

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

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

More information

CS 4600 Fall Utah School of Computing

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

More information

Computer Graphics. Lecture 10. Global Illumination 1: Ray Tracing and Radiosity. Taku Komura 12/03/15

Computer Graphics. Lecture 10. Global Illumination 1: Ray Tracing and Radiosity. Taku Komura 12/03/15 Computer Graphics Lecture 10 Global Illumination 1: Ray Tracing and Radiosity Taku Komura 1 Rendering techniques Can be classified as Local Illumination techniques Global Illumination techniques Local

More information

Computer Graphics. Illumination and Shading

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

More information

Announcement. Photometric Stereo. Computer Vision I. Shading reveals 3-D surface geometry. Shape-from-X. CSE252A Lecture 8

Announcement. Photometric Stereo. Computer Vision I. Shading reveals 3-D surface geometry. Shape-from-X. CSE252A Lecture 8 Announcement Photometric Stereo Lecture 8 Read Chapter 2 of Forsyth & Ponce Office hours tomorrow: 3-5, CSE 4127 5-6, CSE B260A Piazza Next lecture Shape-from-X Shading reveals 3-D surface geometry Where

More information

Homework #2. Shading, Projections, Texture Mapping, Ray Tracing, and Bezier Curves

Homework #2. Shading, Projections, Texture Mapping, Ray Tracing, and Bezier Curves Computer Graphics Instructor: Brian Curless CSEP 557 Autumn 2016 Homework #2 Shading, Projections, Texture Mapping, Ray Tracing, and Bezier Curves Assigned: Wednesday, Nov 16 th Due: Wednesday, Nov 30

More information

CPSC 314 LIGHTING AND SHADING

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

More information

CS384G Midterm Examination Spring 2008

CS384G Midterm Examination Spring 2008 CS384G Midterm Examination Spring 2008 Each problem section is worth the indicated number of points. Show all work on these pages and don t forget to put your name on one of them! 1. (15 pts) In the two

More information

Announcements. Lighting. Camera s sensor. HW1 has been posted See links on web page for readings on color. Intro Computer Vision.

Announcements. Lighting. Camera s sensor. HW1 has been posted See links on web page for readings on color. Intro Computer Vision. Announcements HW1 has been posted See links on web page for readings on color. Introduction to Computer Vision CSE 152 Lecture 6 Deviations from the lens model Deviations from this ideal are aberrations

More information

CS4670/5760: Computer Vision

CS4670/5760: Computer Vision CS4670/5760: Computer Vision Kavita Bala! Lecture 28: Photometric Stereo Thanks to ScoC Wehrwein Announcements PA 3 due at 1pm on Monday PA 4 out on Monday HW 2 out on weekend Next week: MVS, sfm Last

More information

Illumination and Shading

Illumination and Shading 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

More information

Illumination Models & Shading

Illumination Models & Shading 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));

More information

Shading. Brian Curless CSE 557 Autumn 2017

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

More information

TDA361/DIT220 Computer Graphics, January 15 th 2016

TDA361/DIT220 Computer Graphics, January 15 th 2016 TDA361/DIT220 Computer Graphics, January 15 th 2016 EXAM (Same exam for both CTH- and GU students) Friday January 15 th, 2016, 8.30 12.30 Examiner Ulf Assarsson, tel. 0701-738535 Permitted Technical Aids

More information

Recollection. Models Pixels. Model transformation Viewport transformation Clipping Rasterization Texturing + Lights & shadows

Recollection. Models Pixels. Model transformation Viewport transformation Clipping Rasterization Texturing + Lights & shadows Recollection Models Pixels Model transformation Viewport transformation Clipping Rasterization Texturing + Lights & shadows Can be computed in different stages 1 So far we came to Geometry model 3 Surface

More information

Illumination & Shading

Illumination & Shading 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

More information

CS201 Computer Vision Lect 4 - Image Formation

CS201 Computer Vision Lect 4 - Image Formation CS201 Computer Vision Lect 4 - Image Formation John Magee 9 September, 2014 Slides courtesy of Diane H. Theriault Question of the Day: Why is Computer Vision hard? Something to think about from our view

More information

w Foley, Section16.1 Reading

w Foley, Section16.1 Reading 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

More information

Shape from shading. Surface brightness and Surface Orientation --> Reflectance map READING: Nalwa Chapter 5. BKP Horn, Chapter 10.

Shape from shading. Surface brightness and Surface Orientation --> Reflectance map READING: Nalwa Chapter 5. BKP Horn, Chapter 10. Shape from shading Surface brightness and Surface Orientation --> Reflectance map READING: Nalwa Chapter 5. BKP Horn, Chapter 10. May 2004 SFS 1 Shading produces a compelling perception of 3-D shape. One

More information

Lighting. Figure 10.1

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

More information

The feature set you are required to implement in your ray tracer is as follows (by order from easy to hard):

The feature set you are required to implement in your ray tracer is as follows (by order from easy to hard): Ray Tracing exercise TAU, Computer Graphics, 0368.3014, semester B Go to the Updates and FAQ Page Overview The objective of this exercise is to implement a ray casting/tracing engine. Ray tracing is a

More information

Spring 2012 Final. CS184 - Foundations of Computer Graphics. University of California at Berkeley

Spring 2012 Final. CS184 - Foundations of Computer Graphics. University of California at Berkeley Spring 2012 Final CS184 - Foundations of Computer Graphics University of California at Berkeley Write your name HERE: Write your login HERE: Closed book. You may not use any notes or printed/electronic

More information

Simple Lighting/Illumination Models

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

More information