Page 1 of 2

Why is image with PGIC darker than without?

Posted: Tue Jun 11, 2019 4:58 pm
by FarbigeWelt
LuxCoreRender 2.2 beta 1, build 004d2aa

Today, I noticed there can be a big difference in color and brightness if PGIC is enabled compared to disabled.
Please look at the image, they have both the same fixed tone map settings (Reinard).
Why is the render darker with PGIC? What happens to the energy?
Organic Figurines openCL 769 samples OIDN 0.85
Organic Figurines openCL 769 samples OIDN 0.85
Organic Figurines openCL PGIC 752 samples OIDN 0.85
Organic Figurines openCL PGIC 752 samples OIDN 0.85
Talking about Reinard ... Did anyone else notice that preview in viewport and final render do not have the same brightness?
Why does Reinard take some dozen samples to stabilize its brightness?

Re: Why is image with PGIC darker than without?

Posted: Tue Jun 11, 2019 9:49 pm
by Dade
Without any information about material types,light sources, cache type and/or a test scene, it is hard to say.
FarbigeWelt wrote: Tue Jun 11, 2019 4:58 pm they have both the same fixed tone map settings (Reinard).
Have you tried with linear tone mapping ? Reinard is dynamic like auto linear tone mapping.

Re: Why is image with PGIC darker than without?

Posted: Wed Jun 12, 2019 8:42 am
by FarbigeWelt
Dade wrote: Tue Jun 11, 2019 9:49 pm Without any information about material types,light sources, cache type and/or a test scene, it is hard to say.
FarbigeWelt wrote: Tue Jun 11, 2019 4:58 pm they have both the same fixed tone map settings (Reinard).
Have you tried with linear tone mapping ? Reinard is dynamic like auto linear tone mapping.
I did not know that Reinard is dynamic too. Best is in this case to re-render with linear but without auto brightness.

The materials are a mix of glass 95% and matte 5%.
There are three area lights and the sun with sky.

Re: Why is image with PGIC darker than without?

Posted: Wed Jun 12, 2019 8:08 pm
by FarbigeWelt
Dade wrote: Tue Jun 11, 2019 9:49 pm Without any information about material types,light sources, cache type and/or a test scene, it is hard to say.

Have you tried with linear tone mapping ?
Please have a look at the attached scene.
Organic Figurine.zip
Organic Figurine
(3.41 MiB) Downloaded 174 times
Meanwhile yes, please have a look at the two pictures. Objects are darker with PGIC, indirect plus caustic cache, than without. Sky background seems to have the same brightness.
Organic Figurine, openCL, indir and caustic cache, tone map
Organic Figurine, openCL, indir and caustic cache, tone map
Organic Figurine, openCL, no cache, tone map linear fixed
Organic Figurine, openCL, no cache, tone map linear fixed
Do you have any ideas why PGIC is darker?

Re: Why is image with PGIC darker than without?

Posted: Wed Jun 12, 2019 11:38 pm
by zeealpal
Have you tried increasing the depth of PGI?

On phone now, but IIRC that was a property. Your problem looks like glass with a too small path depth

Re: Why is image with PGIC darker than without?

Posted: Thu Jun 13, 2019 8:53 am
by Dade
The problem is present only in GPU rendering, you get the same brightness on CPU. I will check what is going wrong.

Re: Why is image with PGIC darker than without?

Posted: Thu Jun 13, 2019 11:24 am
by Dade
It is a damn AMD compiler bug, the same code works fine with NVIDIA GPU. I have tracked down the problem and the AMD code just doesn't write a value to the requested location; I will try to find a workaround but it may be not even possible.

Re: Why is image with PGIC darker than without?

Posted: Thu Jun 13, 2019 11:28 am
by Sharlybg
Dade wrote: Thu Jun 13, 2019 11:24 am It is a damn AMD compiler bug, the same code works fine with NVIDIA GPU. I have tracked down the problem and the AMD code just doesn't write a value to the requested location; I will try to find a workaround but it may be not even possible.
Why AMD driver seem to encounter so much little issue while being opencl only compute oriented while nvidia do both cuda/opencl and seem to work seamlessly ?

Re: Why is image with PGIC darker than without?

Posted: Thu Jun 13, 2019 11:50 am
by B.Y.O.B.
The Nvidia compiler has its fair shair of problems as well ...

Re: Why is image with PGIC darker than without?

Posted: Fri Jun 14, 2019 9:04 am
by Dade
Dade wrote: Thu Jun 13, 2019 11:24 am I will try to find a workaround but it may be not even possible.
I have found a ways to workaround the problem and now the scene should work fine on AMD GPUs too.