sprite ai
Read the alpha channel before using a grayscale sprite cutout
A grayscale silhouette from an image pipeline can look like a clean cutout mask and still leave the whole sprite visible. Qt's DestinationIn composition uses source alpha for coverage. A black and a white mask pixel can have identical alpha if the file stores both as opaque colors.
Specify the mask polarity at import. If white is meant to keep, convert its brightness to high coverage, black to zero coverage, and intermediate values to intermediate alpha. An image may already contain embedded alpha, so choose whether that coverage is authoritative or whether the grayscale channel carries the selection. Keep the decision with the asset's import settings when it will pass through several editors.
Use a diagnostic strip over a fully opaque solid sprite. Give the strip a black, middle-gray, and white pixel, and record the result's alpha under each sample. For a direct white-keeps mapping using grayscale values 0, 128 and 255, expect corresponding coverage in the output, allowing for any intended conversion and rounding. Repeat on a checkerboard and at native resolution to inspect the half-coverage edge. The two-pixel witness in technical guide and test fixture isolates the composition behavior and can help confirm what the decoded mask actually contains.
Prepared by the FrameSprite Workflow Team with AI assistance. Examples are illustrative unless attributed to a linked fixture.