pixelkiln 0.119.0 → 0.121.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -497,13 +497,42 @@ attached to that character's own PixelLab record:
497
497
  result sizes (16, 32, 48, 64, 128, or 160 — 128 and 160 render at 2K and cost
498
498
  more), independent of the style's own `size`. A portrait takes no prompt: it
499
499
  is drawn from the parent's pixels, not text, so it is priced and generated
500
- like a state, 10 to 25 generations by the size tier (a 16px portrait billed
501
- exactly 20, the floor, in a live test; see [`docs/ENDPOINTS.md`](ENDPOINTS.md)).
502
- It lands as `<asset>.png`, one file like a single-direction generator, and
503
- `pixelkiln fetch` also attaches it to the parent's character record upstream
504
- (a separate, free call PixelLab does not make on its own) — useful for
505
- PixelLab's own tools, since the API otherwise has no way to read a
506
- character's portrait back once set.
500
+ like a state, 10 to 25 generations by the size tier (before PixelLab's October
501
+ 2026 price cut, a 16px portrait billed 20, the floor then, and four 128px
502
+ portraits billed 25 each, the middle tier then; see
503
+ [`docs/ENDPOINTS.md`](ENDPOINTS.md)). The plan prices 48px and up at 25.
504
+ It lands as `<asset>.png`, one file like a single-direction generator. Once
505
+ drawn, it is also attached to the parent's character record upstream (a
506
+ separate, free call PixelLab does not make on its own), which is useful for
507
+ PixelLab's own tools, since the API otherwise has no way to read a character's
508
+ portrait back once set. The `ready` line in the log says when it does. A
509
+ character used elsewhere, such as an in-game skin, can be left as it is:
510
+
511
+ ```json
512
+ "mira.bust": { "portrait": { "of": "mira", "size": 128, "seed": 18964718, "attach": false } }
513
+ ```
514
+
515
+ `seed` pins PixelLab's seed for this portrait, in place of the style's `seed`,
516
+ and is part of its identity: a new seed is a new portrait. With or without
517
+ one, the lock keeps the seed under `providerMetadata.pixellab.character.seed`:
518
+ the one the job reports using, or the one sent if it reports none. PixelLab
519
+ deletes a finished job within about a day, so the lock is the only place a seed
520
+ survives; copy it into `seed` to draw the same bust again. `attach` changes
521
+ nothing about the picture and is not part of its identity.
522
+
523
+ **Keeping the character's rotations out of a delivery folder.** A portrait's
524
+ parent must be in the same style, and the parent's eight rotations land in that
525
+ style's `outDir`. To deliver only the bust, point the style at a scratch folder
526
+ and give the portrait a `file` that leaves it; `file` is relative to `outDir`
527
+ and may climb out of it:
528
+
529
+ ```json
530
+ "styles": { "rival_cast": { "generator": "character", "outDir": "build/cast", "size": 48 } },
531
+ "assets": {
532
+ "rival": { "prompt": "a rival swordswoman", "remoteId": "…" },
533
+ "rival.bust": { "portrait": { "of": "rival", "size": 128 }, "file": "../../art/portraits/rival.png" }
534
+ }
535
+ ```
507
536
 
508
537
  A portrait blocks until its parent is downloaded and current, and goes
509
538
  `stale` when the parent is regenerated, exactly like a state. It takes no
package/docs/ENDPOINTS.md CHANGED
@@ -143,7 +143,7 @@ not probed.
143
143
  | `POST /animate-character`, `mode` template or v3 | `character` loops without skeleton-v3 | Run live, not measured | A v3 text loop on a 96px pro-flash base came back 108×108; template loops need a skeleton template ([Characters, measured](#characters-measured)). Plan: template 1, v3 `ceil(size² × frames / 65536)`. | Billed amounts were not recorded; billed per direction. | High |
144
144
  | `POST /animate-character`, `mode: pro` | `character` loops, `mode: pro` | Unknown | Planned 10 to 25 by canvas ([GENERATORS.md](./GENERATORS.md)). Nothing records a live run. | Everything. | High |
145
145
  | `POST /characters/animations`, `mode: skeleton-v3` | `character` loops, `mode: "skeleton-v3"` (template or sentence) | Measured live | On a v3 character: a template loop billed 3; a sentence loop (no template) billed 3, 8 frames at 96×96 from a 64px character; `west` added with `animation_group_id` billed 3 and joined the group. A standard-engine character is refused with a 500 "no stored 3D skeleton" ([Skeleton-driven motion, measured](#skeleton-driven-motion-measured), October 2026). | `pro` and `pro-flash` bases; other frame counts; the price per direction across 8 directions is untested. | High |
146
- | `POST /portrait-character-pro` (+ `GET /portrait-character-pro/{job_id}`) | `character` portrait | Measured live | A 16px `character_to_portrait` billed 20 (before the cut); the `GET` reports `usage: null`, so read the job ([Characters, measured](#characters-measured)). `target_palette` sent, mock only. | The price after the cut (10 to 25); larger sizes. | High |
146
+ | `POST /portrait-character-pro` (+ `GET /portrait-character-pro/{job_id}`) | `character` portrait | Measured live | A 16px `character_to_portrait` billed 20 and four 128px ones billed 25 each, all before the cut (the floor and middle tiers then, against a plan of 40 for 128px; the plan now says 25); the `GET` reports `usage: null`, so read the job ([Characters, measured](#characters-measured)). The seed is read from the job's `last_response.seed` and kept in the lock. `target_palette` sent, mock only. | The price after the cut (10 to 25); 32, 48, 64 and 160px; whether `last_response` carries `seed` for this job, as it does for `inpaint-v3`. | High |
147
147
  | `POST /characters/{id}/portrait` | `character` portrait attach | Measured live | Free (`usage.generations: 0`); the reply holds the only copy of the stored URL ([Characters, measured](#characters-measured)). | None recorded. | Low |
148
148
  | `POST /transfer-outfit-v2` | `character` outfit | Measured live | A 2-frame 92×92 job billed 20 (before the cut); frames return inline in `last_response.quantized_images` ([Characters, measured](#characters-measured)). `target_palette` sent, mock only. | Other frame counts (2 to 16) and canvases; the price after the cut. | High |
149
149
  | `GET /characters/{id}`, `GET /characters?limit=&offset=` | `adopt`, `fetch --refresh`, `salvage` | Measured live | Free; carries no `usage`; image URLs carry `?t=<updated_at>` ([Object lifecycle](#object-lifecycle)). | None recorded. | Low |
@@ -1110,21 +1110,34 @@ and `buildingRoofProfile`. Measured on 14 November 2026 (Tier 3),
1110
1110
 
1111
1111
  Measured on 18 November 2026 (Tier 3) from one manifest,
1112
1112
  `website/art/pixellab-isometric`: `tileType: "isometric"`, `tileView: "low top-down"`,
1113
- `outlineMode: "segmentation"` on the ground and road sets.
1113
+ `outlineMode: "segmentation"` on the ground and road sets. The road set was
1114
+ drawn twice more on 19 November 2026 with a steeper view; the first set is still
1115
+ the one in the repo, for the reasons below.
1114
1116
 
1115
1117
  | Request | Planned | Billed | Result |
1116
1118
  |---|---|---|---|
1117
1119
  | `tileset`, 32px, grass to cobblestone | 25 | 10 | 16 tiles, each 32x24; corner rules (arity 4), all 16 masks present |
1118
1120
  | `roads`, 32px | 25 | 0 | **422**: "Roads need tile_size 48-96 for isometric." |
1119
- | `roads`, 48px | 25 | 10 | 18 tiles, each 48x48; edge rules (arity 4) naming 17 of the 18 |
1121
+ | `roads`, 48px, `low top-down`, `segmentation` | 25 | 10 | 18 tiles, each 48x48; edge rules (arity 4) naming 17 of the 18; a flat 3:1 diamond |
1122
+ | `roads`, 48px, `high top-down`, `segmentation` | 25 | 10 | same shape, a 2:1 diamond, but 17 of 18 tiles carry stray fragments of grass outside the slab, above and below it |
1123
+ | `roads`, 48px, `high top-down`, `outline` | 25 | 10 | same shape, a clean 2:1 diamond and no fragments, but every tile has a dark outline, so a map of them shows the grid |
1120
1124
  | `building`, 32px, stone hall | 25 | 10 | 58 pieces, each 52x58; rule family `composed`, arity 8, no per-tile masks |
1121
1125
  | `isometricTile`, 32px `block`, two prompts | 1 each | 1 each | two 32x32 blocks |
1122
1126
 
1123
1127
  - **The diamond is not the image.** A 32x24 ground tile is a 32x16 diamond on
1124
- rows 0 to 15 with 8 rows of side below it. A 48x48 road tile is a 48x16
1125
- diamond on rows 12 to 27 with 7 rows below, so the diamond is flatter at 48px
1126
- (3:1, not 2:1) and does not start on the first row. The export measures the
1127
- diamond from each set's alpha instead of assuming a ratio.
1128
+ rows 0 to 15 with 8 rows of side below it. A 48x48 road tile drawn from
1129
+ `low top-down` is a 48x16 diamond on rows 12 to 27 with 7 rows below, so the
1130
+ diamond is flatter (3:1, not 2:1) and does not start on the first row; from
1131
+ `high top-down` it is 48x24 on rows 6 to 29. The export measures the diamond
1132
+ from each set's alpha instead of assuming a ratio.
1133
+ - **The view and the outline mode trade off in a road set.** A steeper view
1134
+ makes a 2:1 diamond, which reads as isometric where the 3:1 one reads as
1135
+ top-down. With `segmentation` at that view, 17 of 18 tiles had stray grass
1136
+ triangles above and below the slab. `outline` has none, but each tile keeps a
1137
+ dark border, so a painted map shows a grid of black lines where the flat
1138
+ `segmentation` set is seamless. None of the three was clean and seamless and
1139
+ isometric at once. Check a road set for pixels outside the first tile's
1140
+ silhouette, and paint a map with it, before choosing.
1128
1141
  - **The corner mask reads off the art.** Sampling the four vertices of each of
1129
1142
  the 16 ground tiles: mask bits 3, 2, 1, 0 (NW, NE, SW, SE) are the top, right,
1130
1143
  left and bottom vertices of the diamond, which is the mapping the Godot export
package/docs/MANIFEST.md CHANGED
@@ -67,7 +67,7 @@ not merely a label edit.
67
67
  | `revision` | object | Controlled dependency on another asset: `image-to-image`, `inpaint`, or `outpaint`; on PixelLab also `reduce-colors`, `correct-pixelart`, `remove-background`, `normal-map`, the animate modes (`animate`, `animate-pixminimax`, `animate-skeleton`), `interpolate`, and `edit-animation`. `engine: "pro-flash"` selects PixelLab's Pro Flash tier for `image-to-image`/`inpaint`. See [controlled revisions](REVISIONS.md). |
68
68
  | `state` | object | `character` styles: a pose or outfit of another character asset. See [Characters](./CHARACTERS.md). |
69
69
  | `animation` | object | `character` styles: a loop of another character asset in one direction. `directions` (a list, instead of `direction`) declares the loop for several directions at once and fills the unnamed flips with mirrors; see [One loop, several directions](./CHARACTERS.md#one-loop-several-directions). `mode: "skeleton-v3"` with no `template` animates the asset's `prompt` as a sentence (3–15 `frames`, default 8; a v3 base); see [Loops from a sentence](./CHARACTERS.md#loops-from-a-sentence). `motionFrom` (an asset id) makes a sentence loop follow another direction's loop and share its motion; `directions` writes it for you. |
70
- | `portrait` | object | `character` styles: a bust of a base or state's south sprite, `{ "of": "<asset>", "size": 64 }`; `size` is 16, 32, 48, 64 (default), 128, or 160. See [Portraits](./CHARACTERS.md#portraits). |
70
+ | `portrait` | object | `character` styles: a bust of a base or state's south sprite, `{ "of": "<asset>", "size": 64 }`; `size` is 16, 32, 48, 64 (default), 128, or 160. Optional `seed` pins PixelLab's seed (part of its identity); `attach: false` leaves the parent's PixelLab record without the portrait. See [Portraits](./CHARACTERS.md#portraits). |
71
71
  | `outfit` | object | `character` styles: an existing loop's frames re-clothed from an outfit image, `{ "of": "<loop asset>", "reference": "<image>" }`, with optional `additionalInstructions`. See [Outfit transfer](./CHARACTERS.md#outfit-transfer). |
72
72
  | `mirror` | string | Another asset of the same style flipped left to right, made locally at no cost. See [Mirrors](./CHARACTERS.md#mirrors). |
73
73
  | `initImage` | string | `pixflux`, `map` and `isometricTile` styles: a PNG to start the drawing from, relative to the manifest. See [Starting from an image](#starting-from-an-image). |
package/docs/TILES.md CHANGED
@@ -174,7 +174,10 @@ The generic format is the lossless interchange contract:
174
174
  rectangle, optional bitmask, and `stampOnly`. A `terrain` tile finds its
175
175
  corners by role: its role may end in a number of the provider's own
176
176
  (`tile-06-wang-0`) that is not its place in the list, and a set exported by an
177
- older version put rules on the wrong tiles, so export it again
177
+ older version put rules on the wrong tiles, so export it again. A tile whose
178
+ role is not in the lock's `terrainTiles` takes the corners of the entry at its
179
+ own position, and `pixelkiln export` prints a `warning:` line naming the set
180
+ and the tiles; regenerate a set that warns and paints the wrong tiles
178
181
  - normalized rule type, arity, connectivity, terrain names, and masks
179
182
  - the complete raw provider rule object in `providerRules`, including rule
180
183
  families a current exporter does not yet normalize
@@ -240,9 +243,16 @@ the others with the terrain tool, higher terrains on top (ocean, then sand, then
240
243
  grass). The editor paints with `ignore_empty_terrains` off, and a script has to
241
244
  do the same: `set_cells_terrain_connect(cells, 0, terrain, false)`. With the
242
245
  script default of `true`, Godot leaves the edge cells of a filled area empty.
243
- The cells on the very edge of a terrain-painted area also pick border
244
- tiles, so paint the ground a little past the edge of the map or place the plain
245
- tile there directly.
246
+ A higher terrain that runs to the edge of the painted map ends in a border
247
+ there: a cell's corner or side that faces an empty cell takes the first
248
+ terrain, so a road painted off the side of the map gets a cap on its last
249
+ cell, and grass painted on an empty map gets a ring of the first terrain. The
250
+ first terrain itself fills to the edge cleanly. Godot's solver chooses that
251
+ terrain, not the TileSet, so paint one cell past the edge of the map, or set
252
+ the plain tile on the edge cells directly. (Measured in Godot 4.7.2 on all
253
+ five painted test sets: a 10x8 fill of the first terrain had no border on its
254
+ 32 edge cells, and a band of the second terrain across the full width had a
255
+ border on all four of its end cells.)
246
256
 
247
257
  The texture path is relative to the `.tres`, so the generated PNG and resource
248
258
  can move together inside a Godot project.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pixelkiln",
3
- "version": "0.119.0",
3
+ "version": "0.121.0",
4
4
  "description": "Manifest-driven pixel-art generation, review, recovery, and packaging with deterministic provenance.",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -1716,6 +1716,13 @@
1716
1716
  160
1717
1717
  ],
1718
1718
  "default": 64
1719
+ },
1720
+ "seed": {
1721
+ "type": "integer",
1722
+ "minimum": 0
1723
+ },
1724
+ "attach": {
1725
+ "type": "boolean"
1719
1726
  }
1720
1727
  },
1721
1728
  "required": [
@@ -39,6 +39,16 @@ PixelLab, and it also takes `isometric: true`, `textGuidanceScale` (1 to 20) and
39
39
  `backgroundRemoval: "complex"`; an asset may set `direction`, which only nudges, so state the
40
40
  facing in the prompt too. Each new option changes the asset's hash only when set.
41
41
 
42
+ A `portrait` may pin `seed` (a new seed is a new portrait), and the lock always
43
+ keeps the seed it drew with at `providerMetadata.pixellab.character.seed`;
44
+ PixelLab deletes finished jobs within a day, so that is the only copy. To
45
+ redraw a portrait the same way, copy that seed into the manifest. By default the
46
+ bust is attached to the parent's PixelLab character record; when the person
47
+ uses that character elsewhere, set `attach: false` rather than skipping the
48
+ portrait. To deliver only the bust and keep the parent's rotations out of the
49
+ game's art folder, put the style's `outDir` in a scratch folder and give the
50
+ portrait a `file` that climbs out of it (`"../../art/portraits/x.png"`).
51
+
42
52
  `tiles` is not limited to top-down ground: `tileType` selects the projection
43
53
  (`isometric` — the API default —, `oblique`, `hex`, `hex_pointy`, `octagon`,
44
54
  or `square_topdown`), `tileSize` sets one tile's edge in pixels (16–128 — the
@@ -48,7 +58,12 @@ camera (`top-down`, `high top-down`, `low top-down`, or `side`). `outlineMode`
48
58
  chooses `outline` (a dark border per tile — right for tiles meant to read as
49
59
  discrete objects) or `segmentation` (no border, so a ground set tiles
50
60
  seamlessly instead of quilting at every cell edge — this alone decided
51
- whether a measured terrain set was usable). `tileFeature` asks for a
61
+ whether a measured terrain set was usable). Isometric road sets (48 to
62
+ 96px) trade off: `low top-down` with `segmentation` is seamless but a flat 3:1
63
+ diamond that reads as top-down; `high top-down` makes a 2:1 diamond, but with
64
+ `segmentation` it left grass fragments outside the slab on 17 of 18 tiles, and
65
+ with `outline` every tile has a border, so a map shows a grid. Paint a map with
66
+ a road set before choosing. `tileFeature` asks for a
52
67
  connectable set instead of independent variations: `roads` for an
53
68
  18-configuration path set, `tileset` for a 16-tile Wang corner set — describe
54
69
  the transition itself in the prompt ("fairway grass to rough meadow"), not
@@ -193,6 +193,10 @@ terrain:
193
193
  Godot one terrain set; LDtk one value per terrain and a 16 by 12 Preview.
194
194
  - refused: a group with a sidescroller set, or sets with different tile sizes
195
195
  or shapes.
196
+ - a `warning:` line under a set means some of its tiles have a role that is not
197
+ in the lock's `terrainTiles`, so the export took their corners by position.
198
+ Tell the user, and if the painted map puts the wrong tiles at the shores,
199
+ regenerate that set. A single-set export prints the same warning.
196
200
 
197
201
  The flag is opt-in on purpose. Without it, existing exports and their file
198
202
  names do not move, and a game that loads `coast-tileset` keeps working. Do not
@@ -210,8 +214,10 @@ Tell the person when it matters:
210
214
  road network painted from the real isometric road set ran unbroken with
211
215
  correct corners and T-junctions. To paint, fill the ground with the lowest
212
216
  terrain's plain tile first, then paint higher terrains on top; a script must
213
- pass `ignore_empty_terrains` as `false`. The outermost cells of a
214
- terrain-painted area pick border tiles, so paint past the camera's edge.
217
+ pass `ignore_empty_terrains` as `false`. A higher terrain painted up to the
218
+ map's edge gets a border of the first terrain there (a road off the side ends
219
+ in a cap); Godot's solver does that, not the export, so paint one cell past
220
+ the camera's edge. The first terrain fills to the edge cleanly.
215
221
  - Godot isometric geometry: a 2x2 block of cells drawn in Godot 4.7.2 filled
216
222
  exactly the diamond lattice the cells predict, for the real 32px ground set.
217
223
  - Godot: the `.tres` for a square corner set and an isometric set loads in a