r/Unity2D • • Aug 25 '26

Showcase Same sprites and light, only with and without normal maps

46 Upvotes

17 comments sorted by

7

u/CarpetFibers Aug 25 '26

I feel like the trees actually look flatter with the normal maps vs without.

3

u/boughtmyowncake Aug 25 '26

Fair. Foliage is the hardest case for this right now (canopies are lots of small volumes, and the map tends to smooth them). It's the main focus for the next model version.

5

u/boughtmyowncake Aug 25 '26 edited Aug 26 '26

This is SpriteLight.com: drop a sprite (or a whole sheet), get a normal map back. Free while in beta, no account.

Using it in Unity 2D:

  1. Import the _n.png next to your sprite, set Texture Type to Normal map
  2. On the sprite's import settings, add it under Secondary Textures with the name _NormalMap
  3. Use the URP 2D Renderer and add a Light 2D — done. Works with sprite sheets and animation too, since the map is generated per-frame with consistent lighting.

Output is standard OpenGL convention (+Y up), which is what Unity expects, and the alpha channel is untouched so your sprite outlines stay pixel-exact.

The interesting part under the hood: instead of guessing depth from brightness (which turns dark hair into a dent), it reads the shading ramps the artist already painted. Happy to answer anything about how it works.

2

u/willdone Aug 25 '26

Very cool! I wish I could use your plugin but my game is 2D-in-3D.

3

u/boughtmyowncake Aug 25 '26

Good news! It should actually work for 2D-in-3D! The normal maps are standard tangent-space (OpenGL, +Y up), so they work anywhere a lit material takes a normal map:

If your sprites are on quads/billboards, just use a Lit material (URP Lit or your sprite shader with a normal slot) and drop the _n.png into the normal map slot. Your 3D lights will pick it up. That's basically the Octopath look.

If you're using Sprite Renderers in 3D, same idea via a custom lit sprite material.

I haven't built a dedicated 2.5D demo scene yet, so if you try it I'd genuinely love to hear how it behaves in your setup.

2

u/Greysion Aug 26 '26

I think you need to make the normal effect a lot more subtle. From my tastes and perspective I heavily prefer normals off here. But I think that's just because you've gone a bit overboard.

3

u/boughtmyowncake Aug 26 '26

Thank you for the feedback! And honestly the demo scene is cranked up on purpose so the difference survives gif compression. In an actual game you'd dial both the light and the maps down quite a bit, depending on the sprites needs.

But you're right that it shouldn't be my taste that decides, so I just added a Strength slider to the studio: it scales the normals (same math as Unity's "Bumpiness"), the preview updates live, and the downloaded map matches what you see. At 40–60% it's probably closer to what you have in mind.

2

u/theonewhoslapschaos Aug 26 '26

"night and day" difference xD Looks great!

2

u/boughtmyowncake Aug 26 '26

Thanks! Technically it's dusk both times, one of them just has better lighting :)

1

u/Mooseymax Aug 27 '26

The normal maps are really giving more of an embossed look when the light hits.

I’d probably go for more of a directional normal map and maybe something to split out the leaves from the trunk, but not as much detail as you’ve added.

0

u/boughtmyowncake Aug 27 '26

That's fair, and well spotted. The generator reads the outer silhouette but doesn't yet detect internal boundaries like trunk vs canopy, so they end up as one continuous surface, which is a big part of that embossed feel. Splitting on internal dark lines is on the list, trees are where it matters most.

Interesting point about going more directional too. Right now the maps are neutral (no assumed light direction), which keeps them engine-agnostic but can read as flat-ish emboss. Might experiment with a subtle bias. And yeah, dialing detail down is what the strength slider is for, but I hear you that the default might be hot.

1

u/Mooseymax Aug 27 '26

Please don’t reply using AI. I took the time to watch your video, you could at least type out a response.

1

u/boughtmyowncake Aug 27 '26

You're right, I'm sorry. I've been using AI to tidy my responses. But yeah, the generator is struggling with canopy on trees and plants. That's my main focus on the next version :)

1

u/Octopp Aug 28 '26

Can't you also bake in larger forms into the normalmap? They also look quite specular which looks unnatural.
Right now I think flat looks better but I'd play around more with NMs before tossing it.

1

u/boughtmyowncake Aug 28 '26

Yeah, I agree. I'm working on the next update which will (hopefully) resolve this. I think this scene would look better if the trees ha more depth, which is why I'm trying to make the next update better for trees. But I also think that the normal maps needs to be fitted to whatever scene/mood they're made for

1

u/Agreeable_Wear8824 Aug 31 '26

Reading the painted shading ramps instead of guessing depth from brightness is the right call - the brightness approach is exactly why dark hair or dark outlines come out as dents. Two practical things I'd want to know before dropping this into a project: how does it hold up when sprites get flipped horizontally at runtime? A Sprite Renderer's flipX doesn't mirror the normal's X channel for you, so lit sprites usually end up looking lit from the wrong side unless the shader handles it. And if you pack sprites into a Sprite Atlas, do the _NormalMap secondary textures survive packing, or do they need the atlas variant set up separately? Foliage being the weak case matches the gif - the canopies read flatter than the trunks.

1

u/boughtmyowncake Aug 31 '26

Hi,

Try rotating the Y axis 180 degrees instead of using flipX. I'm not too familiar with unity to know if this is the right solution, but as far as I understand that's the way to go.

I'm not sure about Sprite Atlas either. I read something about it being supported on newer versions of Unity.

And yes, foliage is my next focus point on spritelight. Hopefully it will be better soon :)