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
Egert_Kanep
Posts: 237
Joined: Tue Mar 13, 2018 10:34 am

Denoiser clamps render

Post by Egert_Kanep »

It seems like denoiser clamps bright parts of my images, I rendered image in 16 bit and used mostly area lights. When I used HDR image, it was working fine. Also sometimes denoiser doesn't start so I have to re render my image again.
Attachments
denoiser_problem.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 »

Egert_Kanep wrote: Mon May 28, 2018 9:27 pm It seems like denoiser clamps bright parts of my images, I rendered image in 16 bit and used mostly area lights. When I used HDR image, it was working fine. Also sometimes denoiser doesn't start so I have to re render my image again.
What do you mean with "rendered image in 16 bit" ? How many samples per pixel did you use ?

I don't notice any evident clamping in the attached image :?:
Support LuxCoreRender project with salts and bounties
User avatar
Sharlybg
Donor
Donor
Posts: 3101
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: Denoiser clamps render

Post by Sharlybg »

I don't notice any evident clamping in the attached image
In the image at the right you can see bright light comming beneath.

Maybe it is caused by anti spike option in denoiser ?
Support LuxCoreRender project with salts and bounties

Portfolio : https://www.behance.net/DRAVIA
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. »

Egert_Kanep wrote: Mon May 28, 2018 9:27 pm Also sometimes denoiser doesn't start so I have to re render my image again.
I have looked into this problem and I think I fixed it.
User avatar
Egert_Kanep
Posts: 237
Joined: Tue Mar 13, 2018 10:34 am

Re: Denoiser clamps render

Post by Egert_Kanep »

Another example of denoiser calmping render. Denoiser doesn't leave any values over 1 and therefore all information in highlights is lost, even if the values don't go over 1, its still destroys that information. It seems like denoiser outputs 8 bit image, not 16 bit float. In attached example on upper row I gained down images to see how they respond. As seen, all highlight info on denoised image is lost and bright parts appear flat, whereas info on raw render is still there. Also sometimes these rgb squares appear on denoised render, but only when using region. Just a side question, why deos denoiser kill alpha, I know I can use original image alpha, but wouldn't it be cleaner if denoised image already had correct alpha?
Attachments
denoiser_clamp.png
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 this.
In my particular scene, the effect is very strong with the Tile Path CPU engine, and rather weak with Path CPU (see the images here for Path CPU results).

The scene is attached.
Attachments
smoke_backlit_denoiser_clamping_bug.bcf
(2.82 MiB) Downloaded 220 times
Tile Path CPU
Tile Path CPU
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: Thu Jun 14, 2018 8:07 pm I can reproduce this.
Nope, the problem you are observing is expected because the BCD warmup period end before all tiles have been rendered. To fix the problem, you can decrease the TILPATH AA parameter to 1. At the moment, the end of BCD denoiser is hard coded at "<total samples count> / <total film pixel count> > 2.0". Indeed, it could be exposed as parameter so you can increase the warmup instead of reducing the AA. However, with BCD, is probably better to have AA=1 anyway in order to collect more accurate BCD statistics during the rendering.

So, to recap, I'm still unable to reproduce the problem, can someone provide a scene showing the 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. »

I have pushed a commit to the addon that forces the AA samples to be set to 1 if the denoiser is enabled.
https://github.com/LuxCoreRender/BlendL ... 39b94c445e
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. »

Egert_Kanep wrote: Mon May 28, 2018 9:27 pm It seems like denoiser clamps bright parts of my images, I rendered image in 16 bit and used mostly area lights. When I used HDR image, it was working fine. Also sometimes denoiser doesn't start so I have to re render my image again.
Egert Kanep, can you upload this scene that shows the problem? It would be a great help.
User avatar
Dez!
Posts: 368
Joined: Sun Apr 08, 2018 1:09 am
Location: Ekaterinburg
Contact:

Re: Denoiser clamps render

Post by Dez! »

https://mega.nz/#!sgQHCKgY!A7OcgHh7zsUW ... vHNu_rBD2M

In this scene (project), if you remove the World - there will be an error of a denoiser
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