Path Space Regularization (aka the solution to SDS paths)

Discussion related to the Engine functionality, implementations and API.
Vutshi
Posts: 15
Joined: Tue Jul 17, 2018 8:24 pm

Re: Path Space Regularization (aka the solution to SDS paths)

Post by Vutshi » Fri Sep 20, 2019 8:15 pm

B.Y.O.B. wrote:
Fri Sep 20, 2019 8:08 pm
Since LuxCore has a triangle primitive, but no sphere primitive, I would recommend to make the walls out of two triangles each.
If I remember correctly Luxrender had the sphere primitive. I wonder why it is gone. It is so satisfying to have a perfect sphere ;)

User avatar
Dade
Developer
Posts: 3381
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Path Space Regularization (aka the solution to SDS paths)

Post by Dade » Fri Sep 20, 2019 9:22 pm

provisory wrote:
Fri Sep 20, 2019 7:47 pm
Oh, I see, Dade has written OpenCL implementations from smallpt!
First OpenCL application I have ever written.
Support LuxCoreRender project with salts and bounties

User avatar
Dade
Developer
Posts: 3381
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Path Space Regularization (aka the solution to SDS paths)

Post by Dade » Fri Sep 20, 2019 9:24 pm

Vutshi wrote:
Fri Sep 20, 2019 8:03 pm
It would be interesting to compare Luxcore with the PSR enhanced smallpt.
LuxCore has Hybrid (i.e. eye + light tracing) rendering for normal caustics, it is probably 100 times faster than SmallPT+PSR.
Support LuxCoreRender project with salts and bounties

Vutshi
Posts: 15
Joined: Tue Jul 17, 2018 8:24 pm

Re: Path Space Regularization (aka the solution to SDS paths)

Post by Vutshi » Fri Sep 20, 2019 9:31 pm

Dade wrote:
Fri Sep 20, 2019 9:24 pm
LuxCore has Hybrid (i.e. eye + light tracing) rendering for normal caustics, it is probably 100 times faster than SmallPT+PSR.
What is a normal caustic?

User avatar
Dade
Developer
Posts: 3381
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Path Space Regularization (aka the solution to SDS paths)

Post by Dade » Fri Sep 20, 2019 10:35 pm

Vutshi wrote:
Fri Sep 20, 2019 9:31 pm
Dade wrote:
Fri Sep 20, 2019 9:24 pm
LuxCore has Hybrid (i.e. eye + light tracing) rendering for normal caustics, it is probably 100 times faster than SmallPT+PSR.
What is a normal caustic?
A caustic seen directly, not reflected or transmitted by a specular surface like in the pool scene.
Support LuxCoreRender project with salts and bounties

User avatar
lacilaci
Donor
Posts: 1642
Joined: Fri May 04, 2018 5:16 am

Re: Path Space Regularization (aka the solution to SDS paths)

Post by lacilaci » Sat Sep 21, 2019 5:35 am

I tried latest build and now it seems I get no "sharpening" at all.

I used settings like in your test pool scene for PSR and I get no difference between 300 or even 1000 samples

300
300.jpg
1000
1000.jpg
scene
poolwater_TESTING2.blend
(2.78 MiB) Downloaded 16 times
and if I use more extreme settings (lower speed value) I get progressively darker caustics again.

provisory
Posts: 224
Joined: Wed Aug 01, 2018 4:26 pm

Re: Path Space Regularization (aka the solution to SDS paths)

Post by provisory » Sat Sep 21, 2019 7:05 am

A forum thread from 2013 where one of the authors of the PSR paper answered some questions:
https://ompf2.com/viewtopic.php?t=1743

Maybe my question is whether directional blur has some good properties for the combination with MCMC which spatial blur does not have.
Yes, that is a very good question. In the end there is no conceptual (mathematical) difference between spatial and angular blur. Formulating the regularization as an angular blur is just much more convenient in terms of the integration process: you can easily show that both MC and (a bit more difficult) MCMC converges with such sort of regularization. Moreover you can control where and why to regularize - based on the actual underlying local BSDF.
On the other hand, as it was rightly noticed, the proposed method doesn't use any cache. However the cache seems to be not required for MCMC integration, because each Markov chain always has a cache entry, which is its current state. Thus having a lot of chains is equivalent to having a sparse yet importance-sampled distribution of paths.

As for low probability of sampling regularized paths, this is less of an issue with proper mutation strategies - once it's found, e.g. manifold exploration can easily sample all nearby paths. So, yes, that obviously causes problems when used together with MC methods, like PT and BDPT. However this probability is as low as in PPM, the only reason why we don't see this issue in PPM is due to a large cache, which highly alleviates it.

Another interesting question is the regularization of hardly-sampleable paths, e.g. for some fast preview rendering. But that first of all depends on the ultimate goal of the renderer itself and secondly the bias should be assessed, probably similarly to APPM or something like that. So, that's what's definitely not done yet.
So what's the conclusion? is this method better than BDPT? VCM? SPPM?
The conclusion is that now MLT can also sample some complex light paths, like reflected caustics from point light, prior non-sampleable by unbiased methods. The price for that of course is the bias, which occurs on such light paths (and only on them). This bias appears similarly to PPM. MLT was demonstrated on a highly occluded scene, where all ordinary Monte Carlo methods produce noisier image.
But are you sure that we cannot use MLT with Vertex Merging and that it will produce similar results... but unbiased with the constraint that it is more expensive ?
Vertex Connection and Merging never produced unbiased results AFAIK. And the "merging" in the PSR paper is mathematically very similar to the one proposed in VCM, i.e. also some perturbation of the direction. However with this formulation the "merging" can also be used with MCMC methods. The only difference is that VCM uses cache (photon map), however I employ MLT instead. MLT also has some inherent caching via current state of the Markov chain.

Vutshi
Posts: 15
Joined: Tue Jul 17, 2018 8:24 pm

Re: Path Space Regularization (aka the solution to SDS paths)

Post by Vutshi » Mon Sep 23, 2019 7:35 am

Dade wrote:
Fri Sep 20, 2019 9:24 pm
Vutshi wrote:
Fri Sep 20, 2019 8:03 pm
It would be interesting to compare Luxcore with the PSR enhanced smallpt.
LuxCore has Hybrid (i.e. eye + light tracing) rendering for normal caustics, it is probably 100 times faster than SmallPT+PSR.
I have no doubt LuxCore will be faster. I think it is interesting to compare convergence at the same spp and do it for reflected caustics which SmallPT+PSR has no problem rendering.
This is at 65k spp.
P.S. Is there any fundamental difference between the reflected caustics and the underwater caustics? It seems I can not see them if I add a thin layer of water on the bottom of the scene.
Attachments
image_new_mirr_65536.png

User avatar
Dade
Developer
Posts: 3381
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Path Space Regularization (aka the solution to SDS paths)

Post by Dade » Mon Sep 23, 2019 8:20 am

Vutshi wrote:
Mon Sep 23, 2019 7:35 am
SmallPT+PSR has no problem rendering.
This is at 65k spp.
65k samples/pixel is not exactly an usable/practical amount of samples, my tests posted here are done with about 65x less samples.
Vutshi wrote:
Mon Sep 23, 2019 7:35 am
P.S. Is there any fundamental difference between the reflected caustics and the underwater caustics? It seems I can not see them if I add a thin layer of water on the bottom of the scene.
Water can transmit or reflect while mirror can only reflect so it is likely to require 2x the amount of samples to obtain the same level of noise.
Support LuxCoreRender project with salts and bounties

Vutshi
Posts: 15
Joined: Tue Jul 17, 2018 8:24 pm

Re: Path Space Regularization (aka the solution to SDS paths)

Post by Vutshi » Mon Sep 23, 2019 8:49 am

Dade wrote:
Mon Sep 23, 2019 8:20 am
Water can transmit or reflect while mirror can only reflect so it is likely to require 2x the amount of samples to obtain the same level of noise.
I see. Then something is broken in my smallpt because it seems only reflections from the water are visible no matter how many spp.

I am curious about this darkening issue LuxCore has. If I understand correctly you said that eventually mollification will start to always return 0 and thus the image gets darker. I do not understand it. In my code if mollification returns 0 the path is just continued further according to the specular reflection/refraction law until it is killed by the Russian roulette.

Post Reply