[Solved] Regarding shadows from a basic physics rigid body changing on a plane

I am making a simple demo where a set of boxes fall down on a plane. The simulation works fine but over time the shadows on the floor change drastically to the point that there are no shadows.

Can anyone please share what might be causing this behavior. I have a demo playground setup below.

Edit: Could this behavior be caused by this parameter
shadowGenerator.useBlurExponentialShadowMap = true

The shadows extends are computed with everythink in the scene so when a box falls off the ground it kind of extends it way too much losing precision.

In your case you should either force the shadow extends manually or remove falling boxes from the shadow map.


Thanks that was the issue. Here is the solution.
Multiple Boxes | Babylon.js Playground (babylonjs.com)

1 Like