280 likes | 287 Views
Explore radiative heat transfer, modeling photons and light transport, Lambertian scatter, BRDF implementation, and texture mapping in computer graphics. Learn about shaders, lighting, BRDFs, and the power of texture mapping in rendering.
E N D
Illumination and Direct Reflection Kurt Akeley CS248 Lecture 12 1 November 2007 http://graphics.stanford.edu/courses/cs248-07/
Quantum electrodynamics We’re not going to talk about this
Our premise Goals: • Communicate, take advantage of human perception, and/or • Model reality Radiative heat-transfer approximation • Treat light as packets of energy (photons) • Model their transport as a flow Simplifications: • Ignore QED effects • Diffraction, interference, polarization, … • Assume geometric optics • Photons travel in straight lines • Intensities can be added
Solid angles Area=1
dA r Radiant Intensity (point source, nonuniform)
Illumination (point source) Of an oriented unit area by a point light source Projected area factor definition n l r cancellation dot product def.
Radiance is distance invariant Sample color value is determined by radiance • Distance doesn’t matter • Intuitively doubling the distance • Reduces the energy from a unit area by factor of 4 • Increases the area “covered” by the sample by a factor of 4 Multi-sample antialiasing filters radiance values Why does a fire feel warmer, but have the same radiance (apparent brightness), when you are closer to it?
Diffuse reflection Scatter proportion • Function of θr • Invariant to θi n Goniometric diagram(Lambertian scatter)
Diffuse reflection prev. slide cancellation
Lambertian radiance n n Goniometric diagram(Lambertian scatter) Lambertian scatter Lambertian Radiance
Isotropic scatter (dusty surface) n n Goniometric diagram(Lambertian scatter) Radiance Isotropic scatter
Retroreflection (2-D) The moon is actually somewhat retroreflective
BRDF Relates • Incoming irradiance to • Outgoing radiance Degrees of freedom • 4 in general (anisotropic) • 3 in isotropic case • Add one for spectral Isotropic:
Anisotropic Texture filtering (2 lectures ago) Surface characteristics
Texture mapping Paints images onto triangles Paints images onto points, lines, and other images Ties the vertex and pixel pipelines together • Rendered images can be used as textures • To modify the rendering of new images • That can be used as textures … Implements general functions of one, two, or three parameters • Specified as 1-D, 2-D, or 3-D tables (aka texture images) • With interpolated (aka filtered) lookup Drives the hardware architecture of GPUs • Multi-thread latency hiding • “shader” programmability Adds many capabilities to OpenGL • Volume rendering • Alternate color spaces • Shadows …
Shading vs. lighting Lighting • Light transport • Interaction of light with surfaces Shading • Interpolation of radiance values • Examples: • Smooth shading (aka Gouraud Shading) • Flat shading (aka constant shading) Shader • Program run per vertex/primitive/fragment • Really more of a “lighter” than a “shader”
Summary Diffuse lighting • Radiance specified by n•l • Cosine fall-off is due to irradiance, not scattering • Many factors are ignored (often even the r2 fall-off) Bidirectional reflectance distribution function (BRDF) • Ratio of reflected radiance to incident irradiance • Integrate over all incident light to get reflected radiance • 5 DOF including spectral information • 3 DOF for isotropic, non-spectral Texture mapping is a powerful, general-purpose mechanism • It’s not just painting pictures onto triangles!
Assignments Next lecture: Z-buffer Reading assignment for Tuesday’s class • FvD 15.1 through 15.5