CS488 - Introduction to Computer Graphics - Lecture 23

Comments and Questions


  1. Projects
  2. List of objectives
  3. Office hours

More Ray Tracing

Recursive Ray Tracing

Just what the name says, but why would you do it?

  1. Unusual light paths for illumination, such as colour bleeding, reflection

Surface Normals

Implicit surfaces, i.e., given by f(Q) = 0.

Transforming the normal vector

  1. Under an affine transformation, M, Q goes to MQ, and Q' goes to M(Q').
  2. The new tangent, n1, is defined by n1.M(Q'-Q) = 0.
  3. Notice the structure: contravariant versus covariant.

Constructive Solid Geometry (CSG)

Geometric primitives can make other geometric primitives by

  1. union
  2. intersection
  3. subtraction

The result is like sculpting; the problem is that describing the result is very difficult; the solution is

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

Speeding Up Intersection Tests

  1. Bounding Volumes (usually Boxes)
    1. Find the smallest - or close to smallest - regular volume that encloses the object
    2. Use ray-intersect-volume as a pretest for fast negative results.
    3. Trade-off between
      • benefit of quicker `miss'detection
      • cost of getting a good bounding surface
      • Both increase as complexity of primitive increases

    Scene subdision

    1. Divide the scene volume into sub-volumes: many ways to do it, such as
      • quad-trees
      • oct-trees
      • BSP trees
      • ...
    2. List all primitives by sub-volume.
    3. Only test primitives in the sub-volumes through which a ray passes.

Return to: