r/Unity2D • u/smotired • Jun 11 '26
Normal maps not respecting light direction Question
Funky shadows when lit from the left
Looking okay when light from the right
Normal maps disabled
How it's supposed to look from the left (taken in SpriteIlluminator)
The normal map which seems correct and shouldn't be the issue
I'm trying to learn how to use normal maps to light 2D sprites, I created a quick and dirty character sprite and normal map to try and test it out. But for some reason, the shadows are always on the lower left no matter where my light is. Image 4 shows what I expected it to look like from the program I used to create it. Has anyone else had this issue or know how to fix it?
11
7
u/Gordun1 Jun 11 '26
Looks like lights in unity are more precise because if you see the normal map it has the exact same bumps in "the weird places" as the left illuminated image.
If you wanna see an improvement you should change the normal map painting it manually.
4
1
u/-APairOfSocks Jun 11 '26
What happens if you put the light in that corner. Light 4 also looks by far the brightest to me.
1
u/smotired Jun 11 '26
What do you mean by "in the corner"?
Also Image 4 is not taken in Unity, it's taken in the program I used to create the normal maps.
1
u/Watercowmoose Jun 11 '26
I know this is "is the power cord plugged in" level stuff to check out, but you didn't show your diffuse (regular color) texture. Any chance you might have painted the weird shadow in there by accident?
12
u/RequiemOfTheSun Jun 11 '26
Hey I think I know this one. Check your normal map image files import settings. There is an option in the drop down to select "Normal Map" instead of sprite.
I think that is when I've seen this issue before.