I’ve created a Earth shader which shall show the city lights on the unlit part of the Earth. I’ve masked the textures accordingly. However when using a normal map the emissive color is shown on normal map shadows even when masking.
In order to highlight the issue I’m using a simple red color as emissive for the first two pictures. As you can see the shades generated by the normal map are emissive as well even the mask should hide the color in those areas. It’s a little unclear whether its a bug or a feature.
This is the expected behaviour as you are using the pixel normal (PixelNormalWS node). To get the effect you intended you should use original vertex normal instead (VertexNormalWS node).
While a little off topic, I would like to ask if you are going for realism? I ask this because it’s a bit of a pet peeve of mine that people always tend to greatly overdo normalmap effects when rendering earth. If you look at actual space photography you’ll notice that at a truly global scale even the Himalayas are very minor bumps on the surface, while in your case the dunes in the Sahara are already shaded as if they are hundreds of kilometers in height.
Sure the normalmap is a way to intensive but it’s just a sample project to make the effect more visible. On my original project I tried to get the normals not too bumpy
Let me explain… not only did I think that I have a super weird and unique problem to which I’ll never find any solution, but the first Google search I did for “unreal engine normal map conflicts emissive” directed me to this link of yours right here. NOW… here’s what’s so funny about it: I have BOTH of your problems: the one with normal maps and emissive lights, as well as building THE EXACT SAME project with the Earth, not to mention that I came up with THE EXACT SAME algorithm which uses PixelNormalWS instead of VertexNormalWS :))))))) Let me show you my issues:
The first image shows the unwanted city night lights around Italy, Austria, Czechia, Croatia and all the way to Greece, although the second image clearly shows you the delimitation line I have for the lights being on or off.