Gridwright Store

Normal Map GeneratorNormal Map from Sprite: Godot 4 2D Lights

Opening Normal Map Generator…

The Normal Map Generator makes a normal map from a sprite, so 2D lights in Godot 4 or Unity light it from the side the light is on instead of brightening the whole sprite like a cut-out. Drop a single sprite or a sprite sheet and every frame gets its own normal map, in the same place on the sheet, so an animated character stays lit right in every frame.

Each pixel's height comes from two things you can mix: a bevel that rises from the sprite's outline over the width you pick (round, straight or soft), and depth from brightness, where bright parts rise (or dark ones, for cracks and seams). Smoothing blurs the height only inside the sprite and strength sets how steep the slopes are. The slopes are read one-sided at the edge, so no pixel outside the sprite or in the next frame is ever mixed in, and the edges stay exact to the pixel.

The preview lights your sprite the way Godot 4 lights a Sprite2D: the normal read back from the 8-bit map, the light's height above the sprite and a fading circle of light that follows your pointer, with the ambient light and the light's colour to change. Download the normal map and its height map, a Godot 4 folder with a CanvasTexture .tres (your sprite and its normal map in one texture) and a scene with a PointLight2D, and a README with the steps for Godot and Unity. It runs on your computer and never uploads your sprites.

Know someone who needs this? Send it to them

A first session

  1. 1Drop a sprite or a sheet on a see-through background (or try ours: the Stone Golem from Pixel Bosses, 14 frames of 96 x 96); the frame size is found from the empty lines between the frames.
  2. 2Set the bevel from the outline and the depth from brightness, then the smoothing and the strength.
  3. 3Move the pointer over the preview to move the light; change its height, colour and the ambient light, and look at the normal map and height views.
  4. 4Pick green up (Godot, Unity) or down (DirectX) and download the ZIP: the normal map, the height map, the Godot 4 CanvasTexture and the light scene.
It exports
  • The normal map PNG, the same size as your sprite or sheet, pixel for pixel (green up for Godot and Unity, or down for DirectX)
  • The height map PNG it was made from
  • A Godot 4 CanvasTexture .tres and a scene with your sprite, a PointLight2D that follows the mouse and the frames playing
Try the demo, then buy it
Free to use, no account needed: open your own files and download everything you make.
Can I use what I make in a commercial game?
Yes. What you make with the tools is yours to use in your games, commercial ones too, under the Gridwright licence.

Packs that work with it

More tools

All 46 tools on one page