From 184ae997d60d0d5a7d325ba4f2f8e1a1694b2c77 Mon Sep 17 00:00:00 2001 From: barry Date: Wed, 24 Apr 2019 14:56:49 -0700 Subject: [PATCH] Fixed single-crease patch isolation now required without boundary isolation: - added member to FeatureMask for single-crease option without inf-sharp - adjusted adaptive refinement to handle unisolated interior sharp edges --- opensubdiv/far/topologyRefiner.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/opensubdiv/far/topologyRefiner.cpp b/opensubdiv/far/topologyRefiner.cpp index 7f461ab6..4b1d0431 100644 --- a/opensubdiv/far/topologyRefiner.cpp +++ b/opensubdiv/far/topologyRefiner.cpp @@ -318,6 +318,8 @@ namespace internal { int_type selectInfSharpIrregularCrease : 1; int_type selectInfSharpIrregularCorner : 1; + int_type selectUnisolatedInteriorEdge : 1; + int_type selectNonManifold : 1; int_type selectFVarFeatures : 1; }; @@ -355,6 +357,8 @@ namespace internal { selectInfSharpIrregularCrease = true; selectInfSharpIrregularCorner = true; + selectUnisolatedInteriorEdge = useSingleCreasePatch && !options.useInfSharpPatch; + selectNonManifold = true; selectFVarFeatures = options.considerFVarChannels; } @@ -570,6 +574,13 @@ namespace { return doesInfSharpVTagHaveFeatures(compVTag, featureMask); } else if (isolateQuadBoundaries) { return true; + } else if (featureMask.selectUnisolatedInteriorEdge) { + // Needed for single-crease approximation to inf-sharp interior edge: + for (int i = 0; i < 4; ++i) { + if (vTags[i]._infSharpEdges && !vTags[i]._boundary) { + return true; + } + } } } else { if (atLeastOneSmoothCorner && !compVTag._boundary) {