Hello everyone, I am using DirectionalLight to create a lighting effect on my GLTF model. However, I am noticing some strange shadows on my model, and I can’t figure out where they are coming from. Any help would be greatly appreciated!
This can be due to a number of things.
First off… your directional light isn’t covering the entire object. Add a LightHelper to it to see the actual volumetric area that covers, and you’ll see that it is likely not covering your house completely.
Second… Shadowmaps get more precision if the shadow camera near/far values are tightly matched to what you are trying to shadow.
Third: Depending on the scale of your scene, you may have to adjust shadow.bias to prevent self shadowing. This is a very common issue, called “shadow acne”, and adjusting bias can either fix it, or result in a secondary issue called “peter panning” of the shadows.
If you put your example in a glitch or fiddle we can probably show you how to adjust your light correctly.
thank you very much! setting shadow.bias to 0.0004 solved the problem