Sprite Production Field Notes

sprite ai

Stop the Sprite Export Cache from Mixing Costume Colors

When two sprite costumes reuse motion and differ only in color, a render cache keyed on source file and position alone can produce a subtle cross-contamination. Both costume names may exist while their atlas pixels are identical.

Use a fixture with two expected fills on a marked sleeve. Render the original costume, then the alternate, then the original once more. Repeat the calls in the opposite order in a fresh cache. Sample the same sleeve location each time. The original should remain stable and each alternate should carry its own expected color. Include a cache-hit run to distinguish a bad cache key from a shared mutable renderer state.

Decide what belongs to a variant

Keep render configuration attached to its animation instance, and include the resolved costume configuration in the output cache key. Reuse the source geometry without reusing a color-mutated object for another costume. If you intentionally share a cache for identical pixels, only unify results after the relevant render options have been considered.

FrameSprite's technical guide and test fixture shows two rlottie instances preserving separate colors from a shared JSON source. The order-dependent fixture makes cache behavior visible after the outputs are packed.

Prepared by the FrameSprite Workflow Team with AI assistance. Examples are illustrative unless attributed to a linked fixture.