0 votes

I'm trying to make a map that's pretty dark, lit mostly by torches and a little bit coming from the sky.

I have an odd problem and was wondering if anyone else has had anything like this. I have lines going across the screen that move when I move and also remain there when still. I'm new to Godot and may be doing something wrong. Possibly I don't have the right camera settings, or light settings, or shadow settings or maybe my map is just too big. I have no clue.

Here's a picture of it. Any help would be greatly appreciated!

enter image description here

asked Sep 24, 2018 in Engine by tproper (104 points)

2 Answers

0 votes
Best answer

Those lines (I'm pretty sure you meant those blocks in the shadow) are caused by insufficient shadow map size and quality. There are a couple of ways to change the way Omni lights, and other light sources, make there shadows. You can look over here for a look at this ways. But simply put it-

  1. Change the shadow map atlas size in project settings.
  2. Change the shadow filter also in project settings.
  3. Change the way Omni lights render shadows (dual-parabloid or cube-mapped).
  4. Changing the bias.
answered Sep 24, 2018 by SIsilicon (3,781 points)
selected Sep 25, 2018 by tproper

Increasing the map atlas size and changing the omni light to dual-paraboloid helped. I still have some of those lines but they aren't from the torches, they seem to be from the skybox. Any suggestions on that? I'm also having some issues with no shadows at all from the skybox. Thanks for the quick answer!

Skyboxes don't produce shadows. Do you mean ambient light? If so then playing around with the ambient light settings in the WorldEnvironment nose should do the trick. I don't really know about those lines you speak of. Could you send another screenshot?

I ended up changing the ambient light to be lower which means the ambient shadows aren't really seen. Instead, I'll be using other lighting means to light the environment. Thanks for your help!

+2 votes

This is called "shadow acne" and is caused by the bias value being too low. It becomes especially noticeable if the OmniLight is close to a surface (i.e. when the light's incidence angle is very low). There are two ways to fix it:

  • Increase the bias value. However, this may result in shadows being detached from the object casting them ("peter-panning").
  • Enable the Reverse Cull Face property on the light's shadow and set a negative bias value such as -0.005 or -0.01. This may result in small shadow patches displaying in otherwise lit areas, but should eliminate issues related to shadow acne and peter-panning.
answered Sep 26, 2018 by Calinou (6,176 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.