Convergence based adaptive sampling

Discussion related to the Engine functionality, implementations and API.
User avatar
B.Y.O.B.
Developer
Posts: 1310
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Convergence based adaptive sampling

Post by B.Y.O.B. » Sat Feb 17, 2018 10:45 am

Here is the .blend with everything packed in.
https://www.dropbox.com/s/ud3i6bik6vag0 ... blend?dl=1
Support LuxCoreRender project with salts and bounties

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

Re: Convergence based adaptive sampling

Post by Dade » Sat Feb 17, 2018 5:28 pm

B.Y.O.B. wrote:
Sat Feb 17, 2018 10:36 am
The images I posted are taken after about 30min on a HD 7970, so around 2000 samples.
In that stage of the rendering most pixels are noise-free apart from the area on the bottom, and the sampler focuses too much on the bright areas.
You are not setting the halt threshold parameter so the default value (0.02) is used. This is a bad idea for a long rendering as, once all the pixels are under the default threshold, SOBOL will just revert to uniform sampling.

You should set the threshold with your desired target, for instance 1/256 or slightly less for a still image. 1/256 = about 0.0039 (it is a lot less than 0.02,the default value). With a threshold of 0.003, the sample distribution is quite good:
thres.jpg
Support LuxCoreRender project with salts and bounties

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

Re: Convergence based adaptive sampling

Post by B.Y.O.B. » Sat Feb 17, 2018 5:36 pm

Alright, thanks for the advice.
Support LuxCoreRender project with salts and bounties

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

Re: Convergence based adaptive sampling

Post by Asticles » Sat Feb 17, 2018 7:22 pm

Can this be selected by user from blender interface?
It would be useful.
Salvador Ureña

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

Re: Convergence based adaptive sampling

Post by B.Y.O.B. » Sat Feb 17, 2018 7:50 pm

Yes, I started to work on it: https://github.com/LuxCoreRender/BlendLuxCore/issues/32
It will be available in the next release.

Because of the re-packaging the first commit on this already slipped into the alpha5 release, but it still has bugs (e.g. the noise level is supposed to be divided by 256, but it is not...)
Support LuxCoreRender project with salts and bounties

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

Re: Convergence based adaptive sampling

Post by Asticles » Sat Feb 17, 2018 8:30 pm

Sorry, can you explain more the noise threshold values?

5 (default) is considered final quality? Maybe should be some presets (preview, low, medium, final). Or something like that.

For people like me, that are only artists. :P

Regards.
Salvador Ureña

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

Re: Convergence based adaptive sampling

Post by Asticles » Sat Feb 17, 2018 8:32 pm

Also, an estimated time to reach the threshold would be great.

Best regards.
Salvador Ureña

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

Re: Convergence based adaptive sampling

Post by Dade » Sat Feb 17, 2018 11:13 pm

Asticles wrote:
Sat Feb 17, 2018 8:30 pm
Sorry, can you explain more the noise threshold values?

5 (default) is considered final quality? Maybe should be some presets (preview, low, medium, final). Or something like that.

For people like me, that are only artists. :P
This:
Dade wrote:
Fri Feb 02, 2018 11:51 am
P.S. a note about convergence threshold: it is written as 0.02 but should be read as 5.12 level difference in an 8bit RGB color. It is a lot easier to understand if it is seen as a value between 0 and 255 divided by 256.
Just think an RGB 8b color: 0 is the perfect convergence, 1/256 is only one level of noise (practically perfect) and so on. For animations, you want to use quite higher values (5/256 or more).

Keep in mind that achieving the perfect convergence (i.e. 0) is often impossibile due to numerical errors. 1/256 may be quite hard too. 2/256 or 3/256 is a bit more practical for still images.
Support LuxCoreRender project with salts and bounties

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

Re: Convergence based adaptive sampling

Post by Dade » Sat Feb 17, 2018 11:15 pm

Asticles wrote:
Sat Feb 17, 2018 8:32 pm
Also, an estimated time to reach the threshold would be great.
Unfortunately, it is not known. Noise is reduced with the square root of the sample count (in theory) so I can try to put together an estimation but it is likely to be quite not accurate.
Support LuxCoreRender project with salts and bounties

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

Re: Convergence based adaptive sampling

Post by B.Y.O.B. » Sat Feb 24, 2018 8:09 am

Dade wrote:
Sat Feb 17, 2018 5:28 pm
You are not setting the halt threshold parameter so the default value (0.02) is used.
Can you add an option to control this "halt threshold without actual halting"?
Or can I already achieve this with the current properties?
Support LuxCoreRender project with salts and bounties

Post Reply