Adaptive sampling improvements

Discussion related to the Engine functionality, implementations and API.
User avatar
alpistinho
Developer
Posts: 175
Joined: Thu Jul 05, 2018 11:38 pm
Location: Rio de Janeiro

Re: Adaptive sampling improvements

Post by alpistinho » Sun Apr 14, 2019 3:46 pm

provisory wrote:
Sun Apr 14, 2019 8:13 am
I've uploaded the - slightly modified - scene. (I've removed the textures, hdri, and other unrelated things.)
Thanks for the scene.

I've tested it and the first problem I am seeing is that although the adaptive has more samples in some regions, those are still noisier than the the non-adaptive version. I am probably doing something stupid for that to be the case.

Besides, the tonemapping interferes with the noise estimation. I will try to fix that after I find the other issue
Support LuxCoreRender project with salts and bounties

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

Re: Adaptive sampling improvements

Post by provisory » Sun Apr 14, 2019 4:27 pm

Thanks for the scene.
It doesn't matter, that it uses bidir, does it?

User avatar
alpistinho
Developer
Posts: 175
Joined: Thu Jul 05, 2018 11:38 pm
Location: Rio de Janeiro

Re: Adaptive sampling improvements

Post by alpistinho » Sun Apr 14, 2019 4:34 pm

provisory wrote:
Sun Apr 14, 2019 4:27 pm
It doesn't matter, that it uses bidir, does it?
The adaptiveness does work with bidir, I don't really know if there may be some other interaction with MIS or something like that.
@Dade may be able to offer some input.

If you have a scene that shows this using Path, it would be nice. This one has too many fireflies when using path, due to the occluded light, so it is harder to evaluate
Support LuxCoreRender project with salts and bounties

User avatar
B.Y.O.B.
Developer
Posts: 3027
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Adaptive sampling improvements

Post by B.Y.O.B. » Sun Apr 14, 2019 5:41 pm

From what I know, with Bidir only about half the samples can be adaptive (the ones shot from the camera).
Support LuxCoreRender project with salts and bounties

User avatar
alpistinho
Developer
Posts: 175
Joined: Thu Jul 05, 2018 11:38 pm
Location: Rio de Janeiro

Re: Adaptive sampling improvements

Post by alpistinho » Sun Apr 14, 2019 6:01 pm

B.Y.O.B. wrote:
Sun Apr 14, 2019 5:41 pm
From what I know, with Bidir only about half the samples can be adaptive (the ones shot from the camera).
Yes, I know. I just don't know what other effects this causes on the rendering. I've checked the SAMPLECOUNT and even with like 60% more samples the adaptive is still noisier. Something is wrong
Support LuxCoreRender project with salts and bounties

User avatar
alpistinho
Developer
Posts: 175
Joined: Thu Jul 05, 2018 11:38 pm
Location: Rio de Janeiro

Re: Adaptive sampling improvements

Post by alpistinho » Tue Apr 16, 2019 12:23 am

As I suspected, there is something wrong.

This behavior is not present on the RANDOM sampler and simply enabling the adaptiveness does not increase the noise. The adaptive Sobol sampler is worse than Random.

I was suspecting that somehow the pass variable was not being incremented correctly, but it does not seem to be the case.

I will keep investigating and hope to find the issue soon.

Random - Uniform sampling:
RGB_IMAGEPIPELINE_uniform_random.png
Random - Adaptive sampling:
RGB_IMAGEPIPELINE_adaptive_random.png
Sobol - Uniform:
RGB_IMAGEPIPELINE_uniform_sobol.png
Sobol - adaptive sampling:
RGB_IMAGEPIPELINE_adaptive_sobol.png
Support LuxCoreRender project with salts and bounties

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

Re: Adaptive sampling improvements

Post by provisory » Tue Apr 16, 2019 8:50 am

A test with Path engine (Sobol, 100 samples). For this one I've set Null (Transparent) material to the shade.

As I see, adaptive is noisier here too.
adaptivity-test5.png

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

Re: Adaptive sampling improvements

Post by Dade » Tue Apr 16, 2019 9:04 am

alpistinho wrote:
Tue Apr 16, 2019 12:23 am
As I suspected, there is something wrong.
Note: before yesterday, Random/Sobol where still asking for Convergence AOV instead of the new Noise AOV so adaptive sampling was just disabled by default (because Noise AOV was not allocated).
Support LuxCoreRender project with salts and bounties

User avatar
alpistinho
Developer
Posts: 175
Joined: Thu Jul 05, 2018 11:38 pm
Location: Rio de Janeiro

Re: Adaptive sampling improvements

Post by alpistinho » Tue Apr 16, 2019 9:14 am

Dade wrote:
Tue Apr 16, 2019 9:04 am
Note: before yesterday, Random/Sobol where still asking for Convergence AOV instead of the new Noise AOV so adaptive sampling was just disabled by default (because Noise AOV was not allocated).
Thanks, I saw the barrage of fixes you did to my code.

I think that since I was listing the NOISE channel explicitly it was working anyway, or the SAMPLECOUNT would be uniform, but I've did these tests using the most recent commits.
provisory wrote:
Tue Apr 16, 2019 8:50 am
A test with Path engine (Sobol, 100 samples). For this one I've set Null (Transparent) material to the shade.

As I see, adaptive is noisier here too.
Thanks for the test. If you can, give Random a try just to confirm my findings. I am almost positive that there is something wrong on the Sobol sampler
Support LuxCoreRender project with salts and bounties

User avatar
FarbigeWelt
Donor
Posts: 893
Joined: Sun Jul 01, 2018 12:07 pm
Location: Switzerland
Contact:

Re: Adaptive sampling improvements

Post by FarbigeWelt » Tue Apr 16, 2019 9:38 am

alpistinho wrote:
Tue Apr 16, 2019 9:14 am
I am almost positive that there is something wrong on the Sobol sampler
What if Sobol acts contrary, I mean adaptive 0.0 in blendluxcore
pushes Sobol to be perfectly adaptive and vice a versa?
Light and Word designing Creator - www.farbigewelt.ch - aka quantenkristall || #luxcorerender
160.8 | 42.8 (10.7) Gfp | Windows 10 Pro, intel i7 4770K@3.5, 32 GB
2 AMD Radeon RX 5700 XT, 8 GB || Gfp = SFFT Gflops

Post Reply