Repository navigation
[1/4] feat: split composed stage chunks into the layer stack - #104
Merged
Merged
Conversation
2 of 3 tasks
arudaev
marked this pull request as ready for review
October 23, 2026 20:27
3 of 4 tasks
# Conflicts: # .github/workflows/art-pipeline.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
scripts/split_layers.pycuts a composed 2160×720 stage chunk into the docs/04 layer stack (z0 sky … z7 foreground) and proves the cut is exact. The Hidden Garden (#65) needs this; until now only Rusty Creek had layers, made by its owncreek_layers.py.layers.jsonlists its chunks, their composed art per state, and ordered mask rules: rectangles, polygons, a colour within an area, or another image's alpha. A rule can apply to one state only.<chunk>.<layer>.png); one the anomaly changes gets a file per state.--check(no arguments = every region with alayers.json) proves the committed layers still rebuild the art, and now runs in the art workflow.Issue
Closes #64
Stack
Merge bottom up with merge commits; retarget the next PR to
mainbefore merging it.Same result as
creek_layers.py?The test splits the composed Rusty Creek left chunk, using the creek's own plate alphas as rules in its draw order. Every pixel lands in the layer
creek_layers.pydrew on top there, and the stack rebuildsafter-left.pngexactly.The colours can't match the creek plates, and no splitter of a finished image could match them. Those plates are soft: the bank, for example, has 27 fully opaque pixels and 313,892 partial ones, so the composed art is a blend. Rusty Creek keeps
creek_layers.py; new regions use the split.Verification
python -m unittest discover -s scripts -p "test_*.py": 6 new tests intest_split_layers.py:--checkcatches a stale layer;python scripts/split_layers.py --checkandpython scripts/check_docs.py