Hi,
I have been investigating this topic lately and wanted to discuss if we have some reasonable way to implement that.
1st idea:
I basically stole Cycles implementation (https://developer.blender.org/D2149)
The idea is basically to use a blue noise mask to offset the samples between pixels. Instead of using a white RNG to apply the Cranley-Patterson rotation, I am using a blue-noise mask (the same as Cycles).
This seems to work ok and it is not a huge cost (basically a fetch from a matrix instead of a random number generation)
Limitations:
[*] I had to disable the pass scrambling, which generates correlation artifacts for LIGHTCPU and PATHCPU. Maybe only applying the pass scrambling for the light path is a sensible solution, but the interface does get a bit weird.
[*] This only improves for low sample counts. It degrades to white noise as rendering goes on.
Comparison:
At 1spp:
At 4spp:
2nd idea
I tried implementing the method described in A Low-Discrepancy Sampler that Distributes Monte Carlo Errors as a Blue Noise in Screen Space (Eric Heitz et al.)
They have a sample code that I've hacked into Luxcore, but although the convergence might be a little bit better, I don't see an obvious blue noise appearance such as the one they display in the paper (https://belcour.github.io/blog/research ... noise.html)
I am probably doing something stupid.
Any suggestions are welcome.
Blue noise dithered Sobol
- alpistinho
- Developer
- Posts: 198
- Joined: Thu Jul 05, 2018 11:38 pm
- Location: Rio de Janeiro
- alpistinho
- Developer
- Posts: 198
- Joined: Thu Jul 05, 2018 11:38 pm
- Location: Rio de Janeiro
Re: Blue noise dithered Sobol
Not yet, but the reports from Cycles is that blue noise improves denoise performance.
I will check it
I will check it
Re: Blue noise dithered Sobol
P.S. I hardly see any improvement compared to normal SOBOL (but it is a while I have some serious doubt about the utility of Blue noise) however this may be a better method to solve the sample correlation problem, you should try some glass and/or long path rendering where the old code still shows some correlation
- alpistinho
- Developer
- Posts: 198
- Joined: Thu Jul 05, 2018 11:38 pm
- Location: Rio de Janeiro
Re: Blue noise dithered Sobol
The improvement is only for very low sample counts.
I can see that the pattern is a bit more pleasing, but it is not a huuuge deal.
I actually made the newer paper method work:
(Besides having the blue-noise properties it also uses Owen-scrambled Sobol points, so it should have somewhat better convergence properties, mostly on smooth gradients)
16 spp: 128 spp: I am using the new method for the first 256 samples and then revert to the usual one.
About the correlation issue, do you have a specially problematic scene for me to test?
I can see that the pattern is a bit more pleasing, but it is not a huuuge deal.
I actually made the newer paper method work:
(Besides having the blue-noise properties it also uses Owen-scrambled Sobol points, so it should have somewhat better convergence properties, mostly on smooth gradients)
16 spp: 128 spp: I am using the new method for the first 256 samples and then revert to the usual one.
About the correlation issue, do you have a specially problematic scene for me to test?
Re: Blue noise dithered Sobol
The reflections on the glass seem to have much less noise in the new method.
I'm seeing some repeating patterns in the noise in the upper left.
But I'm unsure if this is caused by the sampler or by the wall bump texture, I think it was tiled in this old version of the scene, although I don't think the tiles were this small. You could try the updated scene where the wall texture is no longer tiled: https://github.com/LuxCoreRender/LuxCor ... romage.zip
I'm seeing some repeating patterns in the noise in the upper left.
But I'm unsure if this is caused by the sampler or by the wall bump texture, I think it was tiled in this old version of the scene, although I don't think the tiles were this small. You could try the updated scene where the wall texture is no longer tiled: https://github.com/LuxCoreRender/LuxCor ... romage.zip
- alpistinho
- Developer
- Posts: 198
- Joined: Thu Jul 05, 2018 11:38 pm
- Location: Rio de Janeiro
Re: Blue noise dithered Sobol
Hi,
The both sampling are tiled over 128x128 pixels, so it is completely reasonable that there are correlation artifacts.
I will download the new scene to test.
About the noise, it is most likely due to the Owen scrambling. I saw the same effect when using my PMJ02 patch
The both sampling are tiled over 128x128 pixels, so it is completely reasonable that there are correlation artifacts.
I will download the new scene to test.
About the noise, it is most likely due to the Owen scrambling. I saw the same effect when using my PMJ02 patch
- alpistinho
- Developer
- Posts: 198
- Joined: Thu Jul 05, 2018 11:38 pm
- Location: Rio de Janeiro
Re: Blue noise dithered Sobol
Hi,
Now I've hacked it into my PMJ02 patch:
I'm doing the same thing we do with the current sobol samples. Applying the Cranley-Patterson rotation to the samples but using the blue mask.
According to the Siggraph "My favorite samples" panel we have to apply this rotation but only inside each stratum, so there might be some margin for improvement here
16 spp: 128 spp:
Now I've hacked it into my PMJ02 patch:
I'm doing the same thing we do with the current sobol samples. Applying the Cranley-Patterson rotation to the samples but using the blue mask.
According to the Siggraph "My favorite samples" panel we have to apply this rotation but only inside each stratum, so there might be some margin for improvement here
16 spp: 128 spp:
Re: Blue noise dithered Sobol
In the examples you show I don’t see the same effect as in cycles at all, there must be something different because with Cycles you can see the "gif" effect in no time, meanwhile in those tests the dithering effect is barely present, so something is off with the implementation, may be because of the way Lux samples lights? Because Insee a lot of noise from the light in the Cornell box example, but there is something definitely wrong with this.
Do you have at hand the blend file for the Cornell box? I would like to try to reproduce the example with the exact same scene, because the benefit is way more than the one visible here, definitely.
BTw thanks for looking into this
Do you have at hand the blend file for the Cornell box? I would like to try to reproduce the example with the exact same scene, because the benefit is way more than the one visible here, definitely.
BTw thanks for looking into this