Denoiser clamps render

Use this forum for general user support and related questions.
User avatar
Dade
Developer
Posts: 1530
Joined: Mon Dec 04, 2017 8:36 pm

Re: Denoiser clamps render

Post by Dade » Tue Oct 02, 2018 4:12 pm

Dez! wrote:
Tue Oct 02, 2018 4:29 am
https://mega.nz/#!sgQHCKgY!A7OcgHh7zsUW ... vHNu_rBD2M

In this scene (project), if you remove the World - there will be an error of a denoiser
You are using some extreme setting for the denoiser, in particular, using a 12 search radius window makes everything veeeeery slow. Anyway, it works fine here with the default denoiser parameter:
scr.jpg
I'm still unable to understand if there is a problem or not.
Support LuxCoreRender project with salts and bounties

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

Re: Denoiser clamps render

Post by B.Y.O.B. » Tue Oct 02, 2018 4:25 pm

I can reproduce the problem.
I rendered inside Blender.
Attachments
denoised.png
denoised
combined.png
noisy
noisy_minus_denoised.png
noisy minus denoised
Support LuxCoreRender project with salts and bounties

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

Re: Denoiser clamps render

Post by Dade » Tue Oct 02, 2018 4:29 pm

B.Y.O.B. wrote:
Tue Oct 02, 2018 4:25 pm
I can reproduce the problem:
The black background becoming white ?!?
Support LuxCoreRender project with salts and bounties

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

Re: Denoiser clamps render

Post by B.Y.O.B. » Tue Oct 02, 2018 4:30 pm

Dade wrote:
Tue Oct 02, 2018 4:29 pm
The black background becoming white ?!?
The denoised output does not have an alpha channel, while the noisy output has.
Support LuxCoreRender project with salts and bounties

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

Re: Denoiser clamps render

Post by Dade » Tue Oct 02, 2018 4:32 pm

B.Y.O.B. wrote:
Tue Oct 02, 2018 4:30 pm
Dade wrote:
Tue Oct 02, 2018 4:29 pm
The black background becoming white ?!?
The denoised output does not have an alpha channel, while the noisy output has.
And one has bloom, the other doesn't, where is the problem ?
Support LuxCoreRender project with salts and bounties

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

Re: Denoiser clamps render

Post by B.Y.O.B. » Tue Oct 02, 2018 8:20 pm

I can only reproduce the problem in Blender.
In luxcoreui, everything is fine.

Here is a side by side comparison of raw and denoised output.
Image pipeline plugins disabled (apart from linear tonemapper).
No Blender compositing applied.

Maybe the error is somewhere in the LuxCore output -> Blender pass conversion?
Attachments
problem_focus1.png
problem_focus_2.png
Support LuxCoreRender project with salts and bounties

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

Re: Denoiser clamps render

Post by Dade » Tue Oct 02, 2018 10:06 pm

B.Y.O.B. wrote:
Tue Oct 02, 2018 8:20 pm
I can only reproduce the problem in Blender.
In luxcoreui, everything is fine.
This is a very good hint of where the problem is and explain why I have never seen this problem.
B.Y.O.B. wrote:
Tue Oct 02, 2018 8:20 pm
Here is a side by side comparison of raw and denoised output.
Image pipeline plugins disabled (apart from linear tonemapper).
No Blender compositing applied.

Maybe the error is somewhere in the LuxCore output -> Blender pass conversion?
Something in gamma correction/luminance adaption required by blender ? Just do a simple test: enable a .png output in LuxCore an check of a .png saved by Blender differ from the .png saved by LuxCore. If it differs, there is something going wrong.
Support LuxCoreRender project with salts and bounties

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

Re: Denoiser clamps render

Post by B.Y.O.B. » Wed Oct 03, 2018 2:37 pm

When I disable "transparent film", the bug does not appear anymore.
So a workaround is to render without transparent film, but enable the Alpha AOV and use the latter in compositing.

I'll investigate what exactly goes wrong in this case.
Note: transparent film is disabled when exporting for luxcoreui, so it could be that the problem also affects luxcoreui, it just does not appear because of different imagepipeline setup.
Support LuxCoreRender project with salts and bounties

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

Re: Denoiser clamps render

Post by Dade » Wed Oct 03, 2018 2:43 pm

B.Y.O.B. wrote:
Wed Oct 03, 2018 2:37 pm
When I disable "transparent film", the bug does not appear anymore.
What do you mean with "transparent film" ?
Support LuxCoreRender project with salts and bounties

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

Re: Denoiser clamps render

Post by B.Y.O.B. » Wed Oct 03, 2018 3:45 pm

It is an option in the Blender addon.
If enabled, it adds an RGBA_IMAGEPIPELINE that is used to obtain the "Combined" image in Blender (the noisy output).

What I observe is that with the "transparent film" option enabled, the sample scale value is higher than in luxcoreui, but the sample max. value is the same:

Blender:
- sample scale: 3.8712
- max. value: 2.5
luxcoreui:
- sample scale: 0.859767
- max. value: 2.5

When I disable transparent film, Blender also uses 0.859767 as sample scale.

By the way, the gamma here is hardcoded to 2.2, is that correct or should we get it from the imagepipeline?
https://github.com/LuxCoreRender/LuxCor ... r.cpp#L182
(I doubt it has something to do with the issue, just stumbled upon it)
Support LuxCoreRender project with salts and bounties

Post Reply