• 3D
  • Why do my shadows look that bad? Are my meshes bad or is it something else?

Hello, I was wondering if there is someone on this planet that can make the Godot 3.4 shadows and light look decent. I tried alot of stuff I found on google but there are so many problems with every option out there that I can't understand what the problem is.

So this is my game so far with the standart shadow settings:

Then i found this answer and tried the first answer what results in other issues:

Funny enough it looks way better in the editor, except for the stuff on the floor:

Then i tried this answer but this resulted in the game now being completly black:

Then this answer - isn't every shadow in a grazing angle ? or am i missing something here.

So far the only thing is to hope that a stable Godot 4.0 will release soon since google does not have an answer for any light or shadow problems :disappointed: but i am eager to learn if someone has an answer to all of this :)

Im getting closer, atleast the shadows are sharp now but idk what i did different tbh :| But somehow the Wall won't get fixed. no matter what i do

The shadows in Godot 3.x have a lot of issues on default settings. You can get them looking okay, but it takes a lot of tweaking, and they won't be perfect. Use PSSM 4-split with blending enabled, and adjust the blend weights. Setting shadow to optimized can look better, but causes shimmering in motion. The diagonal lines are called shadow ache. Enabling reverse cull can help, but it doesn't always work. You can adjust the bias, which will remove the acne, but will cause Peter Panning (where the shadow on the ground doesn't touch the object). Reducing the far distance on the shadow to the minimum needed on your scene helps, as this gives you more resolution. Most of this is fixed in Godot 4.0 but it's only in an alpha state. However, I switched over because the graphics boost is worth it for me.

Try following the advice outlined in the 3D lights and shadows documentation. I've found it to be the most reliable approach in 3.x for both GLES3 and GLES2, except if double-sided meshes that cast shadows are involved.

PS: Remember that in your scene, your shadows are pitch black, which exacerbates any issues that shadow rendering might have. Consider adding some ambient lighting to make your shadows less dark, which will also make shadow rendering issues less obvious.

@cybereality after a very long night of testing and baking I found a reddit post where you commented under and there you said that the meshes have to be unique. I tried that and this seemed to help alot. As you can in the screenshot below the shadows are now much sharper. Now i have to figure out how to make them less dark :D but for right now I have another issue in my project where i am stunlocked hahaha!

and thank you very much for your replies !

@Calinou if I am honest, this whole lightning and shadow stuff sometimes goes way over my head. I will give it a read for sure. Do you have any idea why my shadows in the editor look so much brighter in comparison to the ingame shadows? I find it kinda hard to tweak something when I don't really know what is does in the end.

Edit: the ambient light does not seem to effect the shadows at all. only the player model:(

You need to add a WorldEnvironment node to set the global lighting. Adding an HDRi skymap is the best option, as this will use HDR lighting and look much better. You can find some free ones here. https://polyhaven.com/

Edit: the ambient light does not seem to effect the shadows at all. only the player model:(

The custom ambient light color is only used if Sky Contribution is less than 1.0. By default, the sky contribution will determine 100% of the scene's ambient light.

If you want your custom ambient light color to be visible, you need to decrease Sky Contribution below 1.0.

So i tried out and HDRI and holy moly the improvement is insane. I am actually like how it looks right now :D

Do you have any suggestion how I can further improve it if there even is any? Or does this depent to much on the individual style?