The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates. | Twitter

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

in Engine by (113 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.
by (3,938 points)
selected by

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.
by (12,878 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 Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.