Skip to content
Documentation menu
Docspipeline

The pipeline

Every asset goes the same way, whether it was drawn by PixelLab, painted by Ludo, cut out of a mockup or imported from a folder of PNGs you already had.

generate / import   →  raw/       frames as the provider drew them
normalise_frames    →  frames/    one canvas, feet on the baseline, effects applied
qa_report / review  →             checked by Atelier, then by you
export_asset        →  exports/   sheet PNG + content list + preview page

Effects, mirroring and the palette are stored on the asset and reapplied by every normalise, so you can regenerate or tweak a frame without redoing the finishing work.

How far along an asset is — its stage — is read off the files, so nothing has to be kept up to date by hand. Ask what an asset needs next and you get the next step; ask for a recipe and the proven route runs end to end. Stages, next steps and recipes covers both.

1. Set the look#

project_init, then style_guide_update: the render style, a prompt prefix, the palette, the working resolution and per-provider settings. Claude can write the whole thing from a reference image — "here's a screenshot of the look I want" — which is usually faster than describing it.

This is also where reference images are set. They are sent with every generation to the providers that take one, and they do more for consistency than any amount of prompt wording.

2. Create the asset#

asset_create fixes the canvas, the directions and whether east-facing views are mirrored. Getting this right first is worth a minute: the canvas is the asset's frame size for good, and leaving a few pixels of room matters if you later want an outline or a ground shadow.

3. Generate#

  • generate_character — a standing pose in every direction. PixelLab makes a persistent character it can animate later; Ludo draws the front view and rotates it.
  • generate_variations → human_pick → generate_rotation — when you want to choose the look from four candidates before committing to directions.
  • generate_image — a prop, an icon, a single tile.
  • generate_tileset — a Wang set of 16 autotiling tiles, or a sidescroller platform set.
  • decompose_layers + extract_objects — take a mockup apart and cut each object out as its own prop.
  • import_frames / import_tileset — bring in art from anywhere, and get the rest of the pipeline for it.

4. Animate#

animate_from_prompt with an animation name, an action described as pose beats, and a frame count. PixelLab animates its character; Ludo animates each direction's standing pose and chooses its own frame count. animate_from_keyframes interpolates between frames you give it, and animate_from_skeleton draws a shared motion on a character, so that every character in the game walks the same way.

Mirrored directions cost nothing. A direction takes a couple of minutes; if the provider runs past the timeout, the job waits and job_wait collects it.

5. Normalise#

normalise_frames puts every frame on the asset's canvas, with the pivot and the baseline where they should be, applies the palette if the style guide asks for it, and reapplies any effects. It reports drift — how far each frame had to move — and returns a contact sheet with the pivot as a blue cross and the baseline as a red line.

Drift is the number to look at. A couple of pixels is ordinary; a frame that moved twenty is a frame the provider drew somewhere else entirely, and no amount of QA afterwards will hide it.

6. QA#

qa_report checks the lot: frames that fill their whole box (a backdrop the provider added), detached specks, silhouette wobble, mirroring, tile seams. qa_walk_cycle goes further on a walk — foot contacts, the loop seam, bob. clean_strays removes loose pixels.

Then human_review opens the asset page and waits for you: scrub the frames, tick the contact frames, drag the pivot, approve it, or send it back with a note.

7. Export#

export_asset writes three things into art/exports/<id>/:

  • <id>.png — one uniform grid. A cell is the asset canvas, there is a row per animation × direction, and frames run left to right.
  • <id>.content.json — a fragment for the game's content list, in the order content-manager needs.
  • <id>.preview.html — open it from disk to see every animation playing through the real packages.

export_project does every asset and writes a combined exports/content.json.

Loading it in a game#

import ContentManager from '@basementuniverse/content-manager';
import { textureAtlasContentProcessor } from '@basementuniverse/texture-atlas';
import { Sprite, spriteOptionsContentProcessor } from '@basementuniverse/sprite';

ContentManager.initialise({
  processors: {
    textureAtlas: textureAtlasContentProcessor,
    sprite: spriteOptionsContentProcessor,
  },
});
await ContentManager.load([...content, ...heroContent]);

const hero = new Sprite(ContentManager.get('hero-sprite'));
hero.animation = 'walk';
hero.direction = 'se';
  • Frames come out named after the atlas processor runs: hero-atlas_walk_s-1 … -8, and a single pose is hero-atlas_stand_s.
  • The sprite's origin is the asset's pivot, so hero.position is where the feet are.
  • Mirrored directions are baked into the sheet, because sprite has no flip option.
  • A collision shape exports as a fourth item, hero-collision, as plain JSON relative to the origin.
  • A tileset exports <id>-sheet, <id>-atlas and <id>-tilemap, plus <id>-autotile for a Wang set: a map from a cell's four corner terrains to the tile that fits.

If your game registers the processors under different names, or serves images from somewhere other than ./art/exports/, set export.processors and export.imageUrlPrefix in art/atelier.json and export again.

Finishing touches#

All local, all free, all reapplied on every normalise:

  • outline and drop_shadow bake into every frame.
  • hit_flash and silhouette add variant animations — walk-hit, walk-silhouette — for the game to switch to for a frame or two.
  • palette_swap makes a recoloured copy as a separate asset, to export alongside.
  • collision_shape stores a box, feet box, circle or polygon, relative to the pivot.
  • normal_map gives each frame an image saying which way its pixels face, so the game can light it.

Finishing touches has the detail, and Review and export walks the last three steps with a real asset.

Found a mistake? Edit this page on GitHub.