Tilemap normal map - Bizarre Light2D behaviour

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By natw2000F2

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

scale 1

(tile size: 128x90)

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

For the record, this question was cross-posted on GitHub: Tilemap normal map - Bizarre Light2D behaviour · Issue #51248 · godotengine/godot · GitHub

Calinou | 2021-08-04 21:43

:bust_in_silhouette: Reply From: natw2000F2

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
    Importing images — Godot Engine (stable) documentation in English
    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).