feat(editor): add --gen-texture-planks floor-board pattern

49th procedural texture: horizontal plank-floor pattern.
Each plank gets:

  • a hash-derived per-plank brightness offset (-24..+24)
    so adjacent boards read as separate pieces of wood
    rather than one long stripe
  • a 1px horizontal seam at its bottom edge
  • a 1px vertical end-seam at a hash-jittered x position,
    staggering plank ends across rows
  • optional darker grain streaks at evenly-spaced columns
    (jittered per plank so the pattern doesn't grid-align)

Useful for inn/tavern floors, ship deck planking, bridge
surfaces, market-stall counters, and any wood-floor surface
where the existing single-grain --gen-texture-wood would
read as one giant board.

Default 16px plank height with 5 grain streaks gives a
recognizable floor at 256x256 without aliasing.
This commit is contained in:
Kelsi 2026-05-09 10:44:13 -07:00
parent 5e404a9fe6
commit f8bd4c70c8
3 changed files with 114 additions and 0 deletions

View file

@ -131,6 +131,8 @@ void printUsage(const char* argv0) {
std::printf(" Knit: V-stitch chevron-zigzag pattern reading as knitted fabric stitches\n");
std::printf(" --gen-texture-chainmail <out.png> <bgHex> <ringHex> [cellW] [cellH] [ringR] [strokeW] [W H]\n");
std::printf(" Chainmail: brick-offset ring outlines for armor/mail textures (interlocking metal rings)\n");
std::printf(" --gen-texture-planks <out.png> <bgHex> <seamHex> [plankH] [grains/plank] [seed] [W H]\n");
std::printf(" Planks: horizontal floor boards with per-plank tint, grain streaks, and stagger seams\n");
std::printf(" --add-texture-to-zone <zoneDir> <png-path> [renameTo]\n");
std::printf(" Copy an existing PNG into <zoneDir> (optionally renaming it on the way in)\n");
std::printf(" --gen-mesh <wom-base> <cube|plane|sphere|cylinder|torus|cone|ramp> [size]\n");