Skip to content

feat: add sky backdrops with cloud decks, storms, and lightning - #42

Merged
solomonneas merged 1 commit into
masterfrom
t3code/add-cloud-sky-backdrops
Jul 26, 2026
Merged

feat: add sky backdrops with cloud decks, storms, and lightning#42
solomonneas merged 1 commit into
masterfrom
t3code/add-cloud-sky-backdrops

Conversation

@solomonneas

Copy link
Copy Markdown
Collaborator

Adds a fourth backdrop family alongside the gradients, deep-space scenes, and geometric
patterns. A sky palette carries the colours and a SkyKind carries the structure, so
--palette and --sky compose the same way --palette and --scene already do.

Ten conditions: blue-hour, golden-hour, overcast, cirrus, mackerel, mammatus,
storm, bolt, aurora, crepuscular. Seven palettes sampled from photographs of the
named conditions, the same way the space palettes are sampled from astrophotography.

Everything is drawn from the style seed at render time on image + rand. No new
dependencies, nothing shipped as a bitmap, so a sky resolves at any card size and
--style-seed reproduces one exactly.

Existing seeds are unaffected

Sky palettes stay out of the default random rotation, which filters to
BackdropKind::Space (guarded by random_rotation_only_picks_space_palettes). They are
reachable by explicit --palette or by naming them in a pool, matching how the gradient
and pattern families already behave. Palette selection uses rendezvous hashing over names,
so a new palette only takes the seeds it wins and leaves the rest of the table alone.

Notes for review

  • Every real defect in this work was invisible to the test suite. The full suite passed
    green while three of the ten scenes rendered as speckle, halftone dots, and rounded
    squares. They were only caught by rendering PNGs and looking at them. Structural tests
    (opaque everywhere, varies across the canvas, reproducible from a seed, kinds differ from
    each other) cannot catch this class of bug, so the added tests are a floor, not a
    guarantee.

  • Preview any scene without needing a capture on disk:

    cloche studio --port 8137
    curl "http://127.0.0.1:8137/api/backdrop?palette=blue-hour&sky=bolt&seed=7&w=440&h=300" -o out.png
    
  • ConfigCommand::Set is boxed because the args struct now carries one field per styling
    axis and tripped clippy::large_enum_variant. No #[allow] was added anywhere.

  • storm is the weakest of the ten. Without bolts it reads as a murky field. It may not
    earn its place as a scene separate from bolt; happy to drop it if you agree.

Follow-on work for terrain backdrops (forest, ocean, dunes, mountains, plateaus) is
tracked in #41.

Verification

./scripts/verify
test result: ok. 212 passed; 0 failed

cargo fmt --check, cargo clippy --all-targets -- -D warnings, and cargo test, all
green.

Adds a fourth backdrop family alongside the gradients, deep-space scenes,
and geometric patterns. A sky palette carries the colours and a SkyKind
carries the structure, so --palette and --sky compose the same way
--palette and --scene already do.

Ten conditions: blue-hour, golden-hour, overcast, cirrus, mackerel,
mammatus, storm, bolt, aurora, crepuscular. Seven palettes sampled from
photographs of the named conditions, the same way the space palettes are
sampled from astrophotography.

Everything is drawn from the style seed at render time on image + rand,
with no new dependencies and nothing shipped as a bitmap, so a sky
resolves at any card size and --style-seed reproduces one exactly.

Sky palettes stay out of the default random rotation, which filters to
space palettes, so existing seeds render exactly as before. They are
reachable by explicit --palette or by naming them in a pool, matching how
the gradient and pattern families already behave.

ConfigCommand::Set is boxed because the args struct now carries one field
per styling axis and tripped clippy::large_enum_variant.
@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • coderabbit-review

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: escoffier-labs/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 58b93972-8908-4eed-9c7e-20471bbc5408

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch t3code/add-cloud-sky-backdrops

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@solomonneas
solomonneas merged commit 4d94a52 into master Jul 26, 2026
4 checks passed
@solomonneas
solomonneas deleted the t3code/add-cloud-sky-backdrops branch July 26, 2026 19:03
@solomonneas solomonneas self-assigned this Jul 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant