- Home /
Dynamic Objects do not block light
Hi,
I have a scene where I basically have a box and a directional light in it. All of the walls of the box are static, except for one wall, which is dynamic (the red wall) and should be moved at runtime.
What I want is the box to be completely dark from the inside. I managed to do this for some parts. The only problem I'm having is that the light from the directional light goes through the dynamic wall as soon as I set the indirect intensity of it > 0. You can see the box from the outside and a camera placed inside of it, showing that the inside of the box is lit.
So my question is: How can I keep the box completely dark from the inside, while having a directional light outside with intensity and indirect intensity > 0?
Thank you in advance :)
Answer by BloodMarked · Jan 31, 2018 at 02:05 PM
the walls shouldnt be planes, but cubes with a thickness to reduce the light bleeding. generally, they should be thicker than the lightmap resolution.
.
maybe it can help to tag the dynamic wall as "lightmap static", but that might introduce other problems
I did actually use scaled cubes for the walls with a thickness of 0.2. And I just tried setting the wall to lightmap static. It is seen as a static object then and can't be moved during runtime
Answer by Battlepad · Feb 01, 2018 at 09:59 AM
I am a bit confused by all the lightmapping settings and what they do and what I should use for which situation. So, I have Global Illumination (Realtime and Baked) activated. As far as I read, GI only works with static objects. Does that mean, that GI ignores dynamic objects, as if they weren't there? This would explain the beahaviour, but as I said, I'm not sure about it.