Ray Tracing

dof_middle.JPG

Ray Casting

As a first step toward a full featured ray-tracer, handle the intersection with sphere, box, cylinder and triangle objects.

 

Read and parse the scene described in the text file, build an internal representation of the scene, ray-cast it, and output the final image into an HDR image file.

 

Using spatial data structure, BVH, could've accelerate the calculation of a ray's intersection with a collection of objects. Moreover, I used OpenMP to parallelize the main loop. 

Path Tracing

From the camera in the scene, shoot a ray and iterate it through a series of bounces, recording and returning any light found.

I used simple BRDF(Bidirectional Reflection Distribution Function), Lambertian diffuse surface.

Reflection

From the Path trace above, just added to calculate outgoing light.

Moreover, I learned how to calculate the 3 different types of BRDF, which is Phong, GGX and Beckman. The easiest was Phong, but recently, graphics has been trending toward GGX method.

ray_casting.PNG
path_tracing.PNG
pass_4096_phong_sphere.PNG
pass_4096_beckman.PNG

Texture Mapping

4096_phong.JPG

Depth Of Field

dof_.JPG