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

Discussion related to the LuxCore functionality, implementations and API.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

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

Post 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.
Support LuxCoreRender project with salts and bounties
User avatar
Sharlybg
Donor
Donor
Posts: 3101
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

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

Post 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
Support LuxCoreRender project with salts and bounties

Portfolio : https://www.behance.net/DRAVIA
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

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

Post 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).
Support LuxCoreRender project with salts and bounties
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

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

Post by Dade »

I totally forgot to say that now CPU samplers works exactly like GPU samplers (there was some difference before).
Support LuxCoreRender project with salts and bounties
User avatar
Odilkhan Yakubov
Posts: 208
Joined: Fri Jan 26, 2018 10:07 pm
Location: Tashkent, Uzbekistan

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

Post by Odilkhan Yakubov »

Sorry, i doubt it😊. What is exactly it do? Can you do some explanation with images? Thanks ;)
___________________________________________________________________________
LuxCoreRender Developer for Blender
___________________________________________________________________________
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

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

Post 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.
Support LuxCoreRender project with salts and bounties
marcatore
Donor
Donor
Posts: 463
Joined: Wed Jan 10, 2018 8:04 am

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

Post 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?
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

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

Post 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.
Support LuxCoreRender project with salts and bounties
zuljin3d
Posts: 76
Joined: Sun Apr 08, 2018 12:13 pm
Location: Moscow

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

Post by zuljin3d »

This is not yet added to the daily blenderluxcore 2.4 builds?
Actualy sorry for my google translate english :)
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

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

Post 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.
Support LuxCoreRender project with salts and bounties
Post Reply