Advanced Ray Tracer

Course: CS500

Instructor: Jorge Usabiaga

Type: Solo project

Language: C++


The goal of this course was to develop an offline advanced ray tracer from scratch. Apart from this, I had to choose a complex feature to implement in my ray tracer and make a 40 minute presentation to the rest of the class about it.

The topic I selected was CAUSTICS! The effects that the light creates when going through glass and water is awesome, so I decided to implement it and I had a lot of fun doing it! I based all my project in a paper from Siggraph 2000, A Practical Guide to Global Illumination using Photon Maps.


  • Phong illumination model.
  • Global illumination using photon mapping.
  • Caustics using photon mapping.
  • Render simple shapes: cubes, planes, spheres and ellipsoids.
  • Render 3D models using a KdTree for optimization.
  • Anti-aliasing by multi sampling each pixel randomly.
  • Multi-threading using OpenMP.
  • Reflections and refraction using Fresnel equation.
  • Hard and soft shadows.
  • Depth of field.


The images below each render are the photon maps used to generate it, global photon map and caustics photon map respectively.




Low photon number

If the photon number we are using is small, we won’t get smooth transition. Still, the results are cool 🙂


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Create a website or blog at

Up ↑