Project #5 - Math 155B - Student: Tim Wernette

Path tracing implimentation

  • For this project I decided to implement path tracing and proper integration of diffuse area lights.  
    I had also planned to implement the Shlick reflection model, but due to time constraints, it didn’t work out.
    For those who don't know, path tracing is a form of distributed ray tracing.  It makes it possible to compute 
    any type of light interaction. It is a ray tracing method that can pretty much do anything.  The radiosity we
    learned in class is a subset. The algorithm itself is easy to implement.  Basically a straight forward 
    extension to ray tracing.  The only hard part is doing it right and making sure you're energy 
    balance equation(the rendering equation, the radiance equation) is properly implemented.
    
    
    Basically, it attempts to integrate all possible paths of light through a pixel.  
    It does so by computing random paths of light(usually 100's or 1000's), then averaging the results.
    The basic test scene for global illumination is the Cornell box, it's a box with two diffuse colored walls 
    and some sort of object in it, to be the recipient of the diffuse interreflection.
    
    First, this is the box without global illumination.
    
    
  •  Just for kicks I thought I'd render the box with ONLY indirect illumination. Note how much light is not captured by local illumination models.
    
  •  This is the same box with both direct and indirect illumination.
  •  
    With path tracing implementation up and running I started work on my scene, it's not really that much.  
    I wanted to combine my cse 169 animation project with my graphic project.  I made a cloth simulation in 
    cse 169 this quarter for my final project, so I decided it would be neat to make a table cloth out of it.  
    Unfortunately it was a bit more blocky then I'd like, but I still think it looks cool.  I decided it would
    be neat to put some sort of refracting dielectric in the scene.  I decided to put my favorite drink, 
    scotch(Black label to be exact) on the table.  The Fresnel term controls the relative amount of reflection to refraction,
     and coors law of attenuation is responsible for the attenuating effect of the liquid.  The environment map
     outside the window is actually pictures from my new favorite game HL2.  
    
     First, here is a shot of the entire model, environment map included.  Note the grainy-ness of the scene, 
    this is a common artifact of Monte Carlo integration schemes.  As I said before, path tracing attempts to 
    trace all possible light paths through a pixel and it does so by randomly sampling many paths and averaging 
    them together.  When the number of paths is to small, high frequency noise is the result.  Basically you get
     the “channel 3” effect.
    
  •  This Here is the scene rendered from inside looking to the table.
  •  Here is a close up of the Whiskey glass, the noise here is a result of Russian roulette on the path rays, 
    It’s unavoidable unless you sample more to remove it, but I gotta turn this in before I graduate.  The caustics 
    are computed using photon mapping as path tracing is highly inefficient for computing caustic paths.