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 »

Mmmm, may be something related to alpha pre-multiply, I will check.
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. »

Or the brightness of the wrong imagepipeline is used?
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. »

For anyone affected by this issue:
The clamping is caused by the "transparent film" option.
You can work around the problem by doing the following:
* Disable "transparent film" in the camera settings
* Enable the "Alpha" AOV in the render layer settings
* Use the "ALPHA" output in compositing:
Attachments
2018-10-04_12-19-15.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 »

Uh, in one case you are including the GAMMA_CORRECTION plugin while your are not in the other :?:
Support LuxCoreRender project with salts and bounties
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Denoiser clamps render

Post by Dade »

Dade wrote: Mon Oct 08, 2018 4:51 pm Uh, in one case you are including the GAMMA_CORRECTION plugin while your are not in the other :?:
I will further elaborate: BCD plugin assume a gamma correction of 2.2, it will do a mess with the scale if gamma correction is not used. I will fix this behavior.

Anyway, is not using GAMMA_CORRECTION plugin intended or is it a bug ?
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. »

GAMMA_CORRECTION is not used at all when rendering inside Blender (Blender does not expect a gamma corrected image from the renderer).
So it is intended.

This is how the imagepipelines look like when defined for Blender:

Code: Select all

[LuxCore][37.933]   film.outputs.0.type = "RGB_IMAGEPIPELINE"
[LuxCore][37.933]   film.outputs.0.index = 0
[LuxCore][37.933]   film.outputs.0.filename = "RGB_IMAGEPIPELINE_0.png"

[LuxCore][37.933]   film.outputs.1.type = "RGBA_IMAGEPIPELINE"
[LuxCore][37.933]   film.outputs.1.index = 0
[LuxCore][37.933]   film.outputs.1.filename = "RGBA_IMAGEPIPELINE_0.png"

[LuxCore][37.933]   film.outputs.2.type = "ALPHA"
[LuxCore][37.933]   film.outputs.2.filename = "ALPHA.png"

[LuxCore][37.933]   film.outputs.3.type = "RGB_IMAGEPIPELINE"
[LuxCore][37.933]   film.outputs.3.index = 1
[LuxCore][37.933]   film.outputs.3.filename = "RGB_IMAGEPIPELINE_1.png"

[LuxCore][37.933]   film.imagepipelines.1.0.type = "BCD_DENOISER"
[LuxCore][37.934]   film.imagepipelines.1.0.scales = 3
[LuxCore][37.934]   film.imagepipelines.1.0.histdistthresh = 4
[LuxCore][37.934]   film.imagepipelines.1.0.patchradius = 1
[LuxCore][37.934]   film.imagepipelines.1.0.searchwindowradius = 3
[LuxCore][37.934]   film.imagepipelines.1.0.filterspikes = 1
[LuxCore][37.934]   film.imagepipelines.1.1.type = "NOP"
[LuxCore][37.934]   film.imagepipelines.1.2.type = "TONEMAP_LINEAR"
[LuxCore][37.934]   film.imagepipelines.1.2.scale = 1
[LuxCore][37.934]   film.imagepipelines.1.radiancescales.0.enabled = 1
[LuxCore][37.934]   film.imagepipelines.1.radiancescales.0.globalscale = 1
[LuxCore][37.934]   film.imagepipelines.1.radiancescales.0.rgbscale = 1 1 1

[LuxCore][37.934]   film.imagepipelines.0.0.type = "NOP"
[LuxCore][37.934]   film.imagepipelines.0.1.type = "TONEMAP_LINEAR"
[LuxCore][37.934]   film.imagepipelines.0.1.scale = 1
[LuxCore][37.934]   film.imagepipelines.0.radiancescales.0.enabled = 1
[LuxCore][37.934]   film.imagepipelines.0.radiancescales.0.globalscale = 1
[LuxCore][37.934]   film.imagepipelines.0.radiancescales.0.rgbscale = 1 1 1
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 doubt that the clamping problem is caused by the wrong gamma alone.
With the latest commit the result now looks like this:
2018-10-09_12-28-04.png
It seems that as soon as the RGBA_IMAGEPIPELINE output is added, a wrong sample scaling/clamping value for BCD is used.
edit: Hm even without RGBA_IMAGEPIPELINE and ALPHA outputs, the problem persists.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Denoiser clamps render

Post by Dade »

Well, let me finish: I have fixed gamma and ray fusion scaling problems, it should now work.
B.Y.O.B. wrote: Tue Oct 09, 2018 10:31 am It seems that as soon as the RGBA_IMAGEPIPELINE output is added, a wrong sample scaling/clamping value for BCD is used.
You don't just add RGBA_IMAGEPIPELINE, you are also switching between "path.forceblackbackground.enable = 0" to "path.forceblackbackground.enable = 1". It is the black background (lowering the average image luminance) to trigger the problem, it had nothing to do with enabling/disabling ALPHA channel.
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 09, 2018 10:48 am Well, let me finish: I have fixed gamma and ray fusion scaling problems, it should now work.
Yes, sorry. I can confirm that it's fixed now. :D
Dade wrote: Tue Oct 09, 2018 10:48 am you are also switching between "path.forceblackbackground.enable = 0" to "path.forceblackbackground.enable = 1". It is the black background (lowering the average image luminance) to trigger the problem, it had nothing to do with enabling/disabling ALPHA channel.
That was the missing piece of the puzzle.
Attachments
2018-10-09_13-02-52.png
User avatar
Dez!
Posts: 368
Joined: Sun Apr 08, 2018 1:09 am
Location: Ekaterinburg
Contact:

Re: Denoiser clamps render

Post by Dez! »

B.Y.O.B. wrote: Tue Oct 09, 2018 10:57 am That was the missing piece of the puzzle.
Happened? Can open champagne?
Linux Plasma | Ryzen 5, 32Gb, SSD M2, GT 590 RX | BenQ 27 | Wacom One | Microsoft Ergo | Tie Guan Yin tea
http://dezigner.tilda.ws/
Post Reply