New Random/Sobol sampler progressive, cache-friendly and OoC modes
Posted: 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:
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:
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):
It renders 1 sample per pixel and it cover all the image very fast.
Random/Sobol sampler: "Cache-friendly" mode (default)
Configuration:
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:
Random/Sobol sampler: "Out-of-Core" mode
Configuration:
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.
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
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
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
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
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.