# Light passed through the walls and illuminated the ground

**URL:** <https://forum.babylonjs.com/t/light-passed-through-the-walls-and-illuminated-the-ground/22318>\
**Category:** Questions\
**Tags:** lighting\
**Created:** [July 12, 2021, 9:26am UTC](https://forum.babylonjs.com/t/light-passed-through-the-walls-and-illuminated-the-ground/22318 "2021-07-12T09:26:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![musk](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/musk/32/17156_2.png) [@musk](https://forum.babylonjs.com/u/musk)\
**Post date:** [July 12, 2021, 9:26am UTC](https://forum.babylonjs.com/t/light-passed-through-the-walls-and-illuminated-the-ground/22318/1 "2021-07-12T09:26:41Z")

</div>

Hi All, There is a light on the wall in the room. It should be dark outside . Do I need to turn on shadows ?  
Or did I miss any attributes ?  
[https://playground.babylonjs.com/#4GBWI5#1402](https://playground.babylonjs.com/#4GBWI5#1402)

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [July 12, 2021, 11:14am UTC](https://forum.babylonjs.com/t/light-passed-through-the-walls-and-illuminated-the-ground/22318/2 "2021-07-12T11:14:39Z")

</div>

Yes, you should setup a shadow generator. However, it will only work with a directional, spot or point light.

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [July 12, 2021, 5:13pm UTC](https://forum.babylonjs.com/t/light-passed-through-the-walls-and-illuminated-the-ground/22318/3 "2021-07-12T17:13:07Z")

</div>

Or you could split the meshes and rely on the includeOnlyMeshes and such to ensure no light leaking.

---

<div class="post-metadata">

**Author:** ![musk](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/musk/32/17156_2.png) [@musk](https://forum.babylonjs.com/u/musk)\
**Post date:** [July 13, 2021, 1:20am UTC](https://forum.babylonjs.com/t/light-passed-through-the-walls-and-illuminated-the-ground/22318/4 "2021-07-13T01:20:31Z")

</div>

Thanks. Both the following two geniuses’ replies will solve the problem
