Aero recipe: prevent near-wall SDF sign noise from reversing normals - #2011
Open
peterdsharpe wants to merge 2 commits into
Open
peterdsharpe wants to merge 2 commits into
peterdsharpe wants to merge 2 commits into
Conversation
Contributor
CODEOWNERS review mapCurrent for commit ⏳ @coreyjadams — 2 file(s)
⏳ @peterdsharpe — 2 file(s)
No CODEOWNER
Comment |
peterdsharpe
marked this pull request as ready for review
September 19, 2026 21:41
Contributor
|
The PR appears safe to merge; the previous interior-normal issue is fully fixed and no new actionable failures remain. SummaryThis PR makes near-wall SDF normal orientation use separate coordinate-scaled tolerances for direction fallback and sign uncertainty.
Reviews (2) · Last reviewed commit: "Preserve resolved interior normals in th..." |
Collaborator
Author
peterdsharpe
added a commit
to peterdsharpe/physicsnemo
that referenced
this pull request
Sep 19, 2026
This branch has not been deployed
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.
Description
Near-wall volume queries can receive a tiny negative signed distance from float32 roundoff.
ComputeSDFFromBoundarypreviously used that sign to reverse the fallback face normal, turning an outward normal inward for points on the wall.Use separate coordinate-scaled tolerances for the SDF sign and closest-point direction. The direction fallback retains its broad
128 * eps * coordinate_scaleband; only negative distances within the smaller8 * eps * coordinate_scalesign-noise band default to the outward face normal. Interior points beyond the sign-noise band retain inward normals, including when the direction fallback is active. Stored SDF values and closest-point directions outside the fallback band are preserved.For example, translating a box by 10,000 units gives a direction-fallback tolerance of about 0.153. Points 0.01 and 0.1 units inside still receive inward normals; a point on the wall receives the outward face normal. This addresses the interior-normal regression identified in review.
Validation
Checklist
Dependencies
None. Based directly on main.