CS488 - Introduction to Computer Graphics - Lecture 18

Comments and Questions

  1. Mid-term

Lighting

Bidirectional Ray Tracing

Recursive ray tracing makes a tree with a big fan-out: Cost ~ n^d ~ exp( d*log(n) ) where d is the depth, the number of recursions, n is the fan-out, the number of rays sent out from each point each time the algorithm recurses..

Bright idea

  1. Trace out from eye
  2. Trace out from sources of illumination
  3. Match the rays in the centre ... somehow!
  4. The resulting double cone gets the same performance at Cost ~ n^(d/2) ~ exp( (d/2)*log(n) ), which is surely worth it.

The problem is step 3. How do you match the rays? The current state of the art is photon mapping.

Here's how it works.

From every light source

For each pixel

Notice tuning and calibration needed.

What creates the caustics?

Something important has happened here. We have separated rendering into two parts.

  1. Lighting: spreading light around the scene from the sources
  2. Rendering: calculating how much of the spread around light gets to the eye.

Participating Media

Colouring the light

What is beer?

  1. Lots of little colour centres
  2. Light gets absorbed
  3. The farther light goes the more likely it is to get absorbed.
  4. And there is self-screening: the farther you have gone the less light there is to get absorbed
  5. The property is described by Beer's Law (named after August Beer, no relation)

What happens to the light that doesn't make it through?

Scattering the light

What is fog?

  1. Lots of little water droplets
  2. Light gets scattered
  3. The farther light goes the more likely it is to get scattered.
  4. And there is self-screening: the farther you have gone the less light there is to get scattered.
  5. The property is described by Beer's Law

What happens to the light that doesn't make it through?

Refracting the light

Snell's law

Caustics

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.

  1. Projective shadows

    Notice that we know a lot about how to project.

  2. Shadow maps
  3. Shadow volumes

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


Texture Mapping

  1. Basic
    1. Start with a 2D image: pixellated or procedural
    2. 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.
    3. Backwards map intersection point with ray into the image to get the surface properties
  2. Normal Mapping (Bump mapping)
    1. Start with a difference surface, defined with respect to the surface
    2. Calculate the normals to the difference surface and map them onto the surface of the primitive
    3. Use the mapped surface models for lighting
    4. No occlusion, shadows are wrong, silhouettes are wrong, nobody notices!
  3. Solid Textures
    1. Solution to mapping texture onto curved surfaces
    2. Usually procedural

Return to: