Ridge: near-cover check measures a notch against 8 columns each side; scrim kept over the settled still
The body-end check compared each column only with its neighbour, so an early dissolve that eased over a few columns passed it. It now refuses a column whose body ends more than 40 px short of the deepest end within 8 columns either side. The old Vienna bake (12e733dc9f09) fails it at column 1251 (42 px); the committed rebake (f25b2314a20c) passes in all six frames. Mutants added for the window. The night scrim was dropped when the scene settled to a still frame; it is now rebuilt over the canvas after the planes are painted (gradient with planes, flat without), with a test for both. Recovered from Nibu's uncommitted work at the 2026-11-17 brake. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
c10f02a4a1
commit
24e1a1c3e2
6 changed files with 66 additions and 30 deletions
|
|
@ -91,7 +91,8 @@ M = {
|
|||
'near foot step not eased (the widest foot in the margin dropped)': ('ridge.py', 'return np.maximum(blurw(slide_max(foot, NEAR_FOOT_MARGIN_PX), NEAR_FOOT_MARGIN_PX / 2.0), foot)', 'return foot'),
|
||||
'near foot widest-in-margin without the easing': ('ridge.py', 'blurw(slide_max(foot, NEAR_FOOT_MARGIN_PX), NEAR_FOOT_MARGIN_PX / 2.0)', 'slide_max(foot, NEAR_FOOT_MARGIN_PX)'),
|
||||
'near foot margin of one column': ('ridge.py', 'NEAR_FOOT_MARGIN_PX = 48', 'NEAR_FOOT_MARGIN_PX = 1'),
|
||||
'near cover allows any step in where the body ends': ('export.py', 'NEAR_END_STEP_PX = 24 ', 'NEAR_END_STEP_PX = 600 '),
|
||||
'near cover allows any notch in where the body ends': ('export.py', 'NEAR_END_DROP_PX = 40 ', 'NEAR_END_DROP_PX = 600 '),
|
||||
'near cover looks at no neighbour (window of zero)': ('export.py', 'NEAR_END_WINDOW = 8', 'NEAR_END_WINDOW = 0'),
|
||||
'near cover measures the body end at alpha above any pixel': ('export.py', 'NEAR_BODY_ALPHA = 40 ', 'NEAR_BODY_ALPHA = 256 '),
|
||||
'near cover looks below the horizon too': ('export.py', '& (rows < int(horizon_row))', '& (rows < h)'),
|
||||
'near cover crest threshold above any alpha': ('export.py', 'NEAR_CREST_ALPHA = 64 ', 'NEAR_CREST_ALPHA = 256 '),
|
||||
|
|
|
|||
|
|
@ -461,9 +461,9 @@ def test_near_foot_reaches_the_horizon_and_a_step_in_it_is_eased_not_cut():
|
|||
assert np.abs(np.diff(f)).max() < 8.0, np.abs(np.diff(f)).max()
|
||||
assert ridge.near_foot(np.full(400, 1.0), np.full(400, 5.0)).min() >= 5.0 * ridge.PXDEG_V / ridge.FADE_AT - 1e-6
|
||||
ok = np.zeros((60, 40, 4), np.uint8); ok[10:, :, 3] = 200; export.check_near_cover(ok, 30.0)
|
||||
early = ok.copy(); early[25:, 30:, 3] = 0
|
||||
try: export.check_near_cover(early, 20.0)
|
||||
except ValueError as e: assert 'step' in str(e), str(e)
|
||||
early = ok.copy(); early[15:, 30:, 3] = 0
|
||||
try: export.check_near_cover(early, 12.0)
|
||||
except ValueError as e: assert 'notch' in str(e), str(e)
|
||||
else: assert False, 'a near plane whose body ends early in a few columns was accepted'
|
||||
def test_write_bake_refuses_a_near_plane_with_a_wedge_and_lets_the_other_planes_have_empty_columns():
|
||||
"""The refusal is at the writer, on the decoded near plane of every frame; the far and mid planes may have transparent columns (a place with no ridge at that distance in part of the window)."""
|
||||
|
|
|
|||
Loading…
Reference in a new issue