This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

problem
As you can see, when I apply my normal map to my tileset (all tiles selected using atlas), the behaviour of Light 2D changes unprovoked, going from a simple modulation in the light area to a sort of birds eye view of a cone light.

I am unsure why this is, as I'm not really versed in this sort of thing but I guess it could be a driver issue, as I have not tried updating them, but it almost looks intentional. Is this a feature i'm unaware of?

the normal map used is that of the entire tilemap, as instructed. It has a bit of alpha on all its pixels.
Normal map import settings:

stream: 0
size limit: 0
detect3d: on

mode: lossless
normal map: enable

Filter: off
Mipmaps: off
anisotropic: off
srgb: detect

fix alpha border: off
premult alpha: on
hdr as srgb: off

svg:
scale 1

(tile size: 128x90)

Light 2D appears to be affected regardless of whether shadows are enabled or not.
tilemap
tilenormalmap

Godot version 3.3.2
in Engine by (33 points)

For the record, this question was cross-posted on GitHub: https://github.com/godotengine/godot/issues/51248

1 Answer

+1 vote
Best answer

I have found the causes of my problem.

1) The Light2D has a "Height" slider in the properties tab. Since it starts at 0, it causes strange artefacts on normal maps. Increasing this value fixes the issue. This gets rid of the excessive darkness, but does not get rid of the bias towards the bottom right corner of the viewport. To do this I found it was best to get rid of the alpha channel

2) as described in
https://docs.godotengine.org/en/stable/getting_started/workflow/assets/importing_images.html#normal-map
The normal map only needs a green and a red channel to work, so the alpha channel is not needed. (this eliminates the bias towards the bottom right corner of the viewport completely).

by (33 points)
selected by
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.