Denoiser clamps render

Use this forum for general user support and related questions.
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Denoiser clamps render

Post by Dade »

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
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Denoiser clamps render

Post by B.Y.O.B. »

I can reproduce the problem.
I rendered inside Blender.
Attachments
denoised
denoised
noisy
noisy
noisy minus denoised
noisy minus denoised
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Denoiser clamps render

Post by Dade »

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
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Denoiser clamps render

Post by B.Y.O.B. »

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.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Denoiser clamps render

Post by Dade »

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
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Denoiser clamps render

Post by B.Y.O.B. »

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
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Denoiser clamps render

Post by Dade »

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
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Denoiser clamps render

Post by B.Y.O.B. »

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.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Denoiser clamps render

Post by Dade »

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
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Denoiser clamps render

Post by B.Y.O.B. »

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)
Post Reply