Skip to content

test(engine): mask the shutter's sweep in the blur outside check - #7620

Open
maurild14 wants to merge 1 commit into
heygen-com:mainfrom
maurild14:fix/motion-blur-outside-mask-shutter
Open

maurild14 wants to merge 1 commit into
heygen-com:mainfrom
maurild14:fix/motion-blur-outside-mask-shutter

Conversation

@maurild14

Copy link
Copy Markdown

Fixes #7596

What

Test-only change, no runtime change. The "outside the trail" check now builds its trail mask from the blur-off shutter samples at t as well as the whole neighbour frames.

Why seed 63098 fails

The failure is in the test's oracle, not in the blur. In seed 63098, #lt (a left/top mover) crosses about 70 px between frame 5 and frame 6. Its path from x 112 to 141 sits behind the static #fl panel, so the only place it shows is x 142 to 146, and neither whole frame lands there:

row y=130, x 100..199, blur off        R = #lt, B = #fl
t=0.1667  ......RRRRRRBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB.............................
t=0.2000  ............BBBBBBBBBBBBBBBBBBBBBBBBBBBBBB.....RRRRRRRRRRRRRRRRRRRRRR...
shutter t=0.1903 (blur off, sub-frame)
          ............BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBRRRRRRRRRRRRRRRRRRRRRRRR.....
blur on at t=0.2
          ............BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBrrrrrrrrRRRRRRRRRRRRRRRRRRRRRR

measureOutside masked only what changed across frames t±2 (dilated by 2 px), so its mask started at x 145. The 240° shutter does sweep #lt through x 142 to 146, and blur on correctly draws a faint trail there (16,19,26 becomes 83,31,39). That trail landed in the "outside" tiles at x 128 to 143, which gave the reported 2 bad tiles with a worst MAE of 4.0.

Adding the shutterTimes(t) samples, which are the same sub-frame poses measureInside already averages, to the mask covers exactly what the blur integrates. On hold frames those samples are identical to the reference, so the mask does not change there.

Verification

Run locally with the CI's pinned chrome-headless-shell@153.0.8010.36:

  • Before the change: HF_BLUR_SEEDS=63098 fails with the same tiles and MAE as the nightly report ([{"x":128,"y":112,"mae":1.77},{"x":128,"y":128,"mae":4.04}]).
  • After the change: HF_BLUR_SEEDS=63098,62660,1-100 gives 102 of 102 passing.
  • captureMotionBlur.differential, .differential.filter and .differential.inside give 100 of 100 passing.
  • Sensitivity is unchanged. With fix(core): the filter tier's svg no longer changes which child is last in the root #7293 reverted locally (document.documentElement.append(defs) changed back to root.append(defs)), seeds 1 to 200 still fail exactly the 28 seeds that carry lastChild, the same count test(engine): nightly motion blur run over generated compositions #7437 reported, and no other seed fails.
  • oxfmt --check, oxlint, tsc --noEmit (engine), check-comment-citations.mjs and comment-ratchet.mjs all pass.

Seed 62660 (#7486) passes locally both before and after this change, so I'm not claiming it here.

A mover that jumps further than the mask dilation between two whole
frames was never sampled in the gap, so the blur trail it correctly
leaves there read as an outside-the-trail defect (seed 63098). Build the
outside mask from the blur-off shutter samples at t as well.

Fixes heygen-com#7596

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

motion blur nightly: seed 63098

1 participant