Bestiary portraits in the high-res style: a painted pixel-art bust for every creature
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a24fc51605
commit
8d2362fc11
41 files changed
+308
-1
No files matched your search
@@ -0,0 +1,62 @@
|
||||
# Bestiary portraits (fal.ai)
|
||||
|
||||
Generated on 2026-11-07/08: one portrait per creature kind (the 30 of
|
||||
`../sprites/manifest.json` plus the imp, `EK::Worker`) for the bestiary in the high-res style.
|
||||
Bust (head and shoulders; head and front body for beasts, the machine for the siege engines),
|
||||
three-quarter view, torch light from one side, dark dungeon wall behind.
|
||||
|
||||
- `<id>-raw.png`: the model output, 1024x1024 (local only, ignored by git).
|
||||
- `<id>-128.png`: the processed 128x128 pixel-art portrait (48 colours, opaque).
|
||||
- `../../../assets/portraits/portraits.png`: all 31 in one atlas, 8 columns x 4 rows of 128x128,
|
||||
in the order of `../../../assets/portraits/order.txt` (`EK` names; mirrored by `ORDER` in
|
||||
`src/portraits.rs`, a test checks both agree).
|
||||
|
||||
## Generation
|
||||
|
||||
- Model: `fal-ai/nano-banana-pro/edit` (POST https://fal.run/fal-ai/nano-banana-pro/edit)
|
||||
- `aspect_ratio: 1:1`, `resolution: 1K`, `num_images: 1`, `output_format: png`
|
||||
- Reference image (`image_urls`, data URI): the front and front three-quarter view of the
|
||||
creature's idle sheet `../sprites/<id>-64.png` (the imp: `assets/sprites/imp-64.png`),
|
||||
scaled 6x nearest onto a flat dark grey (768x384).
|
||||
- 31 images, no retries (every one showed the right character, no text). About $4.65.
|
||||
- Scripts in `scripts/`: `portraits.py` (descriptions taken from
|
||||
`../sprites/scripts/creatures.py` plus the imp, framing per kind, prompt template), `gen.py`
|
||||
(requests, 4 at a time; reads the key from `~/.config/dungeoncraft/fal-key`), `process.py`.
|
||||
- The first two (knight, spider) were sent before "(the torch itself outside the picture)" was
|
||||
added; they show a torch.
|
||||
|
||||
### Prompt template
|
||||
|
||||
`{thing}` is `character`, `creature` (beasts: spider, bat, owl, wyrm, beetle, cavebear,
|
||||
gargoyle) or `siege engine` (ram, catapult); `{framing}` is `a head-and-shoulders bust
|
||||
portrait`, `a close-up of its head and the front of its body (bust portrait)` or `a close-up of
|
||||
the front part of the machine with its crew-less wooden frame and iron parts`.
|
||||
|
||||
```text
|
||||
The attached image shows a small pixel art game sprite of the "{name}" (left: front view, right: three-quarter view). {desc}
|
||||
|
||||
Paint a PORTRAIT of exactly this {thing} for the illustrated monster compendium of a dark-fantasy dungeon strategy game: {framing}, three-quarter view turned slightly to the side, looking at the viewer, filling most of the square picture. It must clearly be the same {thing} as in the sprite: the same colours, clothing, armour, markings, gear and weapon (show the weapon or tool where it fits in the frame), but drawn with much more detail and slightly more natural, characterful proportions.
|
||||
|
||||
Style: hand-painted pixel art, like a detailed 128x128 pixel portrait scaled up with hard square pixels, a limited colour palette, clean dark outlines, no anti-aliasing blur, no smooth gradients, no photo realism.
|
||||
|
||||
Lighting and background: a little dramatic - a warm torch light from one side (the torch itself outside the picture) and a deep shadow on the other side, a rim light on the silhouette. Dark atmospheric dungeon background: rough stone wall in darkness, a faint glow and drifting dust or mist, darkening to near black at the edges.
|
||||
|
||||
Exactly one {thing}, no text, no letters, no name, no labels, no frame, no border, no signature, no UI.
|
||||
```
|
||||
|
||||
## Notes per creature
|
||||
|
||||
All usable as generated. Weaker in the "close-up" sense: the ram and the catapult show the
|
||||
whole machine rather than a close-up; the giant is a plain bald man with a club (as the sprite).
|
||||
The cave dwarf in the bestiary uses the dwarf miner's portrait (as it uses its sprite).
|
||||
|
||||
## Processing
|
||||
|
||||
```bash
|
||||
/tmp/sprvenv/bin/python -I scripts/gen.py # all, or: gen.py <id> ...
|
||||
/tmp/sprvenv/bin/python -I scripts/process.py
|
||||
```
|
||||
|
||||
`process.py`: whole picture (optional per-id crop fractions in `CROP`), box downscale to
|
||||
128x128, sharpness 1.6, quantize to 48 colours (max coverage, k-means 4, no dithering), RGB;
|
||||
writes `<id>-128.png`, the atlas and `order.txt`.
|
||||
Reference in new issue
Block a user