Paperdoll layers

Masks and overrides

Every step's file is kept in .pixelkiln/layers/<style>/<asset>/:

FileIs
sheet.pngThe frames as they are, cleaned, on one sheet.
keyed.pngThe sheet with skin keyed: what the provider was sent.
mask.pngWhite where it could paint.
result.pngWhat it returned.
layout.jsonWhich cell is which frame, and the sheet's size.

When a step produces the wrong thing, replace its file. The computed mask finds each neck as the narrowest row in the upper part of the figure. That holds for a bald base with its arms down, and fails for hair wider than the head or an arm raised beside it. To fix it:

  1. Run the layer once.
  2. Open mask.png from the work folder in any pixel editor.
  3. Paint white where the layer may go and black everywhere else. Pure white and pure black only.
  4. Save it into the project (the work folder is git-ignored) and name it:
"layer": { "of": ["hero", "hero.wave"], "mask": "masks/hero-wave.png" }

keyed does the same for the keyed sheet. A supplied file must be the sheet's exact size, so it stays valid only while of, columns, padding and the frames themselves do. The layer fails before any request, with both sizes, when they differ.

Two of the steps are also derive transforms for single images, free and local: key-skin and despeckle.