Page 1 of 2

Shadow Catcher problem

Posted: Mon Apr 29, 2019 6:49 am
by JoeDDD
When I use shadow catcher with the area lamps the edges of the shadow catcher get darker. When I use a glossy material for the shadow catcher the difference becomes more noticeable because everything gets very reflective. Is this a bug or am I doing something wrong?

here is the blend file: http://pasteall.org/blend/index.php?id=51616

Image

Image

Re: Shadow Catcher problem

Posted: Mon Apr 29, 2019 3:03 pm
by Dade
You are using a box as area light source so the plane will be always in shadow for some of the box faces. This means that the plane, as shadow catcher, will always "catch" some shadow and it will not be totally transparent like in your rendering.

You can literally think the shadow catcher as something "illuminated" by not visible light sources. In your case, some of the box face will always "illuminate" with shadows your shadow catcher.

The solution depends a bit by what you need to render. If you want to use many light sources, the best set up is usually to use the "only infinite lights" shadow catcher option: it will start to catch only infinite light shadows (i.e. HDR+Sun in your case) and ignore the shadow of the box:

img.jpg

Re: Shadow Catcher problem

Posted: Mon Apr 29, 2019 3:19 pm
by B.Y.O.B.
Dade wrote: Mon Apr 29, 2019 3:03 pm The solution depends a bit by what you need to render. If you want to use many light sources, the best set up is usually to use the "only infinite lights" shadow catcher option: it will start to catch only infinite light shadows (i.e. HDR+Sun in your case) and ignore the shadow of the box:
I didn't know about this option, so it is not exposed in the Blender addon. How is the property called?

By the way, I think the back of an area light should not count as a shadow for the shadow catcher. It should not count as light either.
Also, in the case of a light emitting box, the backfaces of the area lights are not visible by the shadow catcher - why can they still cast shadow on it? It's like the shadows are "shining" through other objects?

Re: Shadow Catcher problem

Posted: Mon Apr 29, 2019 4:41 pm
by JoeDDD
Where can I find "only infinite lights" option? And another thing I noticed is that the shadows are more reflective which is really odd.

Image

Re: Shadow Catcher problem

Posted: Mon Apr 29, 2019 6:34 pm
by Dade
B.Y.O.B. wrote: Mon Apr 29, 2019 3:19 pm I didn't know about this option, so it is not exposed in the Blender addon. How is the property called?
Are you sure ? I remember was an option coming out of a forum discussion, strange, anyway the properties is in the output of the scene saved with the FILESAVER, it should be ".shadowcatcher.onlyinfinitelights" ... yes: https://github.com/LuxCoreRender/LuxCor ... l.cpp#L213
B.Y.O.B. wrote: Mon Apr 29, 2019 3:19 pm By the way, I think the back of an area light should not count as a shadow for the shadow catcher. It should not count as light either.
Also, in the case of a light emitting box, the backfaces of the area lights are not visible by the shadow catcher - why can they still cast shadow on it? It's like the shadows are "shining" through other objects?
At the time, the light interface may have missing some of the tool required but I think the situation can now be improved, I will check.

Re: Shadow Catcher problem

Posted: Mon Apr 29, 2019 10:40 pm
by B.Y.O.B.
Dade wrote: Mon Apr 29, 2019 6:34 pm Are you sure ? I remember was an option coming out of a forum discussion, strange, anyway the properties is in the output of the scene saved with the FILESAVER, it should be ".shadowcatcher.onlyinfinitelights
Somehow this went over my head.
I implemented it in BlendLuxCore now, it's available if you download the latest daily build.

Re: Shadow Catcher problem

Posted: Tue Apr 30, 2019 7:59 am
by Dade
I have improved the shadow catcher support and it should work as expected with any number and type of light sources. This is now a rendering of the original unmodified test scene:

img.jpg

The expected shadow of the box emitting light is now visible too.

Re: Shadow Catcher problem

Posted: Tue Apr 30, 2019 8:05 am
by Dade
JoeDDD wrote: Mon Apr 29, 2019 4:41 pm And another thing I noticed is that the shadows are more reflective which is really odd.
The material of the shadow catcher should somewhat match the material of the underlying surface, visible in the HDR image (i.e. the road). Otherwise the result can look odd.

You should also somewhat match the light setup, your HDR gain is a bit too high compared to the sun gain so the result is very "blueish".

Re: Shadow Catcher problem

Posted: Tue Apr 30, 2019 10:07 am
by B.Y.O.B.
Thanks for the improvements!

The area light now shows a fine line between lit regions and regions in the back of the area light.
I attached the scene.

Re: Shadow Catcher problem

Posted: Tue Apr 30, 2019 10:16 am
by Egert_Kanep
You guys are amazing! User oriented developers if I may say so :D