Unformatted text preview:

ShadingReadingIntroductionAn abundance of photonsBreak problem into two partsStrategy for todaySetup…Iteration zeroIteration oneWavelength dependenceDiffuse reflectorsSlide 12Diffuse reflectors, cont.Iteration twoSpecular reflectionSpecular reflection “derivation”Derivation, cont.Iteration threeWhat is incoming light intensity?Intensity drop-off with distanceIteration fourChoosing the parametersBRDFPhong BRDFMore sophisticated BRDF’sSummaryNext time: Ray tracingUniversity of Texas at Austin CS384G - Computer Graphics Fall 2010 Don FussellShadingUniversity of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell 2ReadingRequired:Watt, sections 6.2-6.3Optional:Watt, chapter 7.University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell 3IntroductionAffine 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 is called a shading model.Other names:Lighting modelLight reflection modelLocal illumination modelReflectance modelBRDFUniversity of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell 4An abundance of photonsProperly determining the right color is really hard.Look around the room. Each light source has different characteristics. Trillions of photons are pouring out every second.These photons can:interact with the atmosphere, or with things in the atmospherestrike a surface andbe absorbedbe reflected (scattered)cause fluorescence or phosphorescence.interact in a wavelength-dependent mannergenerally bounce around and aroundUniversity of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell 5Break problem into two partsPart 1:What happens when photons interact witha particular point on a surface?“Local illumination model”Part 2:How do photons bounce between surfaces?And, what is the final result of all of thisbouncing?“Global illumination model”Today we’re going to focus on Part 1.University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell 6Strategy for todayWe’re going to build up to an approximation of reality called the Phong illumination model.It has the following characteristics:not physically basedgives a first-order approximation to physical light reflectionvery fastwidely usedWe will assume local illumination, i.e., light goes: light source -> surface -> viewer. No interreflections, no shadows.University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell 7Setup…Given:a point P on a surface visible through pixel pThe normal N at PThe lighting direction, L,and intensity, Il ,at PThe viewing direction, V, at PThe shading coefficients(material properties) at PCompute the color, I, of pixel p.Assume that the direction vectors are normalized:= = =N L V 1University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell 8Iteration zeroThe simplest thing you can do is…Assign each polygon a single color:whereI is the resulting intensityke is the emissivity or intrinsic shade associated with the objectThis has some special-purpose uses, but not really good for drawing a scene.[Note: ke is omitted in Watt.]€ I = keUniversity of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell 9Iteration oneLet’s make the color at least dependent on the overall quantity of light available in the scene:ka is the ambient reflection coefficient.really the reflectance of ambient light“ambient” light is assumed to be equal in all directionsIa is the ambient intensity.Physically, what is “ambient” light?€ I = ke+ kaIaUniversity of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell 10Wavelength dependenceReally, ke, ka, and Ia are functions over all wavelengths .Ideally, we would do the calculation on these functions. We would start with:then we would find good RGB values to represent the spectrum I().Traditionally, though, ke, ka and Ia are represented as RGB triples, and the computation is performed on each color channel separately:€ I(λ) = ke(λ) + ka(λ)Ia(λ)€ IR= ke,R+ ka,RIa,RIG= ke,G+ ka,GIa,GIB= ke,B+ ka,BIa,BUniversity of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell 11Diffuse reflectorsDiffuse reflection occurs from dull, matte surfaces, like latex paint, or chalk.These diffuse or Lambertian reflectors reradiate light equally in all directions.Picture a rough surface with lots of tiny microfacets.University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell 12Diffuse reflectors…or picture a surface with little pigment particles embedded beneath the surface (neglect reflection at the surface for the moment):The microfacets and pigments distribute light rays in all directions.Embedded pigments are responsible for the coloration of diffusely reflected light in plastics and paints.Note: the figures above are intuitive, but not strictly (physically) correct.University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell 13Diffuse reflectors, cont.The reflected intensity from a diffuse surface does not depend on the direction of the viewer. The incoming light, though, does depend on the direction of the light source:University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell 14Iteration twoThe incoming energy is proportional to cos(), giving the diffuse reflection equations:where:kd is the diffuse reflection coefficientIl is the intensity of the light sourceN is the normal to the surface (unit vector)L is the direction to the light source (unit vector)(x)+ means max {0, x}[Note: Watt uses Ii instead of Il .] € I = ke+ kaIa+ kdIlcos(θ)+= ke+ kaIa+ kdIl(N • L)+University of Texas at Austin CS384G - Computer Graphics Fall 2010 Don Fussell 15Specular reflectionSpecular reflection accounts for the highlight that you see on some objects.It is particularly important for smooth, shiny surfaces, such as:metalpolished stoneplasticsapplesskinProperties:Specular reflection depends on the viewing direction V. For non-metals, the color is


View Full Document

UT CS 384G - Lecture Slides

Documents in this Course
Shading

Shading

27 pages

Shading

Shading

27 pages

Load more
Download Lecture Slides
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture Slides and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture Slides 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?