DOC PREVIEW
UT CS 384G - Shading

This preview shows page 1-2-3-25-26-27 out of 27 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 27 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 27 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 27 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 27 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 27 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 27 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 27 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don FussellShadingUniversity of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell 2ReadingRequired:Watt, sections 6.2-6.3Optional:Watt, chapter 7.University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell 3IntroductionAffine transformations help us to place objectsinto a scene.Before creating images of these objects, we’ll lookat models for how light interacts with theirsurfaces.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 2008 Don Fussell 4An abundance of photonsProperly determining the right color is really hard.Look around the room. Each light source has differentcharacteristics. Trillions of photons are pouring out everysecond.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 2008 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 2008 Don Fussell 6Strategy for todayWe’re going to build up to an approximation ofreality called the Phong illumination model.It has the following characteristics:not physically basedgives a first-order approximation to physical lightreflectionvery fastwidely usedWe will assume local illumination, i.e., lightgoes: light source -> surface -> viewer. No interreflections, no shadows.University of Texas at Austin CS384G - Computer Graphics Fall 2008 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 2008 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 withthe objectThis has some special-purpose uses, but not reallygood for drawing a scene.[Note: ke is omitted in Watt.]! I = keUniversity of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell 9Iteration oneLet’s make the color at least dependent on theoverall 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 2008 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 thespectrum I(λ).Traditionally, though, ke, ka and Ia are represented as RGBtriples, and the computation is performed on each colorchannel 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 2008 Don Fussell 11Diffuse reflectorsDiffuse reflection occurs from dull, mattesurfaces, like latex paint, or chalk.These diffuse or Lambertian reflectors reradiatelight equally in all directions.Picture a rough surface with lots of tinymicrofacets.University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell 12Diffuse reflectors…or picture a surface with little pigment particlesembedded beneath the surface (neglect reflection at thesurface for the moment):The microfacets and pigments distribute light rays in alldirections.Embedded pigments are responsible for the coloration ofdiffusely 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 2008 Don Fussell 13Diffuse reflectors, cont.The reflected intensity from a diffuse surface doesnot depend on the direction of the viewer. Theincoming light, though, does depend on thedirection of the light source:University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell 14Iteration twoThe incoming energy is proportional to cos(θ), giving thediffuse 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 2008 Don Fussell 15Specular reflectionSpecular reflection accounts for the highlight that you see on someobjects.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 determined solely by the color of the light.For metals, the color may be altered (e.g., brass)University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell 16Specular reflection “derivation”For a perfect mirror reflector, light is reflected about N, soFor a near-perfect reflector, you might expect the highlightto fall off quickly with increasing angle φ.Also known as:“rough specular” reflection“directional diffuse” reflection“glossy” reflectionif 0 otherwiseII=!="#V RlUniversity of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell 17Derivation, cont.One way to get this effect is to take (R·V),


View Full Document

UT CS 384G - Shading

Documents in this Course
Shading

Shading

27 pages

Load more
Download Shading
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 Shading 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 Shading 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?