Page 8 of 15

Re: Adaptive sampling improvements

Posted: Sun Apr 14, 2019 3:46 pm
by alpistinho
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

Re: Adaptive sampling improvements

Posted: Sun Apr 14, 2019 4:27 pm
by provisory
Thanks for the scene.
It doesn't matter, that it uses bidir, does it?

Re: Adaptive sampling improvements

Posted: Sun Apr 14, 2019 4:34 pm
by alpistinho
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

Re: Adaptive sampling improvements

Posted: Sun Apr 14, 2019 5:41 pm
by B.Y.O.B.
From what I know, with Bidir only about half the samples can be adaptive (the ones shot from the camera).

Re: Adaptive sampling improvements

Posted: Sun Apr 14, 2019 6:01 pm
by alpistinho
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

Re: Adaptive sampling improvements

Posted: Tue Apr 16, 2019 12:23 am
by alpistinho
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

Re: Adaptive sampling improvements

Posted: Tue Apr 16, 2019 8:50 am
by provisory
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

Re: Adaptive sampling improvements

Posted: Tue Apr 16, 2019 9:04 am
by Dade
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).

Re: Adaptive sampling improvements

Posted: Tue Apr 16, 2019 9:14 am
by alpistinho
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

Re: Adaptive sampling improvements

Posted: Tue Apr 16, 2019 9:38 am
by FarbigeWelt
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?