Page 3 of 4

Re: Denoiser clamps render

Posted: Wed Oct 03, 2018 10:03 pm
by Dade
Mmmm, may be something related to alpha pre-multiply, I will check.

Re: Denoiser clamps render

Posted: Wed Oct 03, 2018 11:13 pm
by B.Y.O.B.
Or the brightness of the wrong imagepipeline is used?

Re: Denoiser clamps render

Posted: Thu Oct 04, 2018 10:23 am
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:

Re: Denoiser clamps render

Posted: Mon Oct 08, 2018 4:51 pm
by Dade
Uh, in one case you are including the GAMMA_CORRECTION plugin while your are not in the other :?:

Re: Denoiser clamps render

Posted: Mon Oct 08, 2018 4:58 pm
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 ?

Re: Denoiser clamps render

Posted: Mon Oct 08, 2018 5:01 pm
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

Re: Denoiser clamps render

Posted: Tue Oct 09, 2018 10:31 am
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.

Re: Denoiser clamps render

Posted: Tue Oct 09, 2018 10:48 am
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.

Re: Denoiser clamps render

Posted: Tue Oct 09, 2018 10:57 am
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.

Re: Denoiser clamps render

Posted: Wed Oct 10, 2018 6:14 am
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?