Moments in Graphics
A blog by Christoph Peters

Path tracing lectures

Published 2024-12-19

Earlier this year, I prepared lectures on path tracing for master students at TU Delft. We decided to make recorded versions of these lectures available to the general public. I also wrote a simple Vulkan path tracer for illustrations in the lectures, which is open source now. You can watch the lectures on YouTube (113 minutes) to learn about basic principles of path tracing and all the importance sampling strategies that go into the path tracer. Then you can dig into the code to see how they are implemented. The first lecture is similar in scope to part 2 of my path tracing workshop. It ends with a naive path tracer. Part 2 dives into importance sampling strategies that achieve considerably lower noise at the same computational cost: BRDF importance sampling, light sampling and the combination of these two strategies using multiple importance sampling and next-event estimation. These contents are similar to what I had in mind for part 3 of the path tracing workshop.

Compared to the workshop, the format is a bit different here: There are no Shadertoy exercises but the lectures provide fairly specific guidelines for an implementation and the lecture website has links to the code for each step. If you have a bit of experience with computer graphics or were able to follow my path tracing workshop, following these lectures should not be a problem.

The path tracer itself can be thought of as solid baseline but nothing more. It is kept simple and there are many reasonable ways to extend it: Currently, all surfaces must use the Frostbite BRDF and light sources must be spherical. In terms of sampling strategies, stratification, path guiding or ReSTIR could help to accelerate convergence. And there is no denoiser, only progressive rendering. On the other hand, the implementation is pretty well-optimized and the GLSL code should be quite easy to read and comprehend after watching the lectures. The code base is new but similar in spirit to my previous toy renderer. It uses C, Vulkan, GLFW and the same model file format. Nuklear took the place of Dear ImGui. Eventually, I might implement a few more advanced techniques in a branch or write a few blog posts about certain aspects.

Images

Slide
Figure 1: A slide from part 2 of the lecture.
Render
Figure 2: A rendered image from the path tracer.