From 65d7018b9743f8ae7d31994f4903c0f274dd7c8a Mon Sep 17 00:00:00 2001 From: Mike Liu Date: Wed, 25 Feb 2026 05:54:48 +0000 Subject: [PATCH] Document FAL.ai scale-up findings and fix cross-platform stat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add findings from scaling the reskin pipeline to 552 sprites across 36 FAL.ai batches. Key insight: palette quantization is the primary blocker for AI-generated reskins — mechanical palette remap is more reliable. Also fix stat flags in build-reskin-upload.sh for Linux compatibility (stat -c%s with -f%z fallback). Co-Authored-By: Claude Opus 4.6 --- progress.txt | 31 +++++++++++++++++++++++++++++++ scripts/build-reskin-upload.sh | 4 ++-- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/progress.txt b/progress.txt index a468395660..c9efa4beda 100644 --- a/progress.txt +++ b/progress.txt @@ -95,3 +95,34 @@ Full test suite verification and CLI smoke test — all green. - No fixes needed — all prior stories left clean code. Status: PASSED Status: PASSED + + +--- FAL.ai Scale-Up Findings | 2026-02-25 --- + +Scaled the reskin pipeline to process Electric Fields scenario walls (26 objects, 84 sprites) +and paths (8 objects, 468 sprites) through FAL.ai Gemini 3 Pro image edit API. + +Pipeline execution: +- 36/36 FAL.ai batches succeeded (6 wall + 30 path) +- 552/552 sprites parsed and quantized to RCT2 palette +- 34 parkobj files rebuilt with correct sprite offsets +- End-to-end: batch → generate → parse → quantize → rebuild → deploy + +Key findings: +1. Sprite offsets (x,y in sprites-full.json) are critical — defaulting to 0,0 causes + severe misalignment. Must export via `openrct2-cli sprite exportobject` and parse stdout. +2. Palette quantization is the primary blocker for AI-generated reskins. The ~176 usable + RCT2 palette colors cannot represent neon/cyberpunk effects (cyan, magenta, glow). + AI output gets crushed to dark muddy blocks during quantization. +3. g1.dat modification is risky: sprites >256px must be cropped, but cropping breaks the + sprite index alignment causing black/purple checkerboard artifacts in-game. +4. Mechanical palette remapping (index swap, no AI) works perfectly — proven with purple + grass tint across all 29294 g1.dat sprites. +5. Objects-only deployment (parkobjs without g1.dat changes) is safe and functional. + +Recommended next steps: +- Option A: Palette-aware AI prompts ("use only these specific colors") +- Option B: Mechanical palette remap only (proven reliable, limited creative range) +- Option C: Hybrid — AI for shape/detail changes, then palette remap for color + +--- COMPLETE: All stories processed --- diff --git a/scripts/build-reskin-upload.sh b/scripts/build-reskin-upload.sh index d8c57b8aa3..4b3107911b 100755 --- a/scripts/build-reskin-upload.sh +++ b/scripts/build-reskin-upload.sh @@ -169,8 +169,8 @@ rm -f "$output_zip" LC_ALL=C find . -type f | sed 's#^\./##' | sort | zip -q -X "$output_zip" -@ ) -input_bytes="$(stat -f%z "$input_zip")" -output_bytes="$(stat -f%z "$output_zip")" +input_bytes="$(stat -c%s "$input_zip" 2>/dev/null || stat -f%z "$input_zip")" +output_bytes="$(stat -c%s "$output_zip" 2>/dev/null || stat -f%z "$output_zip")" delta_bytes="$((input_bytes - output_bytes))" echo