Page 1 of 2

New Random/Sobol sampler progressive, cache-friendly and OoC modes

Posted: Thu Apr 30, 2020 3:20 pm
by Dade
Introduction

This work was mostly triggered by Out-of-Core rendering but it delivers some benefit for normal rendering too.

New Random/Sobol sampler parameters

Random/Sobol samplers have been reworked to expose new parameters:

Code: Select all

# Must be power of 2
sampler.sobol.bucketsize = 16
# Must be power of 2
sampler.sobol.tilesize = 16
sampler.sobol.supersampling = 1
sampler.sobol.overlapping = 1
They offer a full freedom on how to configure the rendering (i.e. scan-line rendering, tile rendering, super-sampling, thread overlapping, etc.) but they are not intended to be exposed to the end user. Se below.

Random/Sobol sampler: "Progressive" mode (default)

Configuration:

Code: Select all

sampler.sobol.bucketsize = 16
sampler.sobol.tilesize = 16
sampler.sobol.supersampling = 1
sampler.sobol.overlapping = 1
This mode works pretty much like the previous implementation (the only difference is that instead of working with 16x1 strips, it works with 16x16 tiles):

progressive.jpg

It renders 1 sample per pixel and it cover all the image very fast.

Random/Sobol sampler: "Cache-friendly" mode (default)

Configuration:

Code: Select all

sampler.sobol.bucketsize = 1
sampler.sobol.tilesize = 16
sampler.sobol.supersampling = 1
sampler.sobol.overlapping = 32
This mode is slower (it renders about 32 samples per pixel instead of 1) to cover all the image but is more cache-friendly. If you compare the numbers with the "Progressive" mode, it is about a 5%-10% faster:

cache-friendly.jpg

Random/Sobol sampler: "Out-of-Core" mode

Configuration:

Code: Select all

sampler.sobol.bucketsize = 1
sampler.sobol.tilesize = 16
sampler.sobol.supersampling = <a number between 4 and 64, better if power of 2>
sampler.sobol.overlapping = 32
This mode is even slower (it renders about x * 32 samples per pixel instead of 1) to cover all the image and its main benefit is for OoC because most samples will reuse the same data cached from CPU ram.
I have sincerely some problem to test OoC rendering at the moment. First of all, I lack a test scene to put out of memory the 8GB of my GPU. So this topic may need some further investigation to check the results.

Conclusion

As I wrote, the UI (i.e. BlendLuxCore) should only expose 3 new options for Random/Sobol:

- Progressive
- Cache-friendly
- Out-of-Core (we may expose the "sampler.sobol.supersampling" parameter here too)

so very little complexity is exposed to the end user. And, for instance, the mode could also be forced if OoC rendering is enabled.

Re: New Random/Sobol sampler progressive, cache-friendly and OoC modes

Posted: Thu Apr 30, 2020 5:18 pm
by Sharlybg
Very great job dade !
I have sincerely some problem to test OoC rendering at the moment. First of all, I lack a test scene to put out of memory the 8GB of my GPU. So this topic may need some further investigation to check the results.
the free disney vaina movie island scen is a good choice :idea:

https://www.technology.disneyanimation.com/islandscene

Re: New Random/Sobol sampler progressive, cache-friendly and OoC modes

Posted: Thu Apr 30, 2020 6:25 pm
by Dade
Sharlybg wrote: Thu Apr 30, 2020 5:18 pm Very great job dade !
I have sincerely some problem to test OoC rendering at the moment. First of all, I lack a test scene to put out of memory the 8GB of my GPU. So this topic may need some further investigation to check the results.
the free disney vaina movie island scen is a good choice :idea:

https://www.technology.disneyanimation.com/islandscene
There isn't a LuxCore version (and you probably need a 32GB GPU to have any open of rendering a 100+GB scene).

Re: New Random/Sobol sampler progressive, cache-friendly and OoC modes

Posted: Thu Apr 30, 2020 6:26 pm
by Dade
I totally forgot to say that now CPU samplers works exactly like GPU samplers (there was some difference before).

Re: New Random/Sobol sampler progressive, cache-friendly and OoC modes

Posted: Fri May 01, 2020 6:19 am
by Odilkhan Yakubov
Sorry, i doubt it😊. What is exactly it do? Can you do some explanation with images? Thanks ;)

Re: New Random/Sobol sampler progressive, cache-friendly and OoC modes

Posted: Fri May 01, 2020 9:33 am
by Dade
Odilkhan Yakubov wrote: Fri May 01, 2020 6:19 am Sorry, i doubt it😊. What is exactly it do? Can you do some explanation with images? Thanks ;)
It changes the order pixels are rendered to improve cache usage.

Re: New Random/Sobol sampler progressive, cache-friendly and OoC modes

Posted: Fri May 01, 2020 2:35 pm
by marcatore
Dade wrote: Fri May 01, 2020 9:33 am It changes the order pixels are rendered to improve cache usage.
sorry Dade but it is still a bit unclear the advantages of this new sampler method.
I mean, except the Out-Of-Core that is quite clear, the other 2 which benefits should give us?
Cleaner images in short time?
Reduced memory footprint?

Re: New Random/Sobol sampler progressive, cache-friendly and OoC modes

Posted: Fri May 01, 2020 2:37 pm
by Dade
marcatore wrote: Fri May 01, 2020 2:35 pm
Dade wrote: Fri May 01, 2020 9:33 am It changes the order pixels are rendered to improve cache usage.
sorry Dade but it is still a bit unclear the advantages of this new sampler method.
I mean, except the Out-Of-Core that is quite clear, the other 2 which benefits should give us?
Cleaner images in short time?
Reduced memory footprint?
Short version: progressive is the same of old version, cache-friendly is slightly faster, "Out-of-Core" is for OoC rendering.

Re: New Random/Sobol sampler progressive, cache-friendly and OoC modes

Posted: Fri May 01, 2020 8:48 pm
by zuljin3d
This is not yet added to the daily blenderluxcore 2.4 builds?

Re: New Random/Sobol sampler progressive, cache-friendly and OoC modes

Posted: Fri May 01, 2020 9:10 pm
by Dade
zuljin3d wrote: Fri May 01, 2020 8:48 pm This is not yet added to the daily blenderluxcore 2.4 builds?
It is in the binaries but I don't think BlendLuxCore has been already updated.