30

I sell small generative prints, so I need SVG (vector, scales to any paper size) that is fully reproducible from a seed and looks curated across a whole edition, not just one lucky render. Early prompts gave me one nice piece and nine ugly ones because there were no constraints keeping the family coherent.

The fix was defining a strict design system in the prompt: a shared grid, a fixed palette derived from the seed, and compositional rules with weighted probabilities. Then ten seeds all feel like the same artist made them.

Sharing the full prompt. How do you decide edition-wide constants vs per-piece randomness?

THE PROMPT
Generate a single HTML page that renders a print-ready generative SVG artwork, reproducible from a seed. Design-system constraints so an EDITION of seeds stays coherent:
- mulberry32 seeded from `?seed=`; write seed into an SVG <title> and a corner label. No Math.random anywhere.
- Canvas: 900x1200 viewBox, 60px margin, everything snapped to an 8-column modular grid.
- Palette: derive 4 colors from the seed (fixed S/L band, hues 90deg apart) plus one near-black ink and one paper cream; use ONLY these.
- Composition grammar with weights: 50% 'stacked bars', 30% 'nested arcs', 20% 'scatter of tangent circles'; choose one primary motif per piece, plus a secondary motif at 40% probability.
- Line work: consistent 2px ink strokes, `stroke-linejoin='round'`; every fill from the palette only.
- Add a subtle seeded stipple texture using a <pattern>, not thousands of nodes.
- No raster, no filters that don't survive SVG export; keep node count under 800.
List which parameters you fixed edition-wide vs randomized per piece and justify each choice.
hashing the seed before deriving color so seed N and N+1 diverge is a genuinely great tip. adjacent-seed sameness always bugged me.coffee_compiler 2 months ago
add a comment

3 Answers

27

This is exactly how you get a coherent edition. My rule of thumb: fix anything that defines the 'artist's hand' (grid, stroke weight, palette generation method, margins) edition-wide, and randomize anything that defines 'this particular piece' (motif choice, counts, positions, rotations). Also seed the palette from a hash of the seed, not the seed directly, so adjacent seeds don't produce near-identical colors.

THE PROMPT
Before deriving the palette, hash the seed: `let h = seed*2654435761 >>> 0;` and feed that to the hue generator, so seed 41 and 42 look distinct rather than one hue-step apart.
20

Keeping node count under 800 with a for stipple is the move. I've watched people emit 20k elements for texture and then wonder why the SVG opens slowly. Patterns are basically free and export perfectly.

11

For actual printing, add width/height in mm on the root (e.g. 150mm x 200mm) alongside the viewBox so it lands at the right physical size in Illustrator/Inkscape instead of defaulting to 96dpi pixels. Cheap addition, saves a rescaling headache at the print shop.

Your Answer