1 / 32

CS361

Week 5 - Friday. CS361. Last time. What did we talk about last time? Quaternions Vertex blending Morphing Projections. Questions?. Project 2. Student Lecture: Light and Materials. Light. Light.

nysa
Download Presentation

CS361

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Week 5 - Friday CS361

  2. Last time • What did we talk about last time? • Quaternions • Vertex blending • Morphing • Projections

  3. Questions?

  4. Project 2

  5. Student Lecture: Light and Materials

  6. Light

  7. Light • [L]ight …travels so fast that it takes most races thousands of years to realise that it travels at all…. Douglas Adams • Light is one of the most complex phenomena in the universe • There are quantum effects, its dual wave/particle nature • We will constantly be approximating the effect of light, since figuring out its real effect is virtually impossible

  8. Break it down • We will consider three processes in lighting a scene • Emitting light • From the sun or light bulbs or whatever • Interaction of light • Light is absorbed by and scatters off objects in a scene • Detection by a sensor • A human eye (or a robot eye), camera, piece of film will sense the light • We have to give at least cursory attention to each process to get realistic rendering

  9. Light sources • One of the easiest light sources to model are directional lights, such as the sun • With directional lights, all the light travels the same direction, which we can model with a light vectorl • We assume that l is a unit vector • l is defined in the opposite direction the light is traveling

  10. Intensity of illumination • Besides direction, we need to know the amount of light • Radiometry is the science of measuring light, and we'll talk more about it in two weeks • Irradiance is the light's power passing through a unit area surface perpendicular to l • Light can be colored by using RGB components

  11. Surface irradiance • Most light is not perpendicular to your surface • The surface irradiance is the perpendicular irradiance times cosθ, where θ is the angle between l and the surface normal n • This is why l is the opposite of the direction of light flowing (so that we don't have to negate it) • Also, we clamp the cosθ to [0,1] (no negative values)

  12. Additive irradiance • Real light is coming from many different directions • The final effects of irradiance is additive • Just sum up all the individual light effects • Although we use RGB for light, there is not necessarily a maximum value • Light is perceived logarithmically by humans • High dynamic range displays and floating point color models can allow a better expression of light energy

  13. Material

  14. Material • Once we know how much and what direction of light we're dealing with, the material it hits impacts the final effect a great deal • These impacts are of two kinds: • Scattering • Absorption

  15. Scattering • Scattering is caused by an optical discontinuity • Difference in structure • Change in density • Scattering does not change the amount of light, only its direction • There are two types of scattering • Refraction (or transmission) • Reflection

  16. Refraction • With refraction (or transmission) in (partially) transparent objects, the light continues to go through the object and may light other objects • There are light bending effects • Plus the Z-buffer algorithm doesn't work anymore • We won't deal with that now

  17. Specular and diffuse components • Light that is reflected will have a different direction and color than light that was transmitted into the surface, partially absorbed, and scattered back out • We simplify by dividing into two terms • Specular term (the reflected light) • Diffuse term (the re-transmitted light)

  18. Exitance • Illumination reaching a surface is irradiance • Illumination leaving a surface is exitance(M) • Although our perception of light is logarithmic, light-matter interaction is linear: • Double the irradiance and you'll double the exitance • The ratio between exitance and irradiance is essentially the surface color that you see back • Surface color c = specular color + diffuse color

  19. Modeling specular color • We will often assume that diffuse light has no directionality • Specular light, however, bounces off a surface and spreads out less if the surface is smoother • Color, texture, and the smoothness parameter are not absolute • We may change them depending on how far we are from the object

  20. Sensors

  21. Don’t believe your eyes • We are going to describe mathematical models of sensors • But how did humans investigate the nature of sensors in the first place? • Can you trust your own sensors? • Consider the following slide

  22. Mach banding • That slide is an example of Mach banding • In Mach banding, a lighter color on the edge of a darker color will appear to grow lighter as you get close to the border between them • The darker color will do the reverse • It's part of our brain's edge detection algorithm

  23. Real sensors • In general, sensors are made up of many tiny sensors • Rods and cones in the eye • Photodiodes attached to a CCD in a digital camera • Dye particles in traditional film • Typically, an aperture restricts the directions from which the light can come • Then, a lens focuses the light onto the sensor elements

  24. Radiance • Irradiance sensors can't produce an image because they average over all directions • Lens + aperture = directionally specific • Consequently, the sensors measure radiance (L), the density of light per flow area AND incoming direction

  25. Idealized sensors • In a rendering system, radiance is computed rather than measured • A radiance sample for each imaginary sensor element is made along a ray that goes through the point representing the sensor and point p, the center of projection for the perspective transform • The sample is computed by using a shading equation along the view ray v

  26. Shading

  27. Shading equations • After all this hoopla is done, we need a mathematical equation to say what the color (radiance) at a particular pixel is • There are many equations to use and people still do research on how to make them better • Remember, these are all rule of thumb approximations and are only distantly related to physical law

  28. Lambertian shading • Diffuse exitanceMdiff = cdiff ELcosθ • Lambertian (diffuse) shading assumes that outgoing radiance is (linearly) proportional to irradiance • Because diffuse radiance is assumed to be the same in all directions, we divide by π (explained later) • Final Lambertian radiance Ldiff =

  29. Upcoming

  30. Next time… • Review

  31. Reminders • Keep working on Project 2, due Friday, March 1 • Review all material covered so far • Exam 1 is next Wednesday in class

More Related