Repository navigation
artwork greebl
Working manual · 0.0.1-alpha · source snapshot 16 November 2026
Art Canvas → Start → Generators → GREEBL generates editable cells on the active layer. PANEL, CIRCUIT, WIRE, MATRIX, CITY and NOISE share a bounded, portable integer generator. The canvas size, other layers, bank links and palette remain unchanged. Locked active layers reject generation. No music format changes.
- D-pad Up/Down selects a control; Left/Right changes it. Hold A with Left/Right for steps of ten on numeric controls.
- L1/R1 changes between three pages.
- A on COLOUR, ACCENT or PALETTE FROM/TO opens the existing semantic swatch grid. D-pad navigates, A selects, B backs out.
- BANK selects a bank already loaded in Art Canvas. Load additional CTBs using the canvas bank browser before opening GREEBL.
- GLYPH SET selects ALL, BLOCK, LINE, BOX, TECH, SYMBOL or CUSTOM. On CUSTOM, press A to open the shared GlyphBrowser. A toggles membership; B finishes.
- SELECT toggles the large preview. B cancels the generator.
- Page three contains GENERATE (same seed), NEW (deterministic next seed), MUTATE (seed + 1), APPLY and CANCEL. Seed can also be adjusted directly.
- APPLY is one undoable transaction. Select+Y undoes it after closing the dialog; the canvas Redo command restores it. Cancelling never changes artwork/history.
Parameter changes regenerate the isolated preview. STYLE loads its defaults; PRESET loads an authored parameter recipe. Both preserve colour, bank, glyph-set, custom selection, seed and compositing choices. Density zero generates no cells. REPLACE replaces the active layer, OVERLAY preserves untouched cells, and EMPTY also preserves occupied cells. BACKGROUND defaults to KEEP; PRIMARY COLOUR is an explicit opt-in and participates in the same undo transaction.
Colour modes use the artwork's existing 32 semantic palette entries. SINGLE uses the primary, SHADE selects nearby RGB entries from that palette, ACCENT occasionally uses the accent, PALETTE uses coherent feature colours from the selected inclusive range, and RANDOM distributes permitted palette colours. No new RGB entries are created. Theme shadow remains 77/255 through the existing renderer.
Bundled files live in Asset/Greebl. Users can add files below their configured
content root without changing the application:
<content root>/Greebl/
GlyphSets/Default_12.txt
GlyphSets/MyBank.txt
Presets/MyHull.txt
For each selected bank, GREEBL looks for GlyphSets/<bank filename stem>.txt.
An identically named user file replaces the bundled mapping completely. Copy the
bundled file first when extending it. Unmapped banks fall back to glyph mosaics;
they are not assumed to have compatible line geometry. CUSTOM is exclusive and
an empty custom selection prevents Apply. Missing mapped IDs are filtered out.
Hidden and entirely blank masks are excluded from procedural placement.
Mappings are read when the dialog opens or BANK changes. Presets are read when the dialog opens. Close/reopen after editing resources. Invalid overrides report an error rather than silently loading a different mapping. Resources are capped at 1 MiB, 8192 mapping lines and 128 preset files; parsing is transactional.
Each mapping line has six fields and an optional seventh stroke-family field;
# begins a comment:
# ID GROUPS WEIGHT CONNECTIONS MIRROR_X MIRROR_Y
U+2500 LINE,BOX,TECH 4 10 U+2500 U+2500
U+250C LINE,BOX,TECH 4 6 U+2510 U+2514
CONTCII_453 TECH,SYMBOL 1 0 CONTCII_453 CONTCII_453
Unicode IDs are hexadecimal; CONTCII suffixes are decimal stable IDs, not browser positions. Groups are BLOCK, LINE, BOX, TECH and SYMBOL. Weight is 1–100. Connections use N=1, E=2, S=4, W=8, added together; zero means decoration. Mirror IDs should identify the actual reflected artwork. For asymmetric custom glyphs without partners, self references preserve cell placement only. A 180° rotation applies both mirrors. Only eligible mirror partners can be selected.
Provide all required junctions for a coherent connected family. The optional stroke field is 0 for thin (default), or 1 for heavy/double. SCALE below 65 selects thin strokes; larger values prefer heavy strokes where available. With several glyphs for a connection mask/family, the first eligible glyph in bank-ID order is the structural choice. Weights affect decorative selection. Structural paths are resolved after layout; reciprocal edges are checked at symmetry seams and canvas bounds. A bank missing a connection shape falls back to eligible motifs.
Preset files contain STYLE (0–5), DENSITY, SCALE, DETAIL, ORDER, SPACING, DIRECTION (each 0–100), and SYMMETRY (0 none, 1 left/right, 2 top/bottom, 3 both, 4 180°). The filename supplies the displayed preset name. User files with the same name override bundled files; other filenames add presets. The six bundled recipes are HULL, PCB, WIRED, TERMINAL, MEGACITY and GLITCH.
src/core/graphics/Greebl owns generation and text parsing; it has no SDL/UI
dependencies. application/GreeblResources resolves files. scene/GreeblDialog
owns modal controls and an isolated preview rendered by ArtCanvasRenderer.
ArtCanvasEditor::applyGeneratedLayer owns validation and history. Generation
runs only in response to edits, never on the audio thread or every rendered frame.
The preview caches banks once and replaces only its generated layer on changes.
The supplied Dialog_9s_Greebl.ctg is retained under Asset/Greebl/UI. Its private
Dialog.ctb contains only the source dialog's referenced masks, preserving the
authoring bank revision without changing the runtime glyph bank. UI colour roles,
layer offsets and nine-slice geometry are baked by the existing dialog tool:
build/bin/Debug/ContourBakeDialogSkins.exe Asset/Greebl/UI Asset/Font/Bescii-Basic.bmp src/application/GreeblSkinData.hpp --greeblNormal builds use the checked-in header. Generated art references the selected canvas bank; it does not reference this dialog-only bank or store image textures. Same seed, settings, eligible bank masks/order, mapping, palette, dimensions and source layer produce the same cells across platforms. Keep resource versions with a recipe if reproducibility across later bank edits matters.
| Documentation still to add |
|---|
| Annotated current-build screenshots and a recorded controller walkthrough for this topic. |
Repository sources used for this page:
docs/greebl.md
This is a documentation/source review, not a new runtime or hardware test. Physical response, screenshots and listening examples still need verification on a recorded build.