Dark spot in DirectionalLight3D direction

Hi all,

I tried setting up a very simple 3D scene to test lights and shadows, and stumbled on this artifact, the dark spot on the sphere:


This is a basic SphereMesh. The glitch happens only with DirectionalLight3D, not OmniLight3D nor Spotlight3D. I tried increasing the DirectionalLight3D’s shadow bias and normal bias: increasing normal bias reduces the dark area, but doesn’t fix the issue entirely. The only thing that does fix it is “reverse cull face”, which doesn’t seem like the right solution ?

I must have done something wrong, could anybody give me a hint please ?

Thank you,
Felix

I just noticed that it only happens when the DirectionalLight3D shadow blur is set to 0. Since shadows look nicer with blur it “solves” my problem, but I’d still be curious to know why it happens, and whether it is possible to avoid with no blur.

1 Like

Based on what you’ve said, particularly the “reverse face cull” part, my suspicion is that you’re seeing shadow geometry that’s on the inside of the sphere, sticking out through the sphere geometry.

That is, if the back faces inside the sphere are not being culled, they’ll be shadowing, and if there’s any imprecision the shadows could extend through the wall of the sphere and be visible from the outside.

1 Like

It seems like a reasonable assumption. It surprises me though that this is happening with the most basic mesh geometry possible, since “reverse face cull” is described in the doc as a parameter to solve some edge cases.