Some instanced meshes receive shadow, but not all?

PG Description:

  1. All boxes are instanced meshes
  2. the source mesh is set to receive shadows, and
  3. each instanced mesh is a shadow caster.

https://www.babylonjs-playground.com/#RLQ5JX#1

Expected that all boxes receive shadows;
Actually, those on the west (-x) do not.

:astonished:

https://www.babylonjs-playground.com/#RLQ5JX#2

gotta update the direction as well.

2 Likes

It still should work without a direction (using a direction makes the point light simulates a spot light and does not use a cube texture).

I’m going to have a look.

2 Likes

You have to put the master mesh in the shadow caster list, even if you don’t display it:

https://www.babylonjs-playground.com/#RLQ5JX#3

I don’t really know why, I think it’s because it’s the master mesh that drives the shadow rendering of the instances…

1 Like

That’s exactly my goal, … casting shadow in all directions from a bulb …
I even tried to add 5 more light 5 shadow gens to achieve this
https://www.babylonjs-playground.com/##DWIYIP

:joy:

Thanks!

ooof I thought it was a directional light…

It should not be mandatory
Let me check that

It will be fine in next nightly (no more need to add the root mesh)

2 Likes