Props, items and scenes
Props are single-direction assets: furniture, pickups, icons, decorations. Every prop gets its own canvas and baseline, so it stands on the ground in-game the way characters do. This page covers:
- one prop;
- a matching set;
- icons;
- props that face several directions or move;
- cutting props out of a mockup.
Recipe: one prop#
Using Atelier, create a prop
<id>(<32×32>) described as "<object, material, colours, condition>". Generate <4> variations and pick the best, then normalise and export it.
asset_createwithkind: "prop"anddirections: "1", so the only direction isdefault.generate_variations, thencandidate_select, orhuman_pickif you'd rather choose yourself. For a quick single attempt, usegenerate_image. Images come back with transparent backgrounds by default, fitted to the canvas and standing on the baseline.normalise_frames, thenexport_asset.
Recipe: a matching set of props#
Consistency comes from a shared style guide, shared canvas sizes and a shared palette. Build the set around one anchor prop:
Using Atelier, I need a set of tavern props: <barrel, crate, table, stool, mug, candle, broom>. Use 32×32 canvases for the small ones and 64×48 for the table. Start with the barrel: generate 4 variations and let me pick. Once I've chosen, extract a palette from it and apply it to the style guide, then generate the rest one at a time with the barrel as a style reference, each with 2 variations so you can choose the closest match to the barrel. Normalise, QA and export them all.
Why this order works:
- The anchor sets the look. You choose it yourself, so the set follows your taste rather than the first roll.
- The palette and the anchor go to the providers.
palette_extract { assetId: "barrel", apply: true }gives PixelLab the colours. Withpalette.enforce: "quantise", every later frame is snapped to them.styleReferences: ["art/assets/barrel/frames/stand/default/0001.png"]shows each provider the barrel itself as the look to match. Once the set is done, you can add the anchor to the style guide'sreferencesfor the rest of the game. - Variations make outliers cheap to skip. Claude can compare each candidate with the anchor before promoting one.
- Group the sizes. Small pickups, furniture and large set pieces each get one canvas size, so their scale stays believable next to each other.
Props in a character's style (pixel art): "draw <barrel> in <hero>'s style" runs generate_variations { styleFrom: 'hero' }. PixelLab gets hero's stills, cropped or padded to the prop's canvas at their own pixel size, and draws as many candidates as that size allows, all at the canvas's size: in testing, 36 barrels at 40 px for 15 generations, in the character's palette and outline. n doesn't apply. On Ludo or OpenAI, styleFrom sends the stills as style references instead. styleFrom: 'hero/stand/w' names one still.
Then export_project exports every asset at once and writes exports/content.json with all their content items. Add onlyApproved: true to include only approved assets.
Describing a set: keep each description in the same form, e.g. "a <object> made of <material>, <colour>, <one detail>". Leave the style out, since the style guide adds it.
Recipe: icons and UI items#
Create a UI asset
<icon-potion-red>(<32×32>) "a red health potion in a round glass flask, cork stopper". Generate it, then give it a 1 px dark outline and a small offset shadow, and export.
kind: "ui",directions: "1".- An
outlinekeeps icons readable on any background.drop_shadow { shape: "offset", offset: {x: 1, y: 1} }suits UI, where a ground ellipse would look wrong. See Finishing touches. - For locked or unknown versions of an icon, use a
silhouettevariant. - For a family of icons in different colours, use
palette_swap { as: "asset" }(red potion → blue potion) instead of generating each one.
Props that face several directions#
A cart, a cannon or a door that turns: create it with directions: "4" or "8", generate the front view (generate_image, direction: "s"), then generate_rotation. Mirroring works as it does for characters.
Animated props#
A flickering torch, a spinning coin or a bubbling cauldron: generate the still, then animate it.
Animate
<torch>as<burn>: flames flickering and licking upward, looping.
animate_from_prompt animates any still with Ludo, even in a pixel game. PixelLab only animates characters. Single-frame frames go in stand; the animation gets its own name.
Recipe: props from a mockup#
Paint or generate a whole scene, then cut every object out of it as a separate prop. Splitting it into layers needs a Replicate key (SETUP), and costs about $0.03 plus $0.01 per layer. It takes about 30 seconds, and objects that touch come apart, which a background removal can't do. The model even paints in what they hid: a stool that stood in front of a table comes out with all four legs.
-
Make the mockup. See Art direction for tips: the game's camera angle, objects spread out, even lighting, no text. Save it as e.g.
art/style/refs/tavern.png. -
Split it into layers:
Using Atelier, decompose
art/style/refs/tavern.pnginto <8> layers as a scene assettavern, described as "<a wooden table, a round stool, a tall barrel, an iron-bound chest, stone floor and timber walls>", and show me the layers.decompose_layerscreates thetavernscene asset and uses Replicate's layer model to split the image into full-size transparent layers. The description decides the split, so list everything you want apart, plus the background, and ask for a layer or two more than you listed. Without one, objects that touch stay on one layer, and you get layers of faint ghosts instead.Look at the sheet. If two things are still joined, run it again with another
seed: seeds differ a lot, about $0.11 a try, and the same seed always gives the same split. Layers come in no fixed order. The model works at about 640×640 whatever you send, but Atelier puts the mockup's fine detail back. If it warns that fewer layers came back than you asked for, Replicate's safety filter dropped some, usually with nothing lost; check every object is there. -
See what would be cut, without cutting:
Show me which objects
extract_objectswould cut fromtavern(dry run).Pieces close together stay together (a candle and its flame). Specks are dropped. Each skipped thing is listed with its reason:
- covering most of the image is background; raise
maxShareif that was really an object; - mostly see-through is faint: a shadow, a glow or the ghost of another layer;
minSolid: 0keeps them; - on two layers is the same object: the copy closest to your mockup is kept.
With several splits, name the one you want:
sourcestakeslayers:<genId>/<n>, and the default is the latest. - covering most of the image is background; raise
-
Cut them out with names, in the order the dry run listed them (reading order):
Extract them as props named <bar, stool, stool-2, barrel, mug, candle>, at scale <0.5>.
Each object becomes a single-direction prop asset, with a canvas of the object plus 2 px of padding, standing on its baseline.
-
Normalise, QA and export them as usual. They'll match each other, because they came from one image.
-
Keep the room. The background layer is a clean plate, with the objects painted out. To use it in the game, import it as its own asset:
import_framestakesart/assets/tavern/layers/<genId>/01.pngor whichever layer it was. -
Keep the layout. Every prop remembers where it stood in the mockup (
placement).scene_layout(free) writesexports/tavern/tavern-layout.json: each prop's sprite, where its pivot goes (game px) and its draw order (back to front by the bottom of its box).export_asseton the scene, andexport_project, add it to the content list astavern-layout, so a mockup becomes a level layout.tile-maphas no object layers: draw the sprites yourself, in itspostRendersay:const layout = ContentManager.get('tavern-layout'); // { width, height, objects: [{ id, sprite, x, y, z }] } for (const o of layout.objects) placed.push({ sprite: new Sprite(ContentManager.get(o.sprite)), position: { x: o.x, y: o.y } });
In the web app: a scene's Overview tab has Objects in this scene: Find the objects shows what would be cut, with a picture each; untick and name them, then Cut out. The layout is listed below it.
A flat painting with no layers? If the objects stand apart on a plain ground, matting is cheaper than layers: extract_objects { matte: true } removes the mockup's background first (about $0.02), keeps it as a one-layer set, and cuts from that. Objects that touch stay together, which layers would separate.
In 3D: scene_blockout (paid, about $0.02 on fal, experimental) builds the props cut from a scene in 3D at once from the mockup, with a mask each, laid out as it shows them. The scene's model is the whole blockout (render_model shows it at the game's camera), and each prop gets its own object as its model, ready for model_fit_view and every direction (page 11).
Options for extract_objects:
| Option | Use it when |
|---|---|
scale |
The mockup was drawn bigger or smaller than the game (128 px crates for a 32 px game: 0.25) |
mergeDistance |
Separate objects were merged (lower it) or one object was split (raise it) |
minArea |
Small real objects were dropped as specks (lower it) |
minSolid |
You want a shadow or a glow as a prop of its own (0) |
maxShare / includeBackground |
You want the floor or wall layer too |
sources |
Only some layers, or a split that isn't the latest: ["layers:2", "layers:<genId>/3"] |
into: "candidates" + targetAssetId |
You want a mockup object as a new look for an existing asset (then candidate_select) |
into: "references" |
You want the objects as references to draw variations from, not as props yet (Reference images) |
prefix |
Automatic names (tavern-obj-01, …) instead of names |
If a layer split puts an object's shadow on its own layer, leave that layer out (sources) or add a shadow back with drop_shadow.
Only want a few things from a mockup, or want more like them? Point at them instead: box them on the mockup's page, cut them out into a reference, and draw variations from it. See Reference images.
Props from images you already have#
To use the image as it is:
Import
<path/to/sword.png>as a prop<sword>(<32×32>), remove its background, normalise and export.
import_frames brings in the PNG; remove_background makes the background transparent with one provider call. Skip that step if the image already has transparency.
To have it redrawn in the game's style (a painted concept for a pixel game, say):
Generate 4 variations of
<sword>based on<art/style/refs/sword-concept.png>.
generate_variations { references: [...] } sends the concept as the subject, and the style guide's references as the look. This works with PixelLab and OpenAI, not Ludo.
Next: Tilesets.
Found a mistake? Edit this page on GitHub.