# How to simulate cloud shadows on the ground (no actual clouds needed)

**URL:** <https://forum.babylonjs.com/t/how-to-simulate-cloud-shadows-on-the-ground-no-actual-clouds-needed/54798>\
**Category:** Questions\
**Tags:** clouds, shadow\
**Created:** [November 16, 2024, 2:27am UTC](https://forum.babylonjs.com/t/how-to-simulate-cloud-shadows-on-the-ground-no-actual-clouds-needed/54798 "2024-11-16T02:27:05Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![TooCalm](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/toocalm/32/3301_2.png) [@TooCalm](https://forum.babylonjs.com/u/TooCalm)\
**Post date:** [December 4, 2024, 12:58pm UTC](https://forum.babylonjs.com/t/how-to-simulate-cloud-shadows-on-the-ground-no-actual-clouds-needed/54798/21 "2024-12-04T12:58:47Z")

</div>

Hey @Evgeni_Popov ,  
I faced with a problem that useBlurExponentialShadowMap = true; breaks self shadows  
what i want that ground meshes also could give some shadows on each other but this property gives full shadow like there is no light at all  
so i need this property for clouds but i don’t need it for other shadows

i added 48 line in this example shadowGenerator.addShadowCaster(ground);

> **[Babylon.js Playground](https://playground.babylonjs.com/#ILEAN1%235)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL and WebGPU 3D scenes

the only solution i see for now is to create seperate shadow generators for clouds and for other shadows with different parameters but maybe there is other solution?  
Thanks!

---

<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:** [December 4, 2024, 7:09pm UTC](https://forum.babylonjs.com/t/how-to-simulate-cloud-shadows-on-the-ground-no-actual-clouds-needed/54798/22 "2024-12-04T19:09:20Z")

</div>

Self shadowing is a problem with exponential shadow map. See:

> [@Blur exponential Shadowmaps generating a self-shadow that can't be fixed with bias](https://forum.babylonjs.com/t/blur-exponential-shadowmaps-generating-a-self-shadow-that-cant-be-fixed-with-bias/3703/2):
>
> Exponential shadow map might get really tricky to get self shadow, I would recommend to use percentage CloserFiltering: [https://www.babylonjs-playground.com/#JPVT2W#2](https://www.babylonjs-playground.com/#JPVT2W#2) or PCSS in this case. In case you really want to use ESM, you can try the close ESM instead : [https://www.babylonjs-playground.com/#JPVT2W#3](https://www.babylonjs-playground.com/#JPVT2W#3)

What you can try is to use close exponential instead, and set the shadow min/max values to appropriate values:

> **[Babylon.js Playground](https://playground.babylonjs.com/#ILEAN1%236)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL and WebGPU 3D scenes

---

<div class="post-metadata">

**Author:** ![TooCalm](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/toocalm/32/3301_2.png) [@TooCalm](https://forum.babylonjs.com/u/TooCalm)\
**Post date:** [December 4, 2024, 7:20pm UTC](https://forum.babylonjs.com/t/how-to-simulate-cloud-shadows-on-the-ground-no-actual-clouds-needed/54798/23 "2024-12-04T19:20:39Z")

</div>

Thanks, not sure if it will work on big map where light should be far from everything because of

- You must ensure that the light is as close as possible to the shadow casters.

anyway i will try  
Thanks again!

[Previous page](https://forum.babylonjs.com/t/how-to-simulate-cloud-shadows-on-the-ground-no-actual-clouds-needed/54798.md?page=1)
