Shadow is not "connected" to GLTF object

I’m trying to create a bathroom scene. All the objects are GLTF objects. I have been able to get the handles to produce a shadow on the cabinet, but there is a gap between the actual object and the shadow. Attached is a close-up of what’s happening, and another showing the light placement. Any ideas where I should start looking?

3js-shadow gap - detail

you can fix this with light.shadow.bias = … + or - small fractional values until it sits right.

Thanks that helped! I added the bias and tweaked it so the gap disappears, but now there are shadow lines all over the surface. I read it may be an issue with castShadow and receiveShadow both being true. But I need the cabinet to both cast (on the floor) and receive (handles) shadows. I’m currently sitting at -.00002 on the bias on the pointLight that would be causing the shadows. Do I need to add bias to every light that cast shadows?
3js-shadow gap - after bias set

there’s bias and normalBias, tweaking shadow maps is a pain but eventually you will find something good enough. also increase the mapSize slightly.

That’s it! The right combination of bias and mapSize worked. Thank you so much. I was pulling my hair out, not knowing which settings were working and which were not.

1 Like