I am encountering a rendering issue with shadows in Three.js where a black spot appears on the floor, directly above the shadow when using a spotlight. I’ve tried adjusting shadow properties such as shadow.mapSize
, bias
, and distance
, but the black spot persists. This only seems to happen with the spotlight setup, and the shadow renders correctly except for this odd artifact.
Is there something specific I should adjust to eliminate this black spot? Could it be related to material settings or the way shadows are being calculated?
Any guidance would be appreciated.
What’s the intensity value of the lights? Looks a bit like negative lights (see @PavelBoytchev profile pic.) - happens when color value x light value flip to negative numbers.
I have used this value
spotLight.intensity = 0.8
spotLight.shadow.intensity = 2;
when i use shadow intensity 1 then there is no black spot but i want intense shadow effect
Yup, 2.0
is not a valid shadow intensity (see docs.)
1.0
means shadows will be as black as it is possible. If by intense you mean sharp - use spotLight.penumbra instead. If by intense you mean just pitch black - it won’t look very good or realistic, but (a) make sure there’s no Hemisphere and Ambient lights in the scene, (b) make sure the scene.environment
map does not have any bright light coming from the top, and (c) if your material is MeshStandardMaterial or MeshPhysicalMaterial, set metalness to 0.0
to avoid indirect light on the surface.
1 Like