View on GitHub

462graphicsXtension

Assignment 5 of graphics - by Dhruv Saksena (dsaksena)

Download this project as a .zip file Download this project as a tar.gz file

Final Report

As proposed before (proposal at bottom) I implemented a ray tracer with photon mapping.

Extra Credit- Did a twist on photon Mapping, treating stored photons as indirect light sources of bi-directional path-tracing.

Building instructions

fully same drill as asst3 to make

code at /afs/cs/academic/class/15462-f15-users/dsaksena/asst5

cd build

cmake ..

make

make install

./pathtracer -s 64 -t 8 ../dae/sky/CBspheres.dae

best results for 10,000,000 photons and k-NN (k = 64)

Over assignment 3 key controls we have also new keys in RENDER mode (should've pressed R)

Key Effect
n/N Decrease k or radius
m/M Increase k or radius
l/L num_photons/10
;/: num_photons*10
j/J num_photons*2
k/K toggle k-nn/fixed radial search
p/P toggle bi-directional

Results

As can be seen below i get as better results than forward path-tracing as we have better caustics from the Glass ball now than path-tracer

Rendering by Photon Mapping using 4,000,000 photon kd-tree and 32-NN

Rendering without Photon Mapping

Photon Visualization

Design

Improvements to be made

Hacks

1) Magic Constant PHOTON_MAP_BOOST used to correct the low radiance given by photon-map

2) For faster collection of photons russian roulette skipped for MIN_PHOTON_BOUNCES could contribute to above low radiance but not the main factor already checked

Image perturbed by magic constant:

Proposal

  1. I will be working alone, focusing on implementing Photon Mapping in option F: Advanced Monte Carlo Rendering. Reading the wiki I expect it to be a 2 step process. My extension will be implementing these 2 steps fully.
    • First Pass send a packet of photons from the light source and make a cache for results (photons eliminated using Russian Roulette) Cache modeled as a KD-tree as proposed by wiki.
    • Second Pass calculate indirect illumination using photon map. Using KNN algo.
  2. If instructors agree I will have full credit on implementing photon mapping correctly and then I would like to work on extra credit (because I need it and want it :) )

  3. I will firstly work on bidirectional path tracing as extra credit.

  4. Secondly, since I was a 418 student, I shall like to implement Efficient BVH Construction via Approximate Agglomerative Clustering for more extra credit.

  5. I really don't expect to reach here but if I do I like Option I: kPhone 869 (15-869 Assignment) especially since I will join Apple GPU Compute team to work on Iphones. More extra credit I hope.

If the instructors agree to this proposal great, otherwise if they feel photon mapping is not enough workload I can do bidirectional path tracing or Efficient BVH Construction via Approximate Agglomerative Clustering for normal credit as well.