OpenImageDenoise

Discussion related to the Engine functionality, implementations and API.
User avatar
epilectrolytics
Donor
Donor
Posts: 272
Joined: Thu Oct 04, 2018 6:06 am

Albedo dispersion noise

Post by epilectrolytics » Fri Feb 08, 2019 4:56 pm

Experimenting with BiDir, Dispersion and OIDN and found a problem:
With dispersion the bounced albedo pass gathers dispersion noise.
This prevents the denoiser from denoising the refractive surfaces.
Suggestion: disable dispersion when rendering albedo AOV.
combined.png
Top image: Combined channel with noise.
Middle image: Denoised channel with smooth caustics but disperion noise in glass.
Bottom image: Albedo channel with dispersion noise in glass.
MBPro 15" 16GB i7-4850HQ GT750M, MacOS 10.13.6 _________________Win10Pro PC 16GB Ryzen 2700X, RTX 2070, GTX 1060

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

Re: OpenImageDenoise

Post by B.Y.O.B. » Fri Feb 08, 2019 5:15 pm

I have also found that noise in the albedo AOV really wrecks OIDN (understandably, as the albedo AOV is supposed to be noise-free).
Glass with its partly transmissive and partly reflective behaviour is especially problematic. Maybe the reflective part should be ignored when computing the albedo AOV?
Support LuxCoreRender project with salts and bounties

User avatar
epilectrolytics
Donor
Donor
Posts: 272
Joined: Thu Oct 04, 2018 6:06 am

Re: OpenImageDenoise

Post by epilectrolytics » Fri Feb 08, 2019 5:23 pm

We need more testing with this.
Maybe we need bouncing albedo as an additional AOV to simple albedo like with normal and average normal to choose from.
MBPro 15" 16GB i7-4850HQ GT750M, MacOS 10.13.6 _________________Win10Pro PC 16GB Ryzen 2700X, RTX 2070, GTX 1060

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

Re: OpenImageDenoise

Post by lacilaci » Fri Feb 08, 2019 5:28 pm

well it is true that noisy albedo and normal aovs do more damage than none.

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

Re: Albedo dispersion noise

Post by Dade » Fri Feb 08, 2019 8:23 pm

epilectrolytics wrote:
Fri Feb 08, 2019 4:56 pm
Experimenting with BiDir, Dispersion and OIDN and found a problem:
With dispersion the bounced albedo pass gathers dispersion noise.
This prevents the denoiser from denoising the refractive surfaces.
Suggestion: disable dispersion when rendering albedo AOV.
I explain the situation:

- Mirror material: Mirror is only a possible outgoing direction given an input so there is no noise at all in Albedo AVO.

- Glass material: Glass is only 2 possible outgoing directions (reflection or transmission) given an input so there is very little noise. With only 2 options, you just need few samples to have a noise free solution.

- Glass material with dispersion: here we hare, you can have reflection or transmission but, for transmission, you have to sample all the possible wave length visible to human eye. All wave lengths between 380nm and 780nm. It requires a lot of samples.

"disable dispersion when rendering albedo AOV" is not possible because the index of refraction changes with the wavelengths so it is a different rendering.
So the only alternative I see at the moment is to just return black glass+dispersion like the original Albedo AOV: or we have noise, or we have black glass+dispersion.
Support LuxCoreRender project with salts and bounties

User avatar
epilectrolytics
Donor
Donor
Posts: 272
Joined: Thu Oct 04, 2018 6:06 am

Re: Albedo dispersion noise

Post by epilectrolytics » Fri Feb 08, 2019 9:25 pm

Dade wrote:
Fri Feb 08, 2019 8:23 pm
- Glass material with dispersion: here we hare, you can have reflection or transmission but, for transmission, you have to sample all the possible wave length visible to human eye. All wave lengths between 380nm and 780nm. It requires a lot of samples.

"disable dispersion when rendering albedo AOV" is not possible because the index of refraction changes with the wavelengths so it is a different rendering.
So the only alternative I see at the moment is to just return black glass+dispersion like the original Albedo AOV: or we have noise, or we have black glass+dispersion.
I see, thanks for explaining.

EDIT:
I have situations where the dispersion noise does not affect the denoiser, but these are lucky hits.

So it should be optional, like a checkbox in the denoiser tab for simple dispersion Albedo (disables bouncing Albedo for dispersion materials).

The other materials like mirror and nondispersive glass could remain with tracing.
Or is this not possible to differentiate on a material basis but only globally?

Then we would need a global setting like a general Deep Albedo AOV checkbox.
MBPro 15" 16GB i7-4850HQ GT750M, MacOS 10.13.6 _________________Win10Pro PC 16GB Ryzen 2700X, RTX 2070, GTX 1060

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

Re: Albedo dispersion noise

Post by Dade » Fri Feb 08, 2019 10:25 pm

epilectrolytics wrote:
Fri Feb 08, 2019 9:25 pm
The other materials like mirror and nondispersive glass could remain with tracing.
Or is this not possible to differentiate on a material basis but only globally?
Yes, I was suggesting to have "black" glass in Albedo AOV if, and only if, it has dispersion.
Support LuxCoreRender project with salts and bounties

User avatar
epilectrolytics
Donor
Donor
Posts: 272
Joined: Thu Oct 04, 2018 6:06 am

Re: Albedo dispersion noise

Post by epilectrolytics » Fri Feb 08, 2019 11:24 pm

Dade wrote:
Fri Feb 08, 2019 10:25 pm
Yes, I was suggesting to have "black" glass in Albedo AOV if, and only if, it has dispersion.
OK, an automatic opt-out and no need for a checkbox: this is a very good compromise. :)
MBPro 15" 16GB i7-4850HQ GT750M, MacOS 10.13.6 _________________Win10Pro PC 16GB Ryzen 2700X, RTX 2070, GTX 1060

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

Re: Albedo dispersion noise

Post by Dade » Sat Feb 09, 2019 3:51 pm

Dade wrote:
Fri Feb 08, 2019 10:25 pm
Yes, I was suggesting to have "black" glass in Albedo AOV if, and only if, it has dispersion.
I have applied this change.
Support LuxCoreRender project with salts and bounties

voxelium
Posts: 3
Joined: Tue Feb 05, 2019 10:50 pm

Re: OpenImageDenoise

Post by voxelium » Sun Feb 10, 2019 11:44 pm

You shouldn't use "black" for dielectrics. It may work but that's probably a coincidence ;) Use an albedo of 1 instead. I'll update the documentation very soon with more details.

Post Reply