Commit graph

28 commits

Author SHA1 Message Date
Kelsi
c4ff7e583c feat(editor): add --gen-texture-leopard animal-print pattern
45th procedural texture: leopard print spots done as the
union of 4 small overlapping sub-circles per spot. The
sub-circle offsets are jittered per-spot so each spot has
an irregular non-circular silhouette without authoring per-
spot polygons. Two-color (bg + spot) for the classic
leopard look.

Useful for animal-print fabric, fur tiles, druidic robes,
shamanic hide drums, hunter armor textures. Defaults to 60
spots of ~8-px radius across 256×256.
2026-05-09 09:51:58 -07:00
Kelsi
288c4e93b6 feat(editor): add --gen-texture-runes magical-glyph pattern
44th procedural texture: scattered angular runes drawn as
3-5 random stroke segments per glyph. Each stroke uses one
of 8 cardinal/diagonal angles (0/45/90/135/...°) so the
strokes read as deliberate runic carvings rather than random
scribbles. Layout is a sparse grid with per-slot jitter and
~5% empty slots so the result looks hand-carved rather than
mechanical.

Useful for ancient ruins, magical zones, dwarven walls,
necromancer altars, druidic shrines. Defaults to a 64-px
grid spacing yielding ~15 runes in a 256×256 image.
2026-05-09 09:42:10 -07:00
Kelsi
47b4501767 feat(editor): add --gen-texture-cracked branching-walk pattern
43rd procedural texture: organic crack network done via
recursive random walks from N seed nuclei. Each seed spawns
a crack that walks in a random direction for some length,
then with 60% chance branches into one or two more cracks
of half-remaining length. Most cracks die out after a step
or two, a few branch into longer networks — the bias matches
real-world fissure formation.

Useful for cracked mud, dry earth, broken glass, weathered
stone, dragon skin overlays, ice-shard effects. Defaults
to 12 seeds at 40-px max length. Iterative DFS instead of
true recursion so deep branching chains never blow the
stack.
2026-05-09 09:06:56 -07:00
Kelsi
98e3bbd58c feat(editor): add --gen-texture-honeycomb hexagonal-cell pattern
42nd procedural texture: hexagonal cell tiling produced by
Voronoi over a triangular seed lattice — alternating-row hex
seeds at horizontal step sqrt(3)*s and vertical step 1.5*s
naturally produce perfect hexagonal Voronoi cells without
needing the full pointy-top hex-tile math.

Border pixels are detected by ratio of second-nearest /
nearest seed distances (1.04x threshold) so border thickness
scales naturally with hex size and stays a couple of pixels
across the whole image. Useful for beehives, dragon scales,
sci-fi panels, magical wards, mosaic tile floors. Defaults
to 16-px hex side.
2026-05-09 08:49:51 -07:00
Kelsi
16f9c072c7 feat(editor): add --gen-texture-lattice diagonal-grid pattern
41st procedural texture: garden trellis / mesh fence done as
two perpendicular sets of diagonal lines (+45° and -45°)
drawn simultaneously across the whole image so they form
diamond-shaped openings between the lines.

Distinct from --gen-texture-herringbone (which alternates
strip orientation): lattice draws both diagonal sets at every
pixel. Useful for trellises, wire mesh fences, dragon-scale
chain mail, decorative window grilles. Defaults to 24-px line
spacing with 3-px line width.
2026-05-09 08:40:14 -07:00
Kelsi
84403027ae feat(editor): add --gen-texture-gingham 3-tone fabric pattern
40th procedural texture: classic gingham picnic-blanket /
shirt fabric — two perpendicular sets of stripes with a
darker color where they cross. The crossing creates the
characteristic 3-tone checker pattern that's distinct from
plain --gen-texture-checker (solid blocks).

Useful for picnic blankets, country tablecloths, NPC shirt
textures, fabric set dressing. Defaults to 16-px stripe
spacing with 8-px stripe width (50% coverage per axis).
2026-05-09 08:24:12 -07:00
Kelsi
83a6992ae0 feat(editor): add --gen-texture-spider-web radial-ring pattern
39th procedural texture: classic geometric spider web — N
radial spokes plus M concentric polygonal rings centered on
the image. Spoke pixels are detected by angular distance to
the nearest spoke scaled by radius, so spokes stay constant
pixel width regardless of how far they reach.

Useful for haunted house decals, dungeon corner overlays,
witch-hut interiors, magical-trap ground markers. Defaults
to 8 spokes (every 45 deg) and 5 evenly-spaced rings.
2026-05-09 08:14:04 -07:00
Kelsi
56cad647b0 feat(editor): add --gen-texture-bubbles overlapping-circle pattern
38th procedural texture: scattered bubbles done as randomly-
placed circles of varied radii, with bright rim outlines that
stay visible even where bubbles overlap (rim color wins on
any pixel that lies in any bubble's ring band).

Three colors: background, translucent-feeling fill for the
bubble interior, and a bright rim. Defaults to 50 bubbles
of radius 6-24 px with 2-px rims. Useful for water surfaces,
foam patches, soap suds, magical-effect overlays, slime
particle effects.
2026-05-09 08:03:54 -07:00
Kelsi
4189051c09 feat(editor): add --gen-texture-parquet basket-weave wood floor
37th procedural texture: basket-weave parquet flooring done as
a checkerboard of 2N x 2N cells. Half the cells are split into
two horizontal planks (wood A); the other half are split into
two vertical planks (wood B). Adjacent perpendicular pairs
form the classic interlocked basket-weave.

A third "gap" color paints thin lines along plank edges and
the cell midline, giving the inset / wood-joint appearance.
Defaults to 32-px cells with 1-px gaps. Useful for parlour
floors, manor halls, magical libraries, dwarven flooring.
2026-05-09 07:52:29 -07:00
Kelsi
a07df23755 feat(editor): add --gen-texture-frost crystal-rosette pattern
36th procedural texture: scattered ice nuclei with 6-spike
rosettes radiating at 60 deg intervals. Each spike's pixel
intensity falls linearly from full at the seed to zero at
the end of the ray, so spikes fade naturally into the
background. Per-seed angular jitter prevents all rosettes
from aligning to the same orientation.

Useful for winter zones, ice biomes, frosted-window decals,
magical cold-effect overlays. Defaults to 80 seeds with
18-px rays in 256x256.
2026-05-09 07:41:17 -07:00
Kelsi
4ec0c1aea2 feat(editor): add --gen-texture-shingles roof-tile pattern
35th procedural texture: roof shingles done as half-row-staggered
rows of rectangular tiles. Three colors: shingle base, a shadow
band at the top of each row (where the row above overlaps), and
thin vertical seams between adjacent shingles in the same row.

The half-row stagger comes from the standard roofing convention
of offsetting alternate courses by half a tile width — gives the
classic interlocked look that pure brick patterns lack.

Useful for roofs, scale armor close-ups, fish bellies, anywhere
needing tightly-packed offset rectangles. Defaults to 32x24
shingles with 4-px shadow + 1-px seams.
2026-05-09 07:30:50 -07:00
Kelsi
c572c16114 feat(editor): add --gen-texture-stained-glass voronoi pattern
34th procedural texture: cathedral / magical-window stained
glass done as a Voronoi-cell tessellation. Each pixel snaps to
its nearest seed point; pixels near a cell boundary (small
relative gap to the second-nearest seed) become the lead color
producing the leaded-glass dividers between colored regions.

Three stained colors cycle across cells (cellIdx % 3) for a
balanced palette without per-cell color authoring. Defaults to
32 cells in 256x256, using ratio-based boundary detection so
lead-line thickness scales naturally with cell density.

Useful for cathedral windows, mage tower decals, magical
portals, ritual circle backdrops.
2026-05-09 07:19:02 -07:00
Kelsi
b783a62289 feat(editor): add --gen-texture-scales overlapping-circle pattern
33rd procedural texture: fish / dragon / chain mail scales done
as a half-row-staggered grid of circles whose centers sit at the
bottom-center of each cell. Adjacent rows offset by half a cell
width, with circle radius slightly larger than half the cell, so
the circles interlock into the classic overlapping-scale look.

Three colors: background fills the gaps, scale body fills most of
each circle, and a rim color highlights the top arc to give the
raised / armored feel.

Defaults to 24×16 cells; scaled by cellW × cellH for fine control
of scale density. Useful for chain mail, dragonhide, fish skin,
roof shingles, anywhere needing tiled curved scales.
2026-05-09 07:06:29 -07:00
Kelsi
c1f3d5aba4 feat(editor): add --gen-texture-herringbone chevron pattern
32nd procedural texture: classic V-shaped herringbone done as
horizontal strips of parallel slanted lines whose slant
direction flips every strip. Implementation is a per-pixel
shear: shifting x by the row's local-y collapses each diagonal
into a vertical band in shifted-x space, so a single modulo
picks line vs background.

Useful for parquet floors, brick patios, fabric weaves, fish
scale-style chain mail, anywhere needing a strong directional
pattern. Two-color, defaults to 32-px strips with 12-px line
spacing and 4-px line width.
2026-05-09 06:49:29 -07:00
Kelsi
8cd6f46aa3 feat(editor): add --gen-texture-argyle sweater-knit pattern
31st procedural texture: classic argyle pattern done by working
in a 45-rotated coord system (u, v) = (x+y, x-y) so lozenges
become axis-aligned squares for the checkerboard step. Diagonal
stitch lines fall out of u%cell and v%cell crossing zero.

Three-color: A/B for the alternating diamond fill, third color
for the diagonal stitch overlay. Defaults to 64-pixel cells with
2-pixel stitches. Useful for sweater fabric, seat cushions,
heraldic banner overlays.
2026-05-09 06:29:16 -07:00
Kelsi
8fd6df6113 feat(editor): add --gen-texture-tartan plaid pattern
3-color crossing-band pattern: 6-band repeat sequence (A A B
C C B) per axis, with the pixel color at any position being
the average of the horizontal-band and vertical-band colors.
That averaging at intersections produces the characteristic
diamond grid of Scottish tartans without explicit "weave"
math — the band overlap pattern just falls out.

Defaults: bandPx=32 (repeat=192px). Useful for clan banners,
kilts, blanket textures, fabric set dressing. Brings the
procedural texture pattern set to 33.
2026-05-09 06:02:13 -07:00
Kelsi
e95dd7692b feat(editor): add --gen-texture-flame fire pattern
Vertical color gradient from dark (bottom) to hot (top), mixed
with multi-octave smooth noise so the flame boundary wavers
randomly rather than reading as a clean horizontal line.
Vertical position curve is squared so the dark stays dark
longer and the hot saturates faster — matches real-flame
appearance where most of the body is dark with a bright tip.

Useful for torches, braziers, magical effects, lava-zone set
dressing, fireplace texture details. Brings the procedural
texture pattern set to 32.
2026-05-09 05:38:18 -07:00
Kelsi
b2cc1b7523 feat(editor): add --gen-texture-coral branching reef pattern
Water-color background with N branching coral structures
that grow from the bottom edge upward. Each branch walks a
curved path (random angle drift) drawing a thick stroke,
splitting into thinner sub-branches at random intervals so
the result reads as organic coral rather than straight lines.

Iterative stack-based growth (no recursion) with split cap
at 256 to bound runtime. Defaults: branchCount=12, seed=1.
Useful for underwater zones, ocean floor, mer-people set
dressing, swamp coral fungi. Brings the procedural texture
pattern set to 31.
2026-05-09 05:11:40 -07:00
Kelsi
3e3ba5012b feat(editor): add --gen-texture-circuit sci-fi PCB pattern
Solid PCB background plus N traces that walk the surface in
orthogonal Manhattan style — each trace alternates random
horizontal + vertical segments (3-6 segments per trace,
8-32 px each), with a 3×3 "via" dot at every corner so the
routing reads as intentional rather than random scribbles.

Defaults: traceCount=24, seed=1. Useful for sci-fi panels,
hacker zones, magitek/arcanocore set dressing, robot
texture details. Brings the procedural texture pattern set
to 30.
2026-05-09 04:42:31 -07:00
Kelsi
4df8661017 feat(editor): add --gen-texture-rust oxidized-metal pattern
3-octave smooth noise field thresholded by `coverage` to make
rust blob regions, blended with the metal base color via a
0.12-wide smoothstep so patches feather into clean metal
rather than stepping. Per-pixel grain jitter on top so neither
material reads as flat.

Defaults: coverage=0.4 (~40% rust), seed=1. Useful for
weathered armor, abandoned machinery, ruined castle gates,
shipwreck debris. Brings the procedural texture pattern
set to 29.
2026-05-09 04:01:49 -07:00
Kelsi
6b1b901bc5 feat(editor): add --gen-texture-mosaic 3-color tile pattern
Per-cell hash picks one of 3 colors for each square tile, with
1-pixel black grout on the top + left edges of every cell so
tiles read as physically separated. Exit log breaks down how
many tiles got each color so callers can verify the seed
distribution.

Defaults: tilePx=16, seed=1. Useful for cathedral floors,
stained-glass set dressing, ornate plaza paving. Brings the
procedural texture pattern set to 28.
2026-05-09 03:23:01 -07:00
Kelsi
9890429e3c feat(editor): add --gen-texture-vines climbing-plant pattern
Solid wall background plus N vine paths that walk upward from
the bottom edge with a smooth cosine drift + tiny per-step
horizontal jitter. Each vine paints 2 pixels wide on every row
it visits so the trail reads as a thin band rather than a
single-pixel line.

Defaults: vineCount=8, seed=1. Useful for ruined castle walls,
overgrown ruins, jungle temple textures, ivy-covered facades.
Brings the procedural texture pattern set to 27.
2026-05-09 02:37:06 -07:00
Kelsi
2d81bc9f6b feat(editor): add --gen-texture-stars night-sky pattern
Solid background fill plus randomly placed stars at varied
brightness — most stars dim (30-65% blend toward star color),
occasional bright stars (85-100% blend) — so the sky reads
with depth rather than as uniform noise. Exit log breaks down
how many bright vs faint stars actually landed.

Defaults: density=0.005 (~0.5% of pixels become stars), seed=1.
Useful for skybox top-faces, distant night sky planes, magical
constellation set dressing. Brings the procedural texture
pattern set to 26.
2026-05-09 01:32:08 -07:00
Kelsi
08f740a1ff feat(editor): add --gen-texture-clouds sky pattern
Multi-octave cosine-product noise (4 octaves at doubling
frequency, halving amplitude) thresholded by `coverage` so
values above the threshold blend toward cloud color and below
fade to sky. A 0.15-wide smoothstep band feathers cloud edges
instead of stepping hard.

Defaults: coverage=0.5 (mixed clouds), seed=1. Useful for
skybox cubemaps, distant sky planes, atmospheric backdrop
art. Brings the procedural texture pattern set to 25.
2026-05-09 00:20:14 -07:00
Kelsi
16ae6489c9 feat(editor): add --gen-texture-bark tree-bark pattern
Vertical streaks of varying brightness (per-column hash gives
each streak a stable shade in 0.85..1.10) sway-warped per-row
via a slow cosine offset, plus dark vertical cracks at random
columns where bark splits as the trunk expands.

Defaults: density=0.04 (~4% of columns become cracks), seed=1.
Useful for tree-trunk textures, wooden palisades, bark-clad
buildings. Brings the procedural texture pattern set to 24.
2026-05-08 23:15:03 -07:00
Kelsi
ec9c7898d2 feat(editor): add --gen-texture-tile square stone tile pattern
Per-cell pattern: each pixel falls into a tile cell with grout
on every grid edge. Tiles get a stable per-tile shade jitter
(via integer-cell hash) so adjacent tiles look distinct rather
than identical. Grout is the constant separator color.

First new texture added directly to cli_gen_texture.cpp instead
of main.cpp — proves the modular pattern works for new
additions, not just extractions.

Defaults: tilePx=32, groutPx=2. Useful for floors, plaza
paving, dungeon walls. Brings the procedural texture pattern
set to 23.
2026-05-08 22:01:31 -07:00
Kelsi
36cc2ee11d refactor(editor): extract remaining 12 texture generators into cli_gen_texture.cpp
Completes the texture-family extraction started in 6ea2dfcf.
Moves the 11 older simpler texture handlers (gradient, noise,
noise-color, radial, stripes, dots, rings, checker, brick, wood,
grass, fabric) into the existing cli_gen_texture.cpp module.
Each previously had its own ~30-line copy of parseHex; all now
use the shared helper at file scope.

Also fixed a pre-existing match-order issue: the dispatcher
checks --gen-texture-noise-color before --gen-texture-noise so
the prefix-match doesn't shadow the longer name.

main.cpp drops 25,494 → 24,270 lines (-1,224). All 19 texture
generators (12 just-extracted + 7 from the previous batch) now
live in their own translation unit. Behavior verified by
re-running gradient/noise/noise-color/checker/fabric.
2026-05-08 21:41:24 -07:00
Kelsi
6ea2dfcf8c refactor(editor): extract 7 newer texture generators into cli_gen_texture.cpp
Moves the Worley/cellular-noise-based texture handlers
(--gen-texture-cobble, -marble, -metal, -leather, -sand,
-snow, -lava) into their own translation unit. Each handler
previously had its own ~33-line copy of the parseHex lambda;
all 7 copies are replaced with a single shared parseHex
helper at file scope.

Older simpler generators (gradient/noise/radial/stripes/dots/
rings/checker/brick/wood/grass/fabric) still live in main.cpp
and will be migrated in subsequent batches.

main.cpp drops 26,286 → 25,494 lines (-792). Behavior
unchanged across all 7 handlers (re-verified).
2026-05-08 20:59:02 -07:00