Bidirectional path tracing is not required, but it would be good to have one if you have free time to kill (since it is complex):
BDPT |
PT |
|
|
It's obvious that for complex situations (the ray penetrates 6 layers of medium interfaces), caustics under the jugs can be successfully rendered yet PT completely fails. Yet surely as you say, for simpler cases (like a glass sphere) PT might work, too.
@lightbulb offered some choices, but as you know:
- Photon mapping is quite bidirectional, as you will first trace photon pass and cache all the photons in a tree, which is even more laborous.
- Metropolis light transport is a very good method for rendering caustics, yet it is also complex and might have more inferior results in caustics-free scenes.
Here are two other possible ways:
Specular manifold exploration
Check Specular Manifold Exploration for more details. This method can be integrated into a undirectional PT. Simply put, the algorithm works in the following way. Let's take a look at the simple example setup where we consider the NEE problem in a refractive medium. As you can see in the figure, the direct connection is blocked due to the medium interface and this direction is simply invalidated, due to refraction. Yet we know that this scene is actually very simple, if we can find a refraction light path, the NEE problem is solved. So we will take a manifold walk on the geometry (through tangential steps and projection, etc.), starting from an incorrect path and converging to the correct root (yes, this is a root finding problem):
Also, you can check this 2D-manifold-visualizer they offered. They even have built-in MNEE.
Blender
Blender supports path guiding. Path guiding is a way to: (1) trace adjoint paths and record incident rays to train a (typically) probability mixture model, and then during path tracing, we query the space of the current hit point and sample from the mixture to get better ray directions (whose sampling probability better approximate the Monte Carlo integrand and thus has lower variance). I can't find the option on my device since my blender is too old (3.0), I think it is supported since 3.6 or 3.7? Can't recall, but I do have used this before. MNEE is also supported since 3.2 for caustics rendering.
Path guiding is not so easy to implement, since not only should you construct a spatial partitioning structure, you might also need to partition the direction space. Training the mixture (or neural net) also takes some time. Yet if you work on Intel CPU (I know you don't since your path tracer is based on HITRT), intel does provide a library for path guiding.