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

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

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

Post by Dade » Thu Apr 30, 2020 3:20 pm

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
Posts: 2158
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 » 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
Support LuxCoreRender project with salts and bounties

Portfolio : https://www.behance.net/DRAVIA

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

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

Post by Dade » Thu Apr 30, 2020 6:25 pm

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
Posts: 4521
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

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

Post by Dade » Thu Apr 30, 2020 6:26 pm

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: 118
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 » Fri May 01, 2020 6:19 am

Sorry, i doubt it😊. What is exactly it do? Can you do some explanation with images? Thanks ;)
Allah bless us!

CPU: Core 2 Quad Q6600 @2.4Ghz
GPU: MSI GTX 1060 6Gb GDDR5 192bit
RAM: 3Gb DDR2 800Mhz (too old :( )
OS: Win10 Pro 64bit build 1607 2017 Rus
Blender: 2.83 & 2.90 alpha (E-Cycles version)
LuxCore: v2.4 (official)

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

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

Post by Dade » Fri May 01, 2020 9:33 am

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
Posts: 430
Joined: Wed Jan 10, 2018 8:04 am

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

Post by marcatore » 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?

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

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

Post by Dade » Fri May 01, 2020 2:37 pm

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: 53
Joined: Sun Apr 08, 2018 12:13 pm

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

Post by zuljin3d » Fri May 01, 2020 8:48 pm

This is not yet added to the daily blenderluxcore 2.4 builds?
Actualy sorry for my google translate english :)

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

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

Post by Dade » Fri May 01, 2020 9:10 pm

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