Path Tracing (path)

Scene File Inputs

Vanilla Ray Tracer

Figure 1: The Cornell Box rendering at 1000 spp, Russian Roulette with 95% probability with indirect lighting and no other optimization. One can see that the diffuse effect and the color bleeding is functional.

Direct lighting

The figure below shows the CornellBox illuminated with direct lighting only, direct lighting global illumination, and indirect lighting.

Figure 2: The CornellBox with 1000 spp and uniform hemisphere sampling. (The direct lighting only is brighter due to the tone mapping)

Different Type of Material

The figure below show the rendering of variation of Cornell Boxes with different material. Although the sample per pixel is the same, we can see that the quality of the image differs in each case, this can be resolved to some extend with the importance sampling.

Figure 3: The direct lighting global illumination of diffuse material, mirror material, glossy material, and refraction material. respectively. 1000 spp is used for each image.

Importance Sampling

Figure 4: (left) Cornell Box with 1000spp and unifrom sampling. (right)The same scene with the left but with importance sampling.

Figure 5: (left)Glossy-specular Cornell Box with 1000spp and unifrom sampling. (right)The same scene with the left but with importance sampling.

Figure 6: (left) Mirror Cornell Box with 1000spp and unifrom sampling. (right)The same scene with the left but with importance sampling.

Figure 7: (left) Refractive Cornell Box with 1000spp and unifrom sampling. (right)The same scene with the left but with importance sampling.

Stratified Sampling

(Apparently this doesn't really improve the image quality that much.)

Figure 8: (left)Glossy-specular Cornell Box with 1000spp and importance sampling. (right)The same scene with the left but with stratified sampling with 100 subpixels.

Multiple Importance Sampling

In this case, we consider the combination of the diffuse and specular material. One can see that the noise on the box is greatly reduced. (This is the same .obj file with CornellBox-Gloosy but taking diffusive coefficient into the consideration.)

Figure 9: (left)Glossy-specular with diffuse coefficient Cornell Box with 1000spp and importance sampling. (right)The same scene with the left but with multiple importance sampling

Implementation detail:

file and the pathtracer.cpp file. Currently, util/helper.cpp deal with the helper function that doesn't take in the detail about the path tracing such as the random