How to add shadows of furniture in room


this is my sample scene - Babylon.js Playground

I can see the direction light shadows out side the room and that too broken, I am also not able to simulate the shadows in the room using the point light, also I want an effect of sunlight entering the room from the balcony

what am I missing here, any suggestions

Nipun David

  1. Add a ground on which chair can cast
  2. for each loaded mesh add a for loop to add cast shadow and receive shadow on all sub meshes.
1 Like

@HiteshSahu, did what you asked. I enabled shadow on each mesh on the scene

There is already a floor on which I have enabled the shadow

@Deltakosh any thoughts?

Nipun David

In those I would often only use one shadow if needed or in the best case, bake them in the models :slight_smile:

With only one, you could do smthg like this

Setting the min and max z + bias is mandatory to allow ensure the best possible precision.

1 Like

Hey @sebavan, thanks for the tip.

But I can’t bake shadows as their are movable items in my scene - I am working on a configurator

Nipun David

@sebavan - hi,

why can’t I get similar result for spot light

I have followed this official demo by Babylon for spot light shadows - Babylon.js Playground

Nipun David

You would need a different setup for them due to the dirfferent projection of a spot: