Bldir tracing v path

I’m just re-visiting Lux, and did a couple of test renders (below). What struck me is the black areas in glass when path tracing that are not there with bldir. So, I went in search of scientific information, and cam across https://www.youtube.com/watch?v=QhJhVkbCgVU.

Can someone dumb this down for me. I understood perfectly, until he started talking.

I should add, that all renders have been done with a halt condition of 3600 samples, and lux denoising.

Bidirectional tracing is good at resolving difficult light scenarios because the sampler will always know where the light is.

How it does that, it traces rays from the camera like in normal pathtracing, but it also traces rays from the light sources, using some form of MIS algorithm to connect the paths together. This allows scenes with even very small lightsources (in interior settings) to converge as a decent rate on modern machines, but the code itself is incredibly complex and can often be hard to understand after the fact.

There is a tradeoff though when it comes to shaders, and that is some flexibility/art-driven features like custom fresnal/facing effects are much harder, if not impossible to implement. Some engines with a bidir option simple disable those features altogether if that strategy is enabled.

So if you are going for PBR shaders and photo-realism, without faking, Bidir is the better option, but if you want to embrace artistic expression, path is better?

from the video, I get the impression that bidir bisects the path between camera to light and light to camera

Though, that still doesn’t explain the black in the glass. The lighting is entirely HDRI as a sunlight in lux in both renders (literally, the only change was path to bidir), so no obscured light sources.

Try to set more bounces for Specular
LightPaths->MaxBounces
Total bounces=16
Specular=12-16
Bidir makes render brighter than Path

The essence of bidirection pathtracing is…

  1. Shoot rays from camera
  2. Shoot rays from lights
  3. Connect the paths together

Because of that, many caustic and illumination effects can be done without cheats such as Filter Glossy in Cycles. It is to be noted though that Luxcore also makes use of light/photon caches that bring resolution tweaking and pre-processing steps back to the workflow (which takes care of pathtracing’s remaining weaknesses if used correctly).

As for the HDRI thing, it could be that Luxcore’s core can treat small, bright sources in the sky as a “light” as well, though I’m not sure how that all works.

Testing that now. 10 - 15 minutes

OK, job done. This is path traced with bounces as suggested by Piter. Dark spots in bidir that I hadn’t really noticed now gone.

As a note about path depth and BiDir, if BiDir has 10 eye and 10 light bounces as the maximum depth the effective depth is up to 20 bounces

To get the same possibility Path must be set to 20 as well, which can take more samples to render but the samples come a lot faster.

If you want the caustic effects and faster rendering, use hybrid path tracing, which traces both the eye and light paths, but doesn’t connect them (which is the complex and expensive part of BiDir)

1 Like