Shadow Catcher problem

Use this forum for general user support and related questions.
JoeDDD
Posts: 25
Joined: Sun Jan 13, 2019 8:00 am

Shadow Catcher problem

Post by JoeDDD » Mon Apr 29, 2019 6:49 am

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

User avatar
Dade
Developer
Posts: 3400
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Shadow Catcher problem

Post by Dade » Mon Apr 29, 2019 3:03 pm

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

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

Re: Shadow Catcher problem

Post by B.Y.O.B. » Mon Apr 29, 2019 3:19 pm

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?
Attachments
2019-04-29_17-21-53.png
2019-04-29_17-21-53b.png
Support LuxCoreRender project with salts and bounties

JoeDDD
Posts: 25
Joined: Sun Jan 13, 2019 8:00 am

Re: Shadow Catcher problem

Post by JoeDDD » Mon Apr 29, 2019 4:41 pm

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

User avatar
Dade
Developer
Posts: 3400
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Shadow Catcher problem

Post by Dade » Mon Apr 29, 2019 6:34 pm

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

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

Re: Shadow Catcher problem

Post by B.Y.O.B. » Mon Apr 29, 2019 10:40 pm

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

User avatar
Dade
Developer
Posts: 3400
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Shadow Catcher problem

Post by Dade » Tue Apr 30, 2019 7:59 am

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

User avatar
Dade
Developer
Posts: 3400
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Shadow Catcher problem

Post by Dade » Tue Apr 30, 2019 8:05 am

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

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

Re: Shadow Catcher problem

Post by B.Y.O.B. » Tue Apr 30, 2019 10:07 am

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.
Attachments
shadowcatcher_problem.png
shadowcatcher_area_problem.zip
(91.26 KiB) Downloaded 29 times
Support LuxCoreRender project with salts and bounties

User avatar
Egert_Kanep
Posts: 202
Joined: Tue Mar 13, 2018 10:34 am

Re: Shadow Catcher problem

Post by Egert_Kanep » Tue Apr 30, 2019 10:16 am

You guys are amazing! User oriented developers if I may say so :D

Post Reply