When meshing implicit surfaces and distance fields, zero-valued points create ambiguity in inside/outside classification. A naive approach of treating zero as either inside or outside breaks down with symmetric shapes. The robust solution defines a point as inside only if all nearby jittered points are also inside (negative). Using automatic differentiation, this neighborhood check is reformulated algebraically: for each discontinuous math node, a set of sign variables (called a 'feature') is derived. A feature is valid if a consistent offset vector exists satisfying all branch conditions. A zero-valued point is inside the model only if, for every valid feature, the top-level gradient is negative — meaning any movement prescribed by the feature decreases the distance value. This approach correctly resolves zero-crossing ambiguities for both a shape and its negation.

6m read timeFrom mattkeeter.com
Post cover image
Table of contents
The naive solutionThe robust solution

Sort: