Hello everyone, I’m facing an issue that most will know: the shadow artifacts. I checked all the other threads I could find around on Unity Forums and Answers, but no one could solve my problem.
The problem I have: the shadows are blocky and sometimes flickering behind the objects, on the faces opposed to the directional light on the scene. Shadows cast on terrain (custom mesh) are fine.
What I already tried but not worked:
- Changing any camera settings will not solve anything. The issue appears on both Editor and Play;
- Shadow settings, like resolution, projection, cascades, distance and bias don’t make any difference;
- Firstly it was more noticeable on Deffered Rendering. Now on both Forward and Deferred;
- Scaling or transforming objects or the light don’t change anything. All objects are based on real size scales.
After trying everything, I decided to check shaders, and if I use a simpler shader like Diffuse, or whether I reduce the shininess on the specular material, the artifacts are gone. Any chance a parameter in the specular shader could solve this issue? If I reduce the specular strength, the game visuals will be ruined, due to the art style I’m using.
Ok, it seems the shader is not the issue. With diffused, the artifactes are much less noticeable but are there yet.
The issue only happens on shadows cast by the object itself. If a tree cast shadows over the terrain, the shadows are perfect on the terrain, but this same tree will have artifacts from its own shadow.
Looks like the shadows the objects cast on themselves are in much lower resolution.
For now I changed the shadows to soft and decreased the intensity. It’s more acceptable, but it’s not solved.
No one to give a suggestion?
bump.
If I change the Z rotation of the directional light, the artifacts will suffer some changes, but will not fade away.
Do you notice the artefacts get worse the more objects you can see in the distance?
No. I made some tests, and even with only 1 object in the scene, the artifacts look the same.
These artifacts appear like a low resolution shadow, that will get even lower according to distance (up tp the max shadow distance).
What I know so far, it only happens to shadows on the object cast by themselves. Shadows an object cast towards another one are fine.
Also if I change the directional light Z rotation, the artifacts will change their forms, even with no changes to the lightning itself.