CLI reference › PixelLab utilities

normal-map

Makes the normal map of a sprite with PixelLab's /normal-map, so a game engine can light it. The map is the input's size: RGB is the way each pixel faces, and alpha is 255 where the sprite shows and 0 elsewhere.

pixelkiln normal-map --from art/hero-walk.png --frames 6 --convention opengl --out art/hero-walk-normal.png
pixelkiln normal-map --from art/hero.png --mode pro --kind character --surface-detail 0.5 --detail-softness 2
  • --from must be a PNG: its alpha marks where the sprite is. For an animation, pass a horizontal strip of equal frames and --frames <n> (1–32, default 1). PixelLab shapes the first frame and carries that to the others, so the light stays steady, and returns the map as a strip of the same layout.
  • Each frame must be 8 to 512 pixels per side, and the strip's width must divide evenly by --frames. Both are checked before anything is sent.
  • --convention opengl (the default) is green up, for Godot, Unity, and Phaser; --convention directx is green down, for Unreal.
  • --mode lite (PixelLab's default) makes the map from the art alone for 0.1 generation; --mode pro plans each part's shape, what is in front and what is sunk, for 0.5. Both prices were billed live (November 2026), a whole strip included, charged only when the map is delivered. On a 64x64 knight the two were close, pro defining the limbs a little more. PixelLab made lite the default when it added the mode, so a map that cost 0.5 before now costs 0.1 unless you ask for pro.
  • --kind says what the picture is: character, object, topdown, side, iso, or ui. Left out, PixelLab reads it from the picture; set it for sidescroller, isometric and UI art.
  • Five controls shape how the flat sprite is read as a surface. Each is optional, and PixelLab picks its own value for any you leave out: --strength (0–2) is how far every pixel tilts away from the viewer; --outline-rounding (0–3) rounds the silhouette's edge, 0 keeping it flat; --part-shapes (0–2) is how much a round head or an arm's cylinder adds; --surface-detail (0–2) turns the art's own light and dark into bumps, 0 for smooth; --detail-softness (0.6–3 px) blurs that detail. With outline rounding, part shapes and surface detail all at 0 the map is completely flat.
  • The command prints the cost and asks first; --yes skips the question, --budget <n> refuses when n is below it, and --dry-run sends nothing.
  • --out defaults to <input>.normal.png beside the input, and the input is never overwritten. An existing --out is replaced only with --force.
  • --json prints the job id, the map's size, the frame count, the convention, and the billed usage.

It writes a loose file and leaves the lockfile alone. For a manifest asset or a loop, declare a normal-map revision instead: it tracks the parent and cuts a loop's map back into per-frame files.