diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-08-01 15:48:32 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-08-01 19:42:59 +0300 |
commit | ec4ba68730f8e286559b0de433dfd821e6eeee6d (patch) | |
tree | e37010f27e315a0869f0597d5d1b33b765fadd27 /intern/opensubdiv/opensubdiv_converter_capi.h | |
parent | ebbeddd2f4617505bb2e13b6d773a3da6bd327c4 (diff) |
Subsurf: Fix/workaround crashes and failures with non-manifold geometry
The idea is simple: do not provide full topology to OpenSubdiv, leave
edges creation to OpenSubdiv itself. This solves issues with non-manifold
meshes which were known to fail, including the ones from T52059.
On a positive side we can simplify our side of converter, keeping code
shorter.
it is still possible that we'll need to ensure all loops has same
winding, but that is less things to worry about.
Diffstat (limited to 'intern/opensubdiv/opensubdiv_converter_capi.h')
-rw-r--r-- | intern/opensubdiv/opensubdiv_converter_capi.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/intern/opensubdiv/opensubdiv_converter_capi.h b/intern/opensubdiv/opensubdiv_converter_capi.h index 58a231deb30..1dd68f43c32 100644 --- a/intern/opensubdiv/opensubdiv_converter_capi.h +++ b/intern/opensubdiv/opensubdiv_converter_capi.h @@ -34,6 +34,17 @@ typedef struct OpenSubdiv_Converter { OpenSubdiv_FVarLinearInterpolation (*getFVarLinearInterpolation)( const struct OpenSubdiv_Converter* converter); + // Denotes whether this converter specifies full topology, which includes + // vertices, edges, faces, vertices+edges of a face and edges/faces of a + // vertex. + // Otherwise this converter will only provide number of vertices and faces, + // and vertices of faces. The rest of topology will be created by OpenSubdiv. + // + // NOTE: Even if converter does not provide full topology, it still needs + // to provide number of edges and vertices-of-edge. Those are used to assign + // topology tags. + bool (*specifiesFullTopology)(const struct OpenSubdiv_Converter* converter); + ////////////////////////////////////////////////////////////////////////////// // Global geometry counters. |