CLI reference › PixelLab utilities
normal-map
pixelkiln normal-map --from art/hero-walk.png --frames 6 --convention opengl --out art/hero-walk-normal.png
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.
--frommust 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 directxis green down, for Unreal.- 0.5 generation per call, a whole strip included, charged only when the
map is delivered (PixelLab's documented price; not yet measured here). The
command prints that and asks first;
--yesskips the question,--budget <n>refuses whennis below it, and--dry-runsends nothing. --outdefaults to<input>.normal.pngbeside the input, and the input is never overwritten. An existing--outis replaced only with--force.--jsonprints 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.
