Page 2 of 4

Re: Denoiser clamps render

Posted: Tue Oct 02, 2018 4:12 pm
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.

Re: Denoiser clamps render

Posted: Tue Oct 02, 2018 4:25 pm
by B.Y.O.B.
I can reproduce the problem.
I rendered inside Blender.

Re: Denoiser clamps render

Posted: Tue Oct 02, 2018 4:29 pm
by Dade
B.Y.O.B. wrote: Tue Oct 02, 2018 4:25 pm I can reproduce the problem:
The black background becoming white ?!?

Re: Denoiser clamps render

Posted: Tue Oct 02, 2018 4:30 pm
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.

Re: Denoiser clamps render

Posted: Tue Oct 02, 2018 4:32 pm
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 ?

Re: Denoiser clamps render

Posted: Tue Oct 02, 2018 8:20 pm
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?

Re: Denoiser clamps render

Posted: Tue Oct 02, 2018 10:06 pm
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.

Re: Denoiser clamps render

Posted: Wed Oct 03, 2018 2:37 pm
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.

Re: Denoiser clamps render

Posted: Wed Oct 03, 2018 2:43 pm
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" ?

Re: Denoiser clamps render

Posted: Wed Oct 03, 2018 3:45 pm
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)