Gridwright Start for $1

Normal Map Online: Image to Normal Map for 2D Sprites

Turn a sprite, sprite sheet or tileset into a normal map online, with crisp pixel art light bands, then light it in Godot 4 with a PointLight2D, step by step.

Normal Maps at work
Normal Maps at work: Normal maps for 2D lighting.

You add a PointLight2D to your scene, move it next to the hero, and the hero just gets brighter. The whole sprite lights up evenly, like a sticker under a lamp. The torch in the dungeon looks the same on the left of a wall as on the right of it. That is what 2D lights do to a sprite with no normal map: they know where the light is, but not which way each pixel faces.

Painting a normal map by hand means shading the sprite again from several sides and packing the result into colour channels. For one sprite that is an afternoon. A walk cycle with 4 directions and 8 frames is 32 frames, and every one of them needs its own map.

This guide makes clean maps for sprites, sheets and tiles in your browser and lights them in Godot 4. You can try it here while you read: the free demo of Normal Maps runs on its page, with no account.

What a normal map does for a 2D sprite

A normal map is a second picture the same size as your sprite. Each pixel's colour stores the direction that pixel faces. Red is left and right, green is up and down, blue is how much it points at the camera. A flat pixel that faces you straight on is the light blue-violet you see in every normal map, RGB (128, 128, 255).

Normal Maps in use
Normal Maps in use. Every tool runs in your browser, nothing to install.

When a 2D light reaches the sprite, the engine compares the light's direction with each pixel's direction. Pixels that face the light get bright, pixels that face away stay dark, so the helmet gets a lit side and a shadow side that move with the torch.

There is one setting that trips people up: the direction of green. Godot and Unity read normal maps as Y+ (the OpenGL convention). Unreal reads Y- (DirectX). If your light comes from above and the bottom of the sprite lights up, the green channel is the wrong way round.

Why most online normal map generators fail on pixel art

Most image to normal map converters were made for photos and 3D textures. They turn the picture into grey heights and measure how steep each spot is. On a 32x32 sprite that goes wrong in a few ways:

Normal Maps in use
Normal Maps in use. Every tool runs in your browser, nothing to install.
  • The heights are blurred first, so the light slides across the sprite in a soft gradient. Next to hard-edged pixels it reads as a filter laid over the art.
  • Every colour change becomes a bump, so a dark outline turns into a ridge and the eyes turn into craters.
  • A sprite sheet is treated as one big image. The bevel at the edge of one frame runs into the next, so the shading at a frame's border changes from frame to frame.
  • A tile's edges don't wrap, so a tiled floor shows a lit seam on every tile border.

Make a normal map from your sprite in the browser

Normal Maps builds the map from two things: the outline of the sprite (its shape) and its colours (the detail). The map is made right in your browser, so it changes the moment you move a slider.

Normal Maps in use
Normal Maps in use. Every tool runs in your browser, nothing to install.
  1. Open the sprite. Drop a PNG, JPG, GIF or WebP on the window, or paste it. A light follows your mouse over the preview from the start, so you see every change lit.
  2. Set the frame size for a sheet. Type one frame's width and height in Frame width and Frame height. Each frame then gets its own edges and nothing bleeds into its neighbour. Leave them at 0 for a single sprite.
  3. Shape the edges. Bevel width (0 to 32 px) sets how far in from the outline the sprite curves. Bevel profile picks the curve: Round (pillow), Linear (sharp ridge), Smooth (soft) or Flat top (chamfer). It starts at 3 px; raise it for bigger sprites.
  4. Add the detail. Detail strength reads the colours: bright pixels stand out and dark lines sink in, so the armour plates and the bricks get their own shading. Tick Dark is high if your art works the other way, and use Soften detail when a busy texture gets noisy.
  5. Keep Pixel-art normals on. It is on when the tool opens. Every pixel's normal snaps to a small set of Directions (4 blocky, 8 classic or 16 fine) and Tilt steps (1 to 4), so the light falls in clean bands, the way a pixel artist shades by hand. Turn it off when you want smooth normals for painted art.
  6. Pick the Y direction. Y+ (OpenGL) for Godot and Unity, Y- (DirectX) for Unreal.
  7. Tick the maps you need and export. The normal map is ticked by default. Add the Height map, Specular map and Occlusion map if you want them. Export this file saves PNGs named sprite_n.png, _h, _s and _ao, and Export all saves one ZIP with the maps of every open file.

For a tileset, tick Seamless (tiles, textures) and set the frame size to your tile size. The edges wrap inside each tile, so the normal map tiles the same way the art does. If you painted your own normal map somewhere else, open it together with the sprite and name it like the sprite plus _n (hero.png and hero_n.png). The preview then lights your map.

The lighting preview has its own settings: Light height, Light reach, Light colour, Ambient, a Second light from the top left, and Light bands, where 2 or more gives cel-shaded steps. Save lit GIF records the sprite with the light circling it, which makes a good devlog clip.

In the free demo everything works. Saving your own images is limited to 64x64 pixels, which covers a single 16x16, 32x32 or 64x64 sprite. The sample saves at any size. The full tool saves any size and whole batches, so a full sheet or a tileset goes through in one export.

Your game, looking finished

Every Gridwright asset pack, made to fit together, and all 44 tools for the fiddly work, with every new release, for $17 a month. Try it in your own game first: 3 days for $1 with every tool and up to 10 packs. Cancel any time.

Start: 3 days for $1 See everything it includes

Use the normal map in Godot 4

Godot 4 lights a normal-mapped sprite through a CanvasTexture, a texture that holds the colour picture and its maps together.

2D Lights & Glow
2D Lights & Glow: Pixel and smooth 2D light textures: radial, cones, window shafts, god rays, animated flicker. One of the 150 packs in Gridwright.
  1. Select your Sprite2D. In the Inspector, click Texture and choose New CanvasTexture.
  2. Open the CanvasTexture. Set Diffuse > Texture to your sprite, Normal Map > Texture to hero_n.png, and Specular > Texture to hero_s.png if you made one. Shininess sets how tight the highlight is.
  3. Add a PointLight2D to the scene. It needs a Texture to light anything: a soft white dot works, for example a radial GradientTexture2D with white in the middle.
  4. Add a CanvasModulate and set its colour to a dark blue or grey. The scene goes dark and the light becomes visible.
  5. Move the light around the sprite. Raise the light's Height to light the sprite more from the front, and lower it for long, raking shading.

For a sprite sheet, put the whole sheet in Diffuse and the whole normal sheet in Normal Map, then set Hframes and Vframes on the Sprite2D as usual (how frames and AnimationPlayer work). The normal sheet has the same layout, so each frame finds its own normals.

You can set it up from code too, and make the light follow the mouse to test it:

@onready var sprite = $Sprite2D
@onready var light = $PointLight2D

func _ready():
    var tex := CanvasTexture.new()
    tex.diffuse_texture = preload("res://hero.png")
    tex.normal_texture = preload("res://hero_n.png")
    tex.specular_texture = preload("res://hero_s.png")
    sprite.texture = tex

func _process(delta):
    light.global_position = get_global_mouse_position()

Godot's CanvasTexture takes the colour, normal and specular maps. The height and occlusion maps are there for your own shaders, or for engines that use them.

In Unity's URP 2D Renderer the normal map goes into the Sprite Editor's Secondary Textures under the name _NormalMap, and a Light 2D with normal maps turned on uses it.

When the lighting looks wrong

  • Light from above lights the bottom. The Y direction is flipped. Export again with Y+ for Godot and Unity.
  • The sprite is blurry under the light. Set Project Settings > Rendering > Textures > Default Texture Filter to Nearest, and keep the import at Lossless, as for the sprite itself.
  • The outline flickers when the character walks. The map was made from the sheet as one image. Set the frame size before you export.
  • A tiled floor shows seams. Turn on Seamless and set the frame size to the tile size.
  • The light does nothing. Give the PointLight2D a texture, and check the sprite uses the CanvasTexture and not the plain PNG.
Screen Transitions
Screen Transitions: 55 screen transitions as masks: pixel art + smooth, a Godot 4 add-on, Ren'Py file and frames. One of the 150 packs in Gridwright.

Light your own sprite now

Open the Normal Maps demo and press Try the sample, or drop in one of your own sprites up to 64x64 and move the mouse over it. You will see the bands snap into place in a few seconds. When you want full sheets, tilesets and batch exports, start Gridwright for 3 days for $1. You get all 44 tools, Normal Maps among them, and 150 asset packs on one grid, ready to light.

Your game, looking finished

Every Gridwright asset pack, made to fit together, and all 44 tools for the fiddly work, with every new release, for $17 a month. Try it in your own game first: 3 days for $1 with every tool and up to 10 packs. Cancel any time.

Start: 3 days for $1 See everything it includes