PixarAnimationStudios / OpenSubdiv

An Open-Source subdivision surface library.
graphics.pixar.com/opensubdiv
Other
2.88k stars 558 forks source link

Fix sharpening of vertices on potential non-manifold creases #1338

Closed barfowl closed 1 month ago

barfowl commented 1 month ago

Non-manifold vertices are usually tagged as sharp (forcing their interpolation) except in some cases where their incident faces share a single pair of non-manifold edges. The latter vertices are treated as creases when a number conditions are satisfied (see the test shape catmark_fan for an example).

The logic currently used to quickly detect such non-manifold crease vertices is flawed. The conditions tested are necessary but not sufficient, leading to some vertices that should be tagged sharp being treated as a crease. A more complete inspection of the full neighborhood around the vertex is unfortunately required to correctly detect a non-manifold crease vertex.

The changes here include three commits: the first two correcting the detection of non-manifold creases in Far and Bfr respectively, and a third adding a new test shape for non-manifold creases with cases that both succeed and fail the new tests.