english français NEW! WEBGL Path tracer available here

Ray Tracing and Path Tracing

During the second year at ESIR, I made a ray tracing rendering engine with a co-worker. We developed it incrementally, starting from a simple ray tracing engine with Phong diffuse and specular colors to a path tracing engine with BRDF and real-time support. We developed it in C++.
During the third and last year at ESIR, I participated in an industrial project about image synthesis as well. Here is three images of the same scene. One only by colors, the second with Phong shader and the last just adds a tweaky hack named soft shadow which is basically ambient.
Ray Tracing Cornel Box
Ray Tracing Cornel Box Phong Shader
Ray Tracing Cornel Box Phong Shader Soft Shadow
A more complicated scene with emissive lightning, specular surfaces and textures. Naturally, we added acceleration structures to speed up the rendering, a BVH Bounding Volume Hierarchy coupled with an SAH Surface-Area Heuristic which we can see below, first without SAH, last with. Note how the bounding boxes better correlate with the scene geometry.
Ray Tracing Tibet House
Ray Tracing Tibet House BVH
Ray Tracing Tibet House BVH SAH
We then added indirect lightning, light surface, stratification of lights and pixels (to reduce variance between samples) and refraction. We also defined few more primitives such as spheres, annulus and cylinders to get perfect shapes. This engine embed a real-time visualizer thanks to upscaling, providing a more fluid camera. Hence, many features are toggled by keyboard.
Path Tracing Cornel Box Primitives
Path Tracing Corridor
Path Tracing Crocodile Transparent
Path Tracing Bathroom
Path Tracing Gif Video Render Bubble Transparent Refraction
We added realtime support in our application, which permitted us to debug and place components easily. It also helped to choose precisely rendering options. This real time feature achieve to have good performances thanks to an automatic decrease of the number of sent rays when moving the camera. The image will auto scale back to normal on stop, allowing an infinite number of passes and antialiasing. Last year at ESIR embedded an industrial project proposed by an enterprise. The latter where I participated was proposed by Chaos Czech which develop the Corona Renderer. This project driven by four persons consists in implementing Optimal Multiple Importance Sampling in a bidirectional path tracer. It is also totally necessary to be unbiased. Here are presented the steps of the project, beginning with a small skill upgrading embedding Multiple Importance Sampling, Light Tracing and Bidirectional Path Tracing. The MIS which was implemented using two sampling methods, the one of the BSDFs and the one of the lights that we can observe with 64 passes below respectively. The scene below is similar to the one proposed by Veach and Guibas, four spheres of color, four surfaces with more and more mate BSDFs. The last image corresponds to the weights determined by the balance heuristic.
Path Tracing Veach BSDF Sampling
Path Tracing Veach Light Sampling
Path Tracing Veach Balance Heuristic Weight Multiple Importance Sampling MIS
Here are the renders of the same scene with a classic path tracer and the one with MIS. The last image is the subtraction of the two others to verify that there is no bias.
Path Tracing Veach
Path Tracing Veach Multiple Importance Sampling MIS
Path Tracing Veach Multiple Importance Sampling MIS Unbiased
Here are the effects of the weights of each sampling method and the final result with 2048 passes (500s).
Path Tracing Multiple Importance Sampling MIS BSDF
Path Tracing Multiple Importance Sampling MIS Light
Path Tracing Multiple Importance Sampling MIS Balance Heuristic High Quality
The BDPT is implemented with the balance heuristic. It allows complex paths like caustics to be traced which is necessary in some scenes. Here are successively Naive Path Tracing, Light Tracing and Bidirectional Path Tracing rendered with a high number of passes : 1024. The BDPT is the fusion of PT an LT in a sense that it computes all the possibilities of sampling a single path with these two techniques. A path of 7 vertices can be sampled using 7 combinations, starting from [s=0;t=7] to [s=6;t=1] where s is the number of light vertices and t is the number of camera vertices (radiance and importance). The pdf of the current path with the current sampling is computed by studying all the other ways to sample this path by using forward and reverse pdf.
Naive Path Tracing Caustic
Light Tracing Caustic
Bidirectional Path Tracing Multiple Importance Sampling
The complete minimization of Monte Carlo estimator variance with the releasing of the weighting constraint between 0 and 1 proposed by Kondapaneni et. al. led once again to a better variance minimization of rendered images. This method is based on the estimation of a linear system with de number of passes which permits to calculate the optimal weights to apply.
Two different sampling Path Tracing Technique Sampling Path Tracing Technique Sampling
Balance heuristic Balance Heuristic Multiple Importance Sampling MIS
Optimal weights Balance Heuristic Optimal Multiple Importance Sampling OptiMIS MIS
Our task was to implement this method in a BDPT.
To do this, the main contributions were : This total integration gave very satisfying results in simple paths (direct lightning i.e. with an optimal sampling technique) but not with more complex path such as caustics.
Glass Caustic Rendered Bidirectional Path Tracer