3
$\begingroup$

When doing next event estimation, you trace a shadow ray to a light source to test visibility. What if there's a glass/transmissive object in the way? The light will be occluded and we won't get any caustics at all (not even talking about convergence).

Not doing next event estimation (only accounting for emission when directly hitting emissive geometry) does produce caustics though. However, not doing direct lighting estimation does hurt convergence a lot.

Isn't there some way to have caustics even with next event estimation? Would recursively tracing a ray when our shadow ray hits something until we hit an emissive object be a solution?

How does Blender do it for example?

Is bi-directional path tracing of some sort required?

There are some posts already which discuss this issue but I couldn't really find a satisfactory answer.

$\endgroup$
4
  • 1
    $\begingroup$ You combine NEE with the standard approach using multiple importance sampling. This will not improve the covergence though. Bi-directional path tracing further generalizes this. You can also look at photon mapping and vertex connection and merging. Additionally metropolis light transport and path guiding. All of the things mentioned can boost convergence. $\endgroup$
    – lightxbulb
    Commented Jun 25 at 14:25
  • $\begingroup$ @lightxbulb So do you mean that, if I'm already sampling my direct lighting with MIS BSDF + light sample, I would add another sampling strategy which is just tracing a ray recursively to try and directly hit emissive geometry? $\endgroup$ Commented Jun 25 at 15:37
  • 1
    $\begingroup$ Just read some exposition on bdpt. There are nice pictures illustrating it in Veach's thesis, in Georgiev's thesis, in pbrt, in mitsuba, etc. The simplest thing you can do is use standard solid angle sampling + NEE with MIS which would give you some of the benefits of both. This is in fact a special case of bdpt, the latter just adds extra strategies and complexity. $\endgroup$
    – lightxbulb
    Commented Jun 25 at 19:58
  • $\begingroup$ @lightxbulb Sounds good thanks! $\endgroup$ Commented Jun 26 at 5:34

1 Answer 1

4
$\begingroup$

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
enter image description here enter image description here

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):

enter image description here

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.

$\endgroup$
5
  • $\begingroup$ Is there a "naive" equivalent to the algorithm proposed in this paper? I'm thinking something very simple to start with, like lightxbulb proposed if that's a reasonable approach $\endgroup$ Commented Jun 25 at 17:19
  • 1
    $\begingroup$ I myself have implemented BDPT in my own renderer and the implementation is based on things learned from pbr-book (edition 3). In terms of difficulty, BDPT might be the one that has the most references, as pointed out by @lightxbulb. Yet BDPT is not simple either (its MIS is not). As for naive equivalent, AFAIK there is none, you can check this discussion out. Note that specular manifold sampling and path guiding both have opensource code. $\endgroup$ Commented Jun 26 at 2:02
  • 1
    $\begingroup$ Or you can try light tracing and try to merge light tracing with path tracing. $\endgroup$ Commented Jun 26 at 2:02
  • $\begingroup$ Light tracing + standard path tracing is bdpt, as is NEE + standard path tracing. It's all special cases where only some subset of the strategies are considered. $\endgroup$
    – lightxbulb
    Commented Jun 26 at 10:26
  • $\begingroup$ You bet, but BDPT surely considers more cases. The most pain-inducing ones are forward / backward PDF recording and MIS, they are basically why BDPT is so powerful but it is easy to write buggy code for them. Naively fusing light tracing and path tracing won't request that much work. $\endgroup$ Commented Jun 26 at 12:07

Not the answer you're looking for? Browse other questions tagged or ask your own question.