Shading. Reading. Pinhole camera. Basic 3D graphics. Brian Curless CSE 457 Spring 2017

Size: px
Start display at page:

Download "Shading. Reading. Pinhole camera. Basic 3D graphics. Brian Curless CSE 457 Spring 2017"

Transcription

1 Reading Optional: Angel and Shreiner: chapter 5. Marchner and Shirley: chapter 0, chapter 7. Shading Further reading: OpenGL red book, chapter 5. Brian Curle CSE 457 Spring Baic 3D graphic With affine matrice, we can now tranform virtual 3D object in their local coordinate ytem into a global (world) coordinate ytem: Pinhole camera To create an image of a virtual cene, we need to define a camera, and we need to model lighting and hading. For the camera, we ue a pinhole camera. M M 2 [Angel, 20] The image i rendered onto an image plane (uually in front of the camera). To yntheize an image of the cene, we alo need to add light ource and a viewer/camera: Viewing ray emanate from the center of projection (COP) at the center of the pinhole. 3 The image of an object point P i at the interection of the viewing ray through P and the image plane. But i P viible? Thi the problem of hidden urface removal (a.k.a., viible urface determination). We ll conider thi problem later. 4

2 Shading An abundance of photon Next, we ll need a model to decribe how light interact with urface. Such a model i called a hading model. Other name: Lighting model Light reflection model Local illumination model Reflectance model BRDF Given the camera and hading model, properly determining the right color at each pixel i extremely hard. Look around the room. Each light ource ha different characteritic. Trillion of photon are pouring out every econd. Thee photon can: interact with molecule and particle in the air ( participating media ) trike a urface and be aborbed be reflected (cattered) caue fluorecence or phophorecence. interact in a wavelength-dependent manner generally bounce around and around 5 6 Our problem Setup We re going to build up to a approximation of reality called the Phong and Blinn-Phong illumination model. They have the following characteritic: not phyically correct give a firt-order approximation to phyical light reflection very fat widely ued In addition, we will aume local illumination, i.e., light goe: light ource -> urface -> viewer. No interreflection, no hadow. Given: a point P on a urface viible through pixel p The normal N at P The lighting direction, L, and (color) intenity, I L, at P The viewing direction, V, at P The hading coefficient at P Compute the color, I, of pixel p. Aume that the direction vector are normalized: N L V 7 8

3 Iteration zero Iteration one The implet thing you can do i Aign each polygon a ingle color: I=k e where I i the reulting intenity k e i the emiivity or intrinic hade aociated with the object Thi ha ome pecial-purpoe ue, but not really good for drawing a cene. Let make the color at leat dependent on the overall quantity of light available in the cene: Ik k I k a i the ambient reflection coefficient. really the reflectance of ambient light ambient light i aumed to be equal in all direction I La i the ambient light intenity. Phyically, what i ambient light? e 9 0 Wavelength dependence Diffue reflector Really, k e, k a, and I La are function over all wavelength. Ideally, we would do the calculation on thee function. For the ambient hading equation, we would tart with: I ( ) =k ( ) I ( ) then we would find good RGB value to repreent the pectrum I (). a La Emiive and ambient reflection don t model realitic lighting and reflection. To improve thi, we will look at diffue (a.k.a., Lambertian) reflection. Diffue reflection can occur from dull, matte urface, like latex paint, or chalk. Thee diffue reflector reradiate light equally in all direction. Picture a rough urface with lot of tiny microfacet. Traditionally, though, k a and I La are repreented a RGB triple, and the computation i performed on each color channel eparately: I =k I I I =k I R R R G G G =k a ILa B B B 2

4 Diffue reflector Diffue reflector, cont. or picture a urface with little pigment particle embedded beneath the urface (neglect reflection at the urface for the moment): The reflected intenity from a diffue urface doe not depend on the direction of the viewer. The incoming light, though, doe depend on the direction of the light ource: The microfacet and pigment ditribute light ray in all direction. Embedded pigment are reponible for the coloration of diffuely reflected light in platic and paint. Note: the figure in thi and the previou lide are intuitive, but not trictly (phyically) correct. 3 4 Iteration two Specular reflection The incoming energy i proportional to the diffue reflection equation:, giving Specular reflection account for the highlight that you ee on ome object. I=k +k I e d L +k I B =k +k I +k I B( ) e d L where: k d i the diffue reflection coefficient I L i the (color) intenity of the light ource N i the normal to the urface (unit vector) L i the direction to the light ource (unit vector) B prevent contribution of light from below the urface: if NL 0 B= 0 if NL 0 It i particularly important for mooth, hiny urface, uch a: metal polihed tone platic apple kin Propertie: Specular reflection depend on the viewing direction V. For non-metal, the color i determined olely by the color of the light. For metal, the color may be altered (e.g., bra) 5 6

5 Specular reflection derivation Phong pecular reflection co n φ n = For a perfect mirror reflector, light i reflected about N, o I L if V R I 0 otherwie For a near-perfect reflector, you might expect the highlight to fall off quickly with increaing angle. Alo known a: rough pecular reflection directional diffue reflection gloy reflection 0. n = One way to get thi effect i to take (R V), raied to a power n. Phong pecular reflection i proportional to: where (x ) + max(0, x ). n pecular ~ B RV I ( ) Q: A n get larger, doe the highlight on a curved urface get maller or larger? φ 7 8 Blinn-Phong pecular reflection Iteration three A common alternative for pecular reflection i the Blinn-Phong model (ometime called the modified Phong model.) We compute the vector halfway between L and V a: The next update to the Blinn-Phong hading model i then: n I=k +k I +k I B( NL ) +k I B( NH) e d L L k e+kai La+ ILBk d( NL ) +k( NH) n where: Analogou to Phong pecular reflection, we can compute the pecular contribution in term of (N H), raied to a power n : n pecular ~ B NH I ( ) k i the pecular reflection coefficient n i the pecular exponent or hinine H i the unit halfway vector between L and V, where V i the viewing direction. where, again, (x ) + max(0, x ). 9 20

6 Directional light The implet form of light upported by renderer are ambient, directional, and point. Spotlight are alo upported often a a pecial form of point light. We ve een ambient light ource, which are not really geometric. Directional light ource have a ingle direction and intenity aociated with them. Point light The direction of a point light ource i determined by the vector from the light poition to the urface point. E-P L= E-P r =E-P Uing affine notation, what i the homogeneou coordinate for a directional light? 2 Phyic tell u the intenity mut drop off inverely with the quare of the ditance: f atten r 2 Sometime, thi ditance-quared dropoff i conidered too harh. A common alternative i: f atten 2 a+br +cr with uer-upplied contant for a, b, and c. Uing affine notation, what i the homogeneou coordinate for a point light? 22 Spotlight We can alo apply a directional attenuation of a point light ource, giving a potlight effect. A common choice for the potlight intenity i: LS f = 2 pot abrcr 0 otherwie where L i the direction to the point light. S i the center direction of the potlight. i the angle between L and S i the cutoff angle for the potlight e i the angular falloff coefficient Note: co ( LS ) LS co. e 23 Iteration four Since light i additive, we can handle multiple light by taking the um over every light. Our equation i now: I=k +k I + Thi i the Blinn-Phong illumination model (for potlight). Which quantitie are patial vector? Which are RGB triple? Which are calar? ej Lj Sj j n I B NH L,j j k d NLj +k 2 j j a+b j jrj +cjrj e 24

7 Shading in OpenGL The OpenGL lighting model allow you to aociate different lighting color according to material propertie they will influence. 3D Geometry in the Graphic Hardware Pipeline Graphic hardware applie tranformation to bring the object and lighting into the camera coordinate ytem: Thu, our original hading equation (for point light): I=k +k I + e a+b r +cr NL NH I B k +k 2 L,j j d j j + j j j j j j n become: I=k +k I + e a+b r +cr 2 j j j j j j ki + B ki ( NL ) +ki ( NH ) n,j j d Ld, j j L,j j + where you can have a global ambient light with intenity I La in addition to having an ambient light intenity I La, j aociated with each individual light, a well a eparate diffue and pecular intenitie, I Ld, j and I L, j, repectively. 25 The geometry i aumed to be made of triangle, and the vertice are projected onto the image plane. 26 Raterization Shading the interior of triangle After projecting the vertice, graphic hardware mear vertex propertie acro the interior of the triangle in a proce called raterization. We will be computing color uing the Blinn-Phong lighting model. Let aume (a graphic hardware doe) that we are working with triangle. How hould we hade the interior of triangle? Smearing the z-value and uing a Z-buffer will enable the graphic hardware to determine if a point inide a triangle i viible. (More on thi in another lecture.) If we have tored color at the vertice, then we can mear thee a well

8 Shading with per-face normal Faceted hading (cont d) Aume each face ha a contant normal: For a ditant viewer and a ditant light ource and contant material propertie over the urface, how will the color of each triangle vary? 29 [William and Siegel 990] 30 Gouraud interpolation Facted hading v. Gouraud interpolation To get a moother reult that i eaily performed in hardware, we can do Gouraud interpolation. Here how it work:. Compute normal at the vertice. 2. Shade only the vertice. 3. Interpolate the reulting vertex color. 3 [William and Siegel 990] 32

9 Gouraud interpolation artifact Phong interpolation Gouraud interpolation ha ignificant limitation.. If the polygonal approximation i too coare, we can mi pecular highlight. To get an even moother reult with fewer artifact, we can perform Phong interpolation. Here how it work:. Compute normal at the vertice. 2. Interpolate normal and normalize. 3. Shade uing the interpolated normal. 2. We will encounter Mach banding (derivative dicontinuity enhanced by human eye). Thi i what graphic hardware doe by default. A ubtantial improvement i to do Gouraud v. Phong interpolation Vertex proceor Primitive aembler Old pipeline: Gouraud interpolation Default vertex proceing: Ldetermine lighting direction Vdetermine viewing direction Nnormalize( n e ) cblinn-phong hade with LV,, Nk, d, k, n attach c blinn-phong to vertex a varying v i project v to image 2 3 vi, vi, vi triangle Raterizer Fragment proceor Default fragment proceing: p color c blinn-phong [William and Siegel 990] 35 36

10 Vertex proceor Primitive aembler Programmable pipeline: Phong-interpolated normal! Vertex hader: attach n e to vertex a varying attach v e to vertex a varying v i project v to image v, v, v 2 3 i i i triangle Chooing Blinn-Phong hading parameter Experiment with different parameter etting. To get you tarted, here are a few uggetion: Try n in the range [0,00] Try k a + k d + k < Ue a mall k a (~0.) n k d k Raterizer Metal Platic large medium Small, color of metal Medium, color of platic Large, color of metal Medium, white Planet 0 varying 0 Fragment proceor Fragment hader: p L determine lighting direction (uing v e ) p Vnormalizev e p N normalize( n e ) color hade with LV,, N, k, k, n d BRDF More ophiticated BRDF The diffue+pecular part of the Blinn-Phong illumination model are a mapping from light to viewing direction: L V I= I LB k d( NL) +kn L V I f ( LV, ) L r The mapping function f r i often written in term of incoming (light) direction in and outgoing (viewing) direction out : n [Cook and Torrance, 982] f (, ) or f ( ) r in out r in out Thi function i called the Bi-directional Reflectance Ditribution Function (BRDF). Aniotropic BRDF [Wetin, Arvo, Torrance 992] Here a plot with in held contant: f (, ) r in out in BRDF can be quite ophiticated 39 Artitic BRDF [Gooch] 40

11 More ophiticated BRDF (cont d) BSSRDF for uburface cattering Hair illuminated from different angle [Marchner et al., 2003] [Jenen et al. 200] Wool cloth and ilk cloth [Irawan and Marchner, 202] 4 42 Summary You hould undertand the equation for the Blinn- Phong lighting model decribed in the Iteration Four lide: What i the phyical meaning of each variable? How are the term computed? What effect doe each term contribute to the image? What doe varying the parameter do? You hould alo undertand the difference between faceted, Gouraud, and Phong interpolated hading. 43

Shading. Reading. Pinhole camera. Basic 3D graphics. Brian Curless CSE 457 Spring Required: Angel chapter 5.

Shading. Reading. Pinhole camera. Basic 3D graphics. Brian Curless CSE 457 Spring Required: Angel chapter 5. Reading Required: Angel chapter 5. Shading Optional: OpenGL red book, chapter 5. Brian Curle CSE 457 Spring 2015 1 2 Baic 3D graphic With affine matrice, we can now tranform virtual 3D object in their

More information

Shading. Brian Curless CSE 457 Spring 2017

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

More information

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

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

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

Shading. Brian Curless CSE 457 Spring 2015

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

More information

Shading. CSE 457 Winter 2015

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

More information

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

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

More information

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

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

More information

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

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

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

Lighting and Shading

Lighting and Shading ighting an Shaing 4 th ~ 5 th Week, 29 Why We Nee Shaing Suppoe we buil a moel of a phere uing many polygon an color it with glcolor We get omething like But we want Why oe the image of a real phere look

More information

Projections and Hardware Rendering. Brian Curless CSE 557 Fall 2014

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

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

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

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

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

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

Complex Shading Algorithms

Complex Shading Algorithms Complex Shading Algorithms CPSC 414 Overview So far Rendering Pipeline including recent developments Today Shading algorithms based on the Rendering Pipeline Arbitrary reflection models (BRDFs) Bump mapping

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

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

Introduction Rasterization Z-buffering Shading. Graphics 2012/2013, 4th quarter. Lecture 09: graphics pipeline (rasterization and shading) Lecture 9 Graphics pipeline (rasterization and shading) Graphics pipeline - part 1 (recap) Perspective projection by matrix multiplication: x pixel y pixel z canonical 1 x = M vpm per M cam y z 1 This

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

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

ECS 175 COMPUTER GRAPHICS. Ken Joy.! Winter 2014

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

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

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

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

Universität Augsburg. Institut für Informatik. Approximating Optimal Visual Sensor Placement. E. Hörster, R. Lienhart.

Universität Augsburg. Institut für Informatik. Approximating Optimal Visual Sensor Placement. E. Hörster, R. Lienhart. Univerität Augburg à ÊÇÅÍÆ ËÀǼ Approximating Optimal Viual Senor Placement E. Hörter, R. Lienhart Report 2006-01 Januar 2006 Intitut für Informatik D-86135 Augburg Copyright c E. Hörter, R. Lienhart Intitut

More information

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

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

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

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

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

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

CS 5625 Lec 2: Shading Models

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

More information

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

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

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

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

Illumination and Shading

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

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

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

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

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

Shading 1: basics Christian Miller CS Fall 2011

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

More information

Computer Graphics. Illumination and Shading

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.

More information

Virtual Reality for Human Computer Interaction

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

More information

Pipeline Operations. CS 4620 Lecture 10

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

More information

CPSC / Illumination and Shading

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

More information

Ray Tracing. Brian Curless CSEP 557 Fall 2016

Ray Tracing. Brian Curless CSEP 557 Fall 2016 Ray Tracing Brian Curless CSEP 557 Fall 2016 1 Reading Required: Shirley, section 10.1-10.7 (online handout) Triangle intersection (online handout) Further reading: Shirley errata on syllabus page, needed

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

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

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

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

Gray-level histogram. Intensity (grey-level) transformation, or mapping. Use of intensity transformations:

Gray-level histogram. Intensity (grey-level) transformation, or mapping. Use of intensity transformations: Faculty of Informatic Eötvö Loránd Univerity Budapet, Hungary Lecture : Intenity Tranformation Image enhancement by point proceing Spatial domain and frequency domain method Baic Algorithm for Digital

More information

Computer Vision Systems. Viewing Systems Projections Illuminations Rendering Culling and Clipping Implementations

Computer Vision Systems. Viewing Systems Projections Illuminations Rendering Culling and Clipping Implementations Computer Vision Systems Viewing Systems Projections Illuminations Rendering Culling and Clipping Implementations Viewing Systems Viewing Transformation Projective Transformation 2D Computer Graphics Devices

More information

Representations and Transformations. Objectives

Representations and Transformations. Objectives Repreentation and Tranformation Objective Derive homogeneou coordinate tranformation matrice Introduce tandard tranformation - Rotation - Tranlation - Scaling - Shear Scalar, Point, Vector Three baic element

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

CEng 477 Introduction to Computer Graphics Fall

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

More information

Mid-term review ECE 161C Electrical and Computer Engineering University of California San Diego

Mid-term review ECE 161C Electrical and Computer Engineering University of California San Diego Mid-term review ECE 161C Electrical and Computer Engineering Univerity of California San Diego Nuno Vaconcelo Spring 2014 1. We have een in cla that one popular technique for edge detection i the Canny

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

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

Shading, lighting, & BRDF Theory. Cliff Lindsay, PHD

Shading, lighting, & BRDF Theory. Cliff Lindsay, PHD Shading, lighting, & BRDF Theory Cliff Lindsay, PHD Overview of today s lecture BRDF Characteristics Lights in terms of BRDFs Classes of BRDFs Ambient light & Shadows in terms of BRDFs Decomposing Reflection

More information

CS Illumination and Shading. Slide 1

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

More information

CS770/870 Spring 2017 Color and Shading

CS770/870 Spring 2017 Color and Shading Preview CS770/870 Spring 2017 Color and Shading Related material Cunningham: Ch 5 Hill and Kelley: Ch. 8 Angel 5e: 6.1-6.8 Angel 6e: 5.1-5.5 Making the scene more realistic Color models representing the

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

Shading & Material Appearance

Shading & Material Appearance Shading & Material Appearance ACM. All rights reserved. This content is excluded from our Creative Commons license. For more information, see http://ocw.mit.edu/help/faq-fair-use/. MIT EECS 6.837 Matusik

More information

Illumination and Shading

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

More information

surface: reflectance transparency, opacity, translucency orientation illumination: location intensity wavelength point-source, diffuse source

surface: reflectance transparency, opacity, translucency orientation illumination: location intensity wavelength point-source, diffuse source walters@buffalo.edu CSE 480/580 Lecture 18 Slide 1 Illumination and Shading Light reflected from nonluminous objects depends on: surface: reflectance transparency, opacity, translucency orientation illumination:

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

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

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

More information

Pipeline Operations. CS 4620 Lecture 14

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

More information

Photorealistic Real-Time Outdoor Light Scattering Some of the most striking aspects of outdoor scenes

Photorealistic Real-Time Outdoor Light Scattering Some of the most striking aspects of outdoor scenes naty hoffman & arcot j. preetham Photorealitic Real-Time Outdoor Light Scattering Some of the mot triking apect of outdoor cene are the reult of light interacting with the atmophere: hade of blue in a

More information

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

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

More information

Topics and things to know about them:

Topics and things to know about them: Practice Final CMSC 427 Distributed Tuesday, December 11, 2007 Review Session, Monday, December 17, 5:00pm, 4424 AV Williams Final: 10:30 AM Wednesday, December 19, 2007 General Guidelines: The final will

More information

Lighting/Shading III. Week 7, Wed Mar 3

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

More information

Reflection & Refraction

Reflection & Refraction Name: Anwer Key Date: Regent Phyic Tet # 14 Review Reflection & Refraction 1. Ue GUESS method and indicate all vector direction.. Term to know: electromagnetic pectrum, diffue reflection, regular reflection,

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

Introduction to Visualization and Computer Graphics

Introduction to Visualization and Computer Graphics Introduction to Visualization and Computer Graphics DH2320, Fall 2015 Prof. Dr. Tino Weinkauf Introduction to Visualization and Computer Graphics Visibility Shading 3D Rendering Geometric Model Color Perspective

More information

TSBK 07! Computer Graphics! Ingemar Ragnemalm, ISY

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

More information

BRDF Computer Graphics (Spring 2008)

BRDF Computer Graphics (Spring 2008) BRDF Computer Graphics (Spring 2008) COMS 4160, Lecture 20: Illumination and Shading 2 http://www.cs.columbia.edu/~cs4160 Reflected Radiance proportional to Irradiance Constant proportionality: BRDF [CW

More information

Visualisatie BMT. Rendering. Arjan Kok

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

More information

Graphics Hardware and Display Devices

Graphics Hardware and Display Devices Graphics Hardware and Display Devices CSE328 Lectures Graphics/Visualization Hardware Many graphics/visualization algorithms can be implemented efficiently and inexpensively in hardware Facilitates interactive

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

Illumination and Shading - II

Illumination and Shading - II Illumination and Shading - II Computer Graphics COMP 770 (236) Spring 2007 Instructor: Brandon Lloyd 2/19/07 1 From last time Light Sources Empirical Illumination Shading Local vs Global Illumination 2/19/07

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

Lab 9 - Metal and Glass

Lab 9 - Metal and Glass Lab 9 - Metal and Glass Let the form of an object be what it may, light, shade, and perspective will always make it beautiful. -John Constable Prologue Support code: /course/cs1230/src/labs/lab09 This

More information

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

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

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

More information

Lecture 17: Shading in OpenGL. CITS3003 Graphics & Animation

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

More information

Why we need shading?

Why we need shading? 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

More information

Mirror shape recovery from image curves and intrinsic parameters: Rotationally symmetric and conic mirrors. Abstract. 2. Mirror shape recovery

Mirror shape recovery from image curves and intrinsic parameters: Rotationally symmetric and conic mirrors. Abstract. 2. Mirror shape recovery Mirror hape recovery from image curve and intrinic parameter: Rotationally ymmetric and conic mirror Nuno Gonçalve and Helder Araújo Λ Intitute of Sytem and Robotic Univerity of Coimbra Pinhal de Marroco

More information

Raytracing CS148 AS3. Due :59pm PDT

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

More information

University of Victoria CSC 305 Shading. Brian Wyvill 2016

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

More information

9. Illumination and Shading

9. Illumination and Shading 9. Illumination and Shading Approaches for visual realism: - Remove hidden surfaces - Shade visible surfaces and reproduce shadows - Reproduce surface properties Texture Degree of transparency Roughness,

More information

CS-184: Computer Graphics. Today

CS-184: Computer Graphics. Today CS-184: Computer Graphics Lecture #8: Shading Prof. James O Brien University of California, Berkeley V2006-S-08-2.0 Today Local Illumination & Shading The BRDF Simple diffuse and specular approximations

More information

Computer Graphics I Lecture 11

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/

More information

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

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:

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

Analyzing Hydra Historical Statistics Part 2

Analyzing Hydra Historical Statistics Part 2 Analyzing Hydra Hitorical Statitic Part Fabio Maimo Ottaviani EPV Technologie White paper 5 hnode HSM Hitorical Record The hnode i the hierarchical data torage management node and ha to perform all the

More information

S U N G - E U I YO O N, K A I S T R E N D E R I N G F R E E LY A VA I L A B L E O N T H E I N T E R N E T

S U N G - E U I YO O N, K A I S T R E N D E R I N G F R E E LY A VA I L A B L E O N T H E I N T E R N E T S U N G - E U I YO O N, K A I S T R E N D E R I N G F R E E LY A VA I L A B L E O N T H E I N T E R N E T Copyright 2018 Sung-eui Yoon, KAIST freely available on the internet http://sglab.kaist.ac.kr/~sungeui/render

More information

Rendering Light Reflection Models

Rendering Light Reflection Models Rendering Light Reflection Models Visual Imaging in the Electronic Age Donald P. Greenberg October 3, 2017 Lecture #13 Program of Computer Graphics, Cornell University General Electric - 167 Cornell in

More information