Computer Graphics (Fall 2003)

Slides:



Advertisements
Similar presentations
Computer Vision Radiometry. Bahadir K. Gunturk2 Radiometry Radiometry is the part of image formation concerned with the relation among the amounts of.
Advertisements

1 Graphics CSCI 343, Fall 2013 Lecture 18 Lighting and Shading.
Computer Graphics (Fall 2008) COMS 4160, Lecture 18: Illumination and Shading 1
Virtual Realism LIGHTING AND SHADING. Lighting & Shading Approximate physical reality Ray tracing: Follow light rays through a scene Accurate, but expensive.
Physically Based Illumination Models
Lighting and Illumination Lighting is the major problem in computer graphics, for either realism or real-time compositions- harder than modeling Consider.
Illumination and Shading
Torrance Sparrow Model of Reflectance + Oren Nayar Model of Reflectance.
Based on slides created by Edward Angel
1 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Shading I.
University of New Mexico
Computer Graphics (Fall 2005) COMS 4160, Lecture 16: Illumination and Shading 1
Computer Graphics (Spring 2008) COMS 4160, Lecture 20: Illumination and Shading 2
Lighting and Shading Wen-Chieh (Steve) Lin
Computer Graphics (Spring 2008) COMS 4160, Lecture 15: Illumination and Shading
Computer Graphics (Fall 2008) COMS 4160, Lecture 19: Illumination and Shading 2
7M836 Animation & Rendering
Objectives Learn to shade objects so their images appear three- dimensional Learn to shade objects so their images appear three- dimensional Introduce.
Basic Principles of Surface Reflectance Lecture #3 Thanks to Shree Nayar, Ravi Ramamoorthi, Pat Hanrahan.
Computer Graphics (Fall 2004) COMS 4160, Lecture 16: Illumination and Shading 2 Lecture includes number of slides from.
6.1 Vis_04 Data Visualization Lecture 6 - A Rough Guide to Rendering.
©Larry F. Hodges (modified by Amos Johnson) 1 Shading Models.
University of British Columbia CPSC 414 Computer Graphics © Tamara Munzner 1 Shading Week 5, Wed 1 Oct 2003 recap: lighting shading.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Shading I Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
Aaron Bloomfield CS 445: Introduction to Graphics Fall 2006
Lighting & Shading.
CS 480/680 Computer Graphics Shading I Dr. Frederick C Harris, Jr.
Fundamentals of Computer Graphics Part 6 Shading prof.ing.Václav Skala, CSc. University of West Bohemia Plzeň, Czech Republic ©2002 Prepared with Angel,E.:
CS 445 / 645: Introductory Computer Graphics
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Shading (introduction to rendering). Rendering  We know how to specify the geometry but how is the color calculated.
COMPUTER GRAPHICS CS 482 – FALL 2014 AUGUST 27, 2014 FIXED-FUNCTION 3D GRAPHICS MESH SPECIFICATION LIGHTING SPECIFICATION REFLECTION SHADING HIERARCHICAL.
Shading / Light Thanks to Srinivas Narasimhan, Langer-Zucker, Henrik Wann Jensen, Ravi Ramamoorthi, Hanrahan, Preetham.
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS 1 Shading (Shading) & Smooth Shading Graphics.
CS447/ Realistic Rendering -- Radiosity Methods-- Introduction to 2D and 3D Computer Graphics.
Taku KomuraComputer Graphics Local Illumination and Shading Computer Graphics – Lecture 10 Taku Komura Institute for Perception, Action.
University of Texas at Austin CS 378 – Game Technology Don Fussell CS 378: Computer Game Technology Basic Rendering Pipeline and Shading Spring 2012.
Advanced Illumination Models Chapter 7 of “Real-Time Rendering, 3 rd Edition”
Diffuse Reflections from Rough Surfaces Lecture #5
Announcements Office hours today 2:30-3:30 Graded midterms will be returned at the end of the class.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
Illumination and Shading
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
CS 325 Introduction to Computer Graphics 03 / 29 / 2010 Instructor: Michael Eckmann.
Lecture Fall 2001 Illumination and Shading in OpenGL Light Sources Empirical Illumination Shading Transforming Normals Tong-Yee Lee.
Computer Graphics (Spring 2003) COMS 4160, Lecture 18: Shading 2 Ravi Ramamoorthi Guest Lecturer: Aner Benartzi.
Specular Reflection Lecture 27 Mon, Nov 10, 2003.
Local Illumination and Shading
Where We Stand So far we know how to: –Transform between spaces –Rasterize –Decide what’s in front Next –Deciding its intensity and color.
Illumination Model How to compute color to represent a scene As in taking a photo in real life: – Camera – Lighting – Object Geometry Material Illumination.
Render methods. Contents Levels of rendering Wireframe Plain shadow Gouraud Phong Comparison Gouraud-Phong.
OpenGL Shading. 2 Objectives Learn to shade objects so their images appear three-dimensional Introduce the types of light-material interactions Build.
Lighting and Reflection Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
David Luebke3/16/2016 CS 551 / 645: Introductory Computer Graphics David Luebke
Illumination Study of how different materials reflect light Definition of radiance, the fundamental unit of light transfer in computer graphics How the.
Computer Graphics (Fall 2006) COMS 4160, Lecture 16: Illumination and Shading 1
Computer Graphics Lecture 26 Mathematics of Lighting and Shading Part II Taqdees A. Siddiqi
© University of Wisconsin, CS559 Spring 2004
3D Graphics Rendering PPT By Ricardo Veguilla.
Unit-7 Lighting and Shading
Chapter 14 Shading Models.
CSC461: Lecture 23 Shading Computation
CS-378: Game Technology Lecture #3: Shading Prof. Okan Arikan
Fundamentals of Computer Graphics Part 6 Shading
Isaac Gang University of Mary Hardin-Baylor
Computer Graphics Material Colours and Lighting
Chapter 14 Shading Models.
Illumination Model 고려대학교 컴퓨터 그래픽스 연구실.
Illumination Model 고려대학교 컴퓨터 그래픽스 연구실.
Lighting Calculations
Presentation transcript:

Computer Graphics (Fall 2003) COMS 4160, Lecture 14: Shading 1 Ravi Ramamoorthi http://www.cs.columbia.edu/~cs4160 Guest Lecturer: Aner Benartzi

Shading Shading Irradiance Radiance Shading does not mean calculating shadows. Shading in computer graphics refers to calculating the way light interacts with objects to give them their appearance. Irradiance Light falling on an object has a direction and intensity. Radiance Light then interacts with the object and is emitted with a new direction(s) and intensity.

Linear Relationship of Light Light energy is simply the sum of all the contributions Terms that can be calculated separately and later added together: multiple light sources multiple interactions (diffuse, specular, more later) multiple colors (R-G-B, or per wavelength) http://www.math.montana.edu/frankw/ccp/multiworld/twothree/lighting/learn4.htm

General Considerations Surfaces are described as having a position, and a normal at every point. Other vectors used L = vector to the light source light position minus surface point position E = vector to the viewer (eye) viewer position minus surface point position N1 (x1,y1,z1) N2 (x2,y2,z2)

Diffuse reflection (Lambertian) Many materials are rough on a small scale. matte paint, cloth, unfinished wood, etc. Incoming light is reflected equally in all directions. Outgoing radiance is dependant on irradiance angle N L (real materials don’t follow the cosine drop-off exactly)

Mirror reflection (Specular) Many materials are also smooth even on a small scale glass, glossy paint, plastic, polished metal, etc. Incoming light is reflected mainly in the mirror direction. metal reflects a certain color. Phong N L

Phong reflection Specularities are only singular points in perfect mirrors. Phong model allows for some light reflected in off-specular directions. E N L L reflected (real materials don’t follow the cosine drop-off exactly, nor use Lr)

Meaning of negative dot products If (N dot L) is negative, then the light is behind the surface, and cannot illuminate it. If (N dot E) is negative, then the viewer is looking at the underside of the surface and cannot see it’s front-face. In both cases, I is clamped to Zero.

Triangle Meshes as Approximations Most geometric models are large collections of triangles. Triangles have 3 vertices, each with a position, color, normal, and other parameters (such as n for Phong reflection). The triangles are an approximation to the actual surface of the object.

Coloring Between the Lines We know how to calculate the light intensity given: surface position normal viewer position light source position (or direction) How do we shade a triangle between it’s vertices, where we aren’t given the normal? http://www.nbb.cornell.edu/neurobio/land/OldStudentProjects/cs490-95to96/guo/Shading.html

Flat vs. Gouraud Shading Flat - Determine that each face has a single normal, and color the entire face a single value, based on that normal. Gouraud – Determine the color at each vertex, using the normal at that vertex, and interpolate linearly for the pixels between the vertex locations.

Gouraud Shading – Details 1 Inter-vertex interpolation can be done in object space (along the face), but it is simpler to do it in image space (along the screen). 2 ways for a vertex to get its normal: given when the vertex is defined. take all the normals from faces that share the vertex, and average them.

Gouraud Shading – Details 2 The intensity at the 3 vertecies, I1, I2, I3, is calculated. Each Ik is projected onto pixel (xk, yk). The intensities of 2 points on the same scan, y=s, Ia, Ib, are found. These points lie on the edges of the triangle. The intensity at an interior point at (xp, s), Ip is found as follows:

area of desired highlight Gouraud and Errors I1 = 0 because (N dot E) is negative. I2 = 0 because (N dot L) is negative. Any interpolation of I1 and I2 will be 0. I1 = 0 I2 = 0 area of desired highlight

2 Phongs make a Highlight Besides the Phong Reflectance model (cosn), there is a Phong Shading model. Phong Shading: Instead of interpolating the intensities between vertices, interpolate the normals. The entire lighting calculation is performed for each pixel, based on the interpolated normal. I1 = 0 I2 = 0

Next Time The Bidirectional Reflectance Distribution Function. (BRDF) The BRDF is a generalization of the specific reflectance functions we’ve seen so far.