New RANDOM and SOBOL samplers

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

New RANDOM and SOBOL samplers

Post by Dade » Mon Jan 22, 2018 10:47 am

I'm working on a new version of samplers in order to avoid some of the regular pattern shown by SOBOL in rendering with low number of samples per pixel. This is the first result, on the left the new version, on the right the old one:
newsampler.jpg
The difference in glass is noticeable.

However there is been a surprising side effect: the new version is also faster (check the samples/sec above). I would have expected to see the new version slightly slower due to some small synchronization required. This may be explained with a better cache coherency of the new version. Anyway, I'm not going to complain :mrgreen:

The only unknown now is to see how it will work in OpenCL (the above results are on CPU). The code is on "new_samplers" branch.

P.S. at this point I may work also on a new version of the TILEPATH sampler to use Sobol sequence instead of stratification + RANDOM.
Support LuxCoreRender project with salts and bounties

User avatar
Sharlybg
Supporting Users
Posts: 688
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: New RANDOM and SOBOL samplers

Post by Sharlybg » Mon Jan 22, 2018 11:14 am

However there is been a surprising side effect: the new version is also faster (check the samples/sec above). I would have expected to see the new version slightly slower due to some small synchronization required. This may be explained with a better cache coherency of the new version. Anyway, I'm not going to complain :mrgreen:

The only unknown now is to see how it will work in OpenCL (the above results are on CPU). The code is on "new_samplers" branch.

P.S. at this point I may work also on a new version of the TILEPATH sampler to use Sobol sequence instead of stratification + RANDOM.
Like i'm going to change my name into "Reboot".
thanks viva luxcore ! :D
Support LuxCoreRender project with salts and bounties

User avatar
Dade
Developer
Posts: 1237
Joined: Mon Dec 04, 2017 8:36 pm

Re: New RANDOM and SOBOL samplers

Post by Dade » Tue Jan 23, 2018 4:47 pm

There can be great beauty even in a bug:
bug.jpg
:lol:
Support LuxCoreRender project with salts and bounties

User avatar
Sharlybg
Supporting Users
Posts: 688
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: New RANDOM and SOBOL samplers

Post by Sharlybg » Tue Jan 23, 2018 5:04 pm

a nice one ! ;)
Support LuxCoreRender project with salts and bounties

User avatar
B.Y.O.B.
Developer
Posts: 1466
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: New RANDOM and SOBOL samplers

Post by B.Y.O.B. » Tue Jan 23, 2018 5:17 pm

I really like this glitch art.
In the old ompf forum they had a whole thread for it :)
Support LuxCoreRender project with salts and bounties

User avatar
Dade
Developer
Posts: 1237
Joined: Mon Dec 04, 2017 8:36 pm

Re: New RANDOM and SOBOL samplers

Post by Dade » Tue Jan 23, 2018 6:17 pm

B.Y.O.B. wrote:
Tue Jan 23, 2018 5:17 pm
I really like this glitch art.
In the old ompf forum they had a whole thread for it :)
Yup, Sobol sampler going ballistic is classic :mrgreen:
Support LuxCoreRender project with salts and bounties

User avatar
Dade
Developer
Posts: 1237
Joined: Mon Dec 04, 2017 8:36 pm

Re: New RANDOM and SOBOL samplers

Post by Dade » Wed Jan 24, 2018 4:46 pm

Added the OpenCL support for new RANDOM and SOBOL sampler, TILEPATHCPU and TILEPATHOCL now use a Sobol sequence instead of random numbers too.

The daily nice bug:
bug.jpg
:mrgreen:
Support LuxCoreRender project with salts and bounties

Asticles
Posts: 120
Joined: Thu Jan 11, 2018 8:52 am

Re: New RANDOM and SOBOL samplers

Post by Asticles » Thu Jan 25, 2018 9:09 am

The left one seems darker to me.

Regards
Salvador Ureña

User avatar
Dade
Developer
Posts: 1237
Joined: Mon Dec 04, 2017 8:36 pm

Re: New RANDOM and SOBOL samplers

Post by Dade » Thu Jan 25, 2018 3:33 pm

I have merged the experimental branch with the new samplers with the main branch so they will be available with the next alpha.

Some result, old PATHCPU+SOBOL:
cpu-old.jpg
New PATHCPU+SOBOL:
cpu-new.jpg
New one is both faster in term of samples/secs (2.31 Vs 2.16 samples/sec) and of noise reduction (1774 Vs 1956 samples) to achieve the same level of convergence. New SOBOL rendering time 50secs Vs. 58secs.
Short version: more samples/sec and less noise with new PATHCPU+SOBOL.

Old PATHOCL+SOBOL:
gpu-old.jpg
New PATHOCL+SOBOL:
gpu-new.jpg
New one is slower in term of samples/secs (6.18 Vs 8.53 samples/sec) however it has a LOT less noise (2437 Vs 3736 samples) to achieve the same level of convergence. New SOBOL rendering time 58secs Vs. 64secs (NOTE: the GPU rendering was 384x384 while the CPU was 256x256).
Short version: less samples/sec but a lot less noise with new PATHGPU+SOBOL.
Support LuxCoreRender project with salts and bounties

User avatar
Dade
Developer
Posts: 1237
Joined: Mon Dec 04, 2017 8:36 pm

Re: New RANDOM and SOBOL samplers

Post by Dade » Thu Jan 25, 2018 3:35 pm

Keep in main that all this was started to remove regular patterns from Sobol sampler, something I have achieved (as far as I know). So the shorter rendering times are a kind of free bonus.
Support LuxCoreRender project with salts and bounties

Post Reply