Skip to content

Honor mask extrude thickness beyond paint depth - #667

Merged
leonardoaraujosantos merged 1 commit into
mainfrom
fix/660-mask-extrude-surface-projection
Sep 29, 2026
Merged

leonardoaraujosantos merged 1 commit into
mainfrom
fix/660-mask-extrude-surface-projection

Conversation

@leonardoaraujosantos

Copy link
Copy Markdown
Contributor

Summary

  • Project field extrude samples back to the source surface before reading the painted mask, so paint depth no longer caps wall height.
  • Grow voxel walls from masked surface cells along estimated normals for the requested number of layers, while preserving source colours.
  • Document the surface-anchored mask behavior in the API and OpenSpec.

Regression coverage

  • Measure 0.05, 0.1, and 0.6-unit field walls along three normals, including near the mask edge, and bound height variation across the patch.
  • Measure voxel wall height at the same thicknesses and compare a 0.6-unit voxel wall to the field extract within one voxel.
  • Run all C++ and C ABI mask extrude tests: 17 cases, 33,710 assertions passed.
  • Validate the OpenSpec change and run git diff --check.

Fixes #660. ClaySpaceDesktop#178 can remove its documented cap and pin the next ClayCore release after this lands.

@leonardoaraujosantos
leonardoaraujosantos merged commit 9c95533 into main Sep 29, 2026
16 checks passed
leonardoaraujosantos added a commit that referenced this pull request Oct 4, 2026
Covers the twenty PRs since v0.120.1 (#655, #667-#669, #673-#688), ABI
minors 0.121.0 through 0.126.0, and the scene format minor 19 -> 20.
The device gate block is a placeholder until the iPad run is recorded.

Carries the four manual hardware gates forward as waivers at 4401b35:
the only kernel-relevant change since 59e42cc is #680's per-brick cull
band in include/clay/eval/bake_volume.h, which changes what a brick
compiles, not kernel arithmetic, and the parity corpus is unchanged.
leonardoaraujosantos added a commit that referenced this pull request Oct 5, 2026
Covers the twenty PRs since v0.120.1 (#655, #667-#669, #673-#688), ABI
minors 0.121.0 through 0.126.0, and the scene format minor 19 -> 20.
The device gate block is a placeholder until the iPad run is recorded.

Carries the four manual hardware gates forward as waivers at 4401b35:
the only kernel-relevant change since 59e42cc is #680's per-brick cull
band in include/clay/eval/bake_volume.h, which changes what a brick
compiles, not kernel arithmetic, and the parity corpus is unchanged.
leonardoaraujosantos added a commit that referenced this pull request Oct 6, 2026
Covers the twenty PRs since v0.120.1 (#655, #667-#669, #673-#688), ABI
minors 0.121.0 through 0.126.0, and the scene format minor 19 -> 20.
The device gate block is a placeholder until the iPad run is recorded.

Carries the four manual hardware gates forward as waivers at 4401b35:
the only kernel-relevant change since 59e42cc is #680's per-brick cull
band in include/clay/eval/bake_volume.h, which changes what a brick
compiles, not kernel arithmetic, and the parity corpus is unchanged.
leonardoaraujosantos added a commit that referenced this pull request Oct 6, 2026
The first device gate failed on mask_extrude and mask_extract at 5-7x,
caused by #667's per-sample gradient; #691 restored the cost. The notes
record the failed run, the cause, the fix and its small value change.
SummerTree pushed a commit to SummerTree/ClayCore that referenced this pull request Oct 7, 2026
…tter

CyberdyneCorp#667 anchored the mask to the source surface by projecting every field
sample along a six-tap central-difference gradient, so each sample called
the source seven times. The v0.126.0 device gate measured mask_extrude
5.1-6.9x slower and the gallery's mask_extract 6.2x.

The gradient now comes from the sample lattice: a central difference of
the distances one cell either side, taken from the window of bricks the
fill already evaluated. Only a neighbour outside the window calls the
source, at the exact lattice position its own brick samples, so shared
halo samples stay bit-equal across brick faces.

The projection is also skipped where the shell alone decides the stored
value: where it exceeds a max-pyramid bound on what the mask distance can
report within |distance| of the sample (by the quadratic blend's support
when border_round is set), and in bricks lying wholly beyond the band.
The skip is exact, and tests hold it bit-identical to projecting every
sample.

Source calls per lattice sample on the device fixture: 7 -> 1.009.
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.

mask_extrude caps the wall at the mask's own extent, so thickness past it is ignored

1 participant