Implementation History

Implementation History

Date Implementation History
23 July 2006 Project started
July-Aug 2006 Mathematical theory of SH functions, lighting equation, Monte Carlo integration etc.


Derive efficient recurrence for SH evaluation in real basis.

Aug 2006 Code for lighting SH coefficients — standalone program.

Use light probes from Paul Debevec, SH coeffs found using code modified from Ravi Ramamoorthi’s.  Our code works to any SH degree.

15 Sept 2006 Code for reading polygon mesh files
18 Sept 2006

 Diffuse Unshadowed Transfer (Using shader language GLSL).

Code capabilities:

 Unshadowed SH coefficients computed per-frame in GLSL to degree 4.

  • Swtich light probes at run time.
  • Switch scene / object at run time.
  • Mouse handler to control scene rotation. (from 3d Labs Demo)
22 Sept 2006 Texture map light probe to sphere
25 Sept 2006 Replace drawing objects with VertexArray
28 Sept 2006 Simple ray tracing — spheres and boxes.
10  Oct 2006 Wigner-D matrix (rotation) via general recurrence to arbitrary SH degree.
Oct 2006 Improve efficiency of light probe file read / SH calculation and merge into main SH project.
12  Oct 2006


 Diffuse Shadowed Transfer (in CPU).

Code capabilities — as for unshadowed case, plus:

 Shadowed SH coefficients precomputed via per-vertex ray casting / Monte Carlo integration.

  • Shadowed SH coeffs rotated by Wigner D-matrix at run time, shadowed vertex colours computed in CPU.
  • Switch SH degree at run time.
  • Switch shading models (SH shadowed / SH unshadowed / standard OpenGL) at run time.
16  Oct 2006 Improve ray tracing method: eliminate objects behind ray origin.
17 Nov 2006 SH degree arbitrary in all parts of code, systematic mechanism for changing.
25 Nov 2006


 Diffuse Interreflected Transfer (in CPU).

Code capabilities — as for shadowed case, plus:

 Interreflected coeffs precomputed via 2nd ray trace.

  • Switch shading models (SH interreflected / Interreflected only / SH shadowed / SH unshadowed / standard OpenGL) at run time.
  • Circular light window added as alternative to light probes. SH coeffs computed at runtime by efficient recurrence — so aperture can be varied in real time.
29 Nov 2006 Write & read .PLY files using RPLY library (Diego Nehab), including shadowed and interreflected SH coeffs.
Dec 2006 Ray tracing arbitrary polygon mesh objects; save hit records to improve speed of ray trace for interreflected transfer.
Jan 2007 Re-structure the program to more OO flavour.



 Code is now data-centric, not function-centric.  Module interdependencies clarified and reduced.

Added all-of-scene data structure & allow whole scene with SH coeffs to be read / written to file.

22 Nov 2007 Uniform Grid Subdivision (UGS) ray tracing implemented successfully.
25 Nov 2007 Succeed switching to 3ds format for mesh objects
28 Nov 2007 Switch to command-line parse