Denoiser clamps render

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

Re: Denoiser clamps render

Post by Dade » Wed Oct 03, 2018 10:03 pm

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
Posts: 1823
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 11:13 pm

Or the brightness of the wrong imagepipeline is used?
Support LuxCoreRender project with salts and bounties

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

Re: Denoiser clamps render

Post by B.Y.O.B. » Thu Oct 04, 2018 10:23 am

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
Support LuxCoreRender project with salts and bounties

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

Re: Denoiser clamps render

Post by Dade » 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 :?:
Support LuxCoreRender project with salts and bounties

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

Re: Denoiser clamps render

Post by Dade » Mon Oct 08, 2018 4:58 pm

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

Re: Denoiser clamps render

Post by B.Y.O.B. » Mon Oct 08, 2018 5:01 pm

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
Support LuxCoreRender project with salts and bounties

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

Re: Denoiser clamps render

Post by B.Y.O.B. » Tue Oct 09, 2018 10:31 am

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.
Support LuxCoreRender project with salts and bounties

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

Re: Denoiser clamps render

Post by Dade » Tue Oct 09, 2018 10:48 am

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

Re: Denoiser clamps render

Post by B.Y.O.B. » Tue Oct 09, 2018 10:57 am

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
Support LuxCoreRender project with salts and bounties

User avatar
Dez!
Posts: 101
Joined: Sun Apr 08, 2018 1:09 am
Location: Ekaterinburg
Contact:

Re: Denoiser clamps render

Post by Dez! » Wed Oct 10, 2018 6:14 am

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 Gnome | Dell Inspiron 7000 | Wacom
http://dezigner.tilda.ws/

Post Reply