Quasirandom sampler

Discussion related to the Engine functionality, implementations and API.
alpistinho
Posts: 69
Joined: Thu Jul 05, 2018 11:38 pm
Location: Rio de Janeiro

Re: Quasirandom sampler

Post by alpistinho » Wed Mar 06, 2019 1:07 pm

Hi,

I am using now a random value as seed for each thread and used the same Cranley-Patterson rotation implemented in SobolSequence that really helped with the visible artifacts. I have idea if that's theoretically sound, though.

The noise seems a litle bit higher to me than Sobol, but it is a bit faster (0.43 MS/s vs 0.5 MS/s). Of course all that is based on my pretty naive implementation.

R2 (6 samples/pixel)
r2.png
Sobol (6 samples/pixel)
sobol.png
R2 (16 samples/pixel)
r2_16.png
Sobol (16 samples/pixel)
sobol_16.png

alpistinho
Posts: 69
Joined: Thu Jul 05, 2018 11:38 pm
Location: Rio de Janeiro

Re: Quasirandom sampler

Post by alpistinho » Wed Mar 06, 2019 1:23 pm

I would say Sobol is still a bit better.

Both tests with 60s now
R2
r2_60s.png
Sobol
sobol_60s.png

CodeHD
Posts: 98
Joined: Tue Dec 11, 2018 12:38 pm

Re: Quasirandom sampler

Post by CodeHD » Wed Mar 06, 2019 1:32 pm

By a margin it seems ;)

Variance in two test areas, red channel (others are similar):
Sobol: 196.23 and 34.36
R2: 200.27 and 35.56
sobol_R2.png
How many samples did each render achieve in 60s?
And do you think it is the efficiency of the sampler implementation that causes some of the S/s-difference?

User avatar
lacilaci
Donor
Posts: 923
Joined: Fri May 04, 2018 5:16 am

Re: Quasirandom sampler

Post by lacilaci » Wed Mar 06, 2019 1:34 pm

sovbolVr2.gif

alpistinho
Posts: 69
Joined: Thu Jul 05, 2018 11:38 pm
Location: Rio de Janeiro

Re: Quasirandom sampler

Post by alpistinho » Wed Mar 06, 2019 1:59 pm

CodeHD wrote:
Wed Mar 06, 2019 1:32 pm
How many samples did each render achieve in 60s?
And do you think it is the efficiency of the sampler implementation that causes some of the S/s-difference?
I forgot to take notes, but it was something like 37 for Sobol and 45 for the R2.

The operations for creating a sample in R2 are simpler than Sobol's, so I guess that's where the extra speed comes from and maybe is more of a difference in a GPU implementation. About the sample quality, I don't know what exactly I could do to improve.

The new sampler currently crashes if I enable PGI

alpistinho
Posts: 69
Joined: Thu Jul 05, 2018 11:38 pm
Location: Rio de Janeiro

Re: Quasirandom sampler

Post by alpistinho » Wed Mar 06, 2019 3:24 pm

What is the easiest way to compile a debug version? I don't know how to do that using the build script.

The PGI crash is in some malloc, but the core file does not say anything besides that and I will take forever to track this down without some other clue.

Besides, if this goes nowhere, as I knew it could go, I thought about implementing this: https://graphics.pixar.com/library/Prog ... dSampling/ now that I know a bit better how the sampler works

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

Re: Quasirandom sampler

Post by B.Y.O.B. » Wed Mar 06, 2019 3:34 pm

alpistinho wrote:
Wed Mar 06, 2019 3:24 pm
What is the easiest way to compile a debug version? I don't know how to do that using the build script.
I would also be interested in this.
Support LuxCoreRender project with salts and bounties

User avatar
lacilaci
Donor
Posts: 923
Joined: Fri May 04, 2018 5:16 am

Re: Quasirandom sampler

Post by lacilaci » Wed Mar 06, 2019 3:35 pm

wow that pixar thing looks impressive :!:

CodeHD
Posts: 98
Joined: Tue Dec 11, 2018 12:38 pm

Re: Quasirandom sampler

Post by CodeHD » Wed Mar 06, 2019 3:44 pm

Yeah the paper looks quite nice. I only wish they had made some plots comparing only pmj and sobol in some detail views (i.e. the best candidates that they then mention all the time), not 15 data sets in one plot :D

This sparks another question: Which variation (if at all a variation) of Sobol does LuxCore currently use, and could that be something to improve?

acasta69
Developer
Posts: 115
Joined: Tue Jan 09, 2018 3:45 pm

Re: Quasirandom sampler

Post by acasta69 » Wed Mar 06, 2019 4:03 pm

alpistinho wrote:
Wed Mar 06, 2019 3:24 pm
What is the easiest way to compile a debug version? I don't know how to do that using the build script.
You are working on windows, right?
It should be

Code: Select all

cmake-build-x64.bat /debug
however, I have never checked the outcome of this...
Alternatively, you could do

Code: Select all

cmake-build-x64.bat /cmake-only
then open the generated solution file from Visual Studio and select debug build from the IDE.
Support LuxCoreRender project with salts and bounties

Windows 10 64 bits, i7-4770 3.4 GHz, RAM 16 GB, GTX 970 4GB v382.05

Post Reply