CS488 - Introduction to Computer Graphics - Lecture 26
Comments and Questions
Review
- Distribution Ray Tracing
- Bi-directional ray tracing
- Office hours
Lighting
Participating Media
What is fog?
- Lots of little water droplets
- Light gets scattered
What is beer?
- Lots of little colour centres
- Light gets absorbed
What they have in common is
- The farther light goes the more likely it is to get scattered or
absorbed.
- The property is described by Beer's Law (named after August Beer, no
relation)
- I(x) ~ exp( -k(\lambda) x )
What happens to the light that doesn't make it through?
Shadows
What is a shadow?
Shadows come `for free' in the ray tracer.
- Can we make them fast enough to use with OpenGL?
Yes. The methods, in increasing order of cost.
- Projective shadows
- Project silhouette of shadowing object onto shadowed object
- Draw a dark area where shadow lies, using alpha blending unless you
are trying to get the `deep space' look
- Easy for simple objects onto onto simple objects, ...
- What about meshed objects?
Notice that we know a lot about how to project.
- Shadow maps
How does this interact with scan conversion?
What if the light is inside the view frustrum?
- Shadow volumes
- Project from light as for shadow maps
- Define a set of polygons that are the boundaries of the volume that
is in shadow.
- Front-facing wrt eye +1
- Back-facing -1
- Count along the ray from eye to point, staring with zero
- If > 0 in shadow
- If 0 in light
Comment on global illumination. If you are doing a walk-through, you can
calculate the illumination on each polygon once, then re-project the scene
from different viewpoints as the user moves around.
Light Fields
This is a way to avoid even the need to re-project.
Let's turn our attention away from the surfaces of objects and onto the
volume between objects
At every point in this volume there is a light density
- for every possible direction
- for every visible wavelength
This quantity L(P, theta, lambda ) is the light field. If we knew it we
could
- evaluate it at the eye position
- at the angle heading for each pixel
- to get RGB for that pixel
The evaluation is, in fact, just a projective transformation of the light
field.
How do we get the light field?
- by measurement
- by calculation
How is the light field used in 2007?
But tomorrow!!
Radiosity
Surface Properties
Texture Mapping
- Basic
- Start with a 2D image: pixellated or procedural
- Map 2D image onto primitive using a 2D affine transformation
- Simple if the surface of the primitive is flat
- otherwise, ...
- Texture pixels normally do not match display pixels, so some
image processing may be needed.
- Backwards map intersection point with ray into the image to get the
surface properties
- Normal Mapping (Bump mapping)
- Start with a difference surface, defined with respect to the
surface
- Calculate the normals to the difference surface and map them onto
the surface of the primitive
- Use the mapped surface models for lighting
- No occlusion, shadows are wrong, silhouettes are wrong, nobody
notices!
- Solid Textures
- Solution to mapping texture onto curved surfaces
- Usually procedural
(Un)natural Phenomena
Refraction
Subsurface Scattering
Return to: