Profile PictureYunus Balcioglu / Senior FX TD at Industrial Light & Magic
$29

VEX Catmull-Clark Subdivide SOP

5 ratings
Add to cart

VEX Catmull-Clark Subdivide SOP

$29
5 ratings

Subdivision surfaces are piecewise parametric surfaces defined over meshes of arbitrary topology.

It's an algorithm that maps from a surface to another more refined surface, where the surface is described as a set of points and a set of polygons with vertices at those points. The resulting surface will always consist of a mesh of quadrilaterals.

Creation of this VEX operator was shown from scratch in the most popular advanced VEX course: Pragmatic VEX: Volume 1.


The most iconic example is to start with a cube and converge to a spherical surface, but not a sphere. The limit Catmull-Clark surface of a cube can never approach an actual sphere, as it's bicubic interpolation and a sphere would be quadric.

Catmull-Clark subdivision rules are based on OpenSubdiv with some improvements. It supports closed surfaces, open surfaces, boundaries by open edges or via sub-geometry, open polygons, open polygonal curves, mixed topology and non-manifold geometry.

It can handle edge cases where OpenSubdiv fails, or produces undesirable results, i.e. creating gaps between the sub-geometry and the rest of the geometry.


One of the biggest improvement over OpenSubdiv is, it preserves all boundaries of sub-geometry, so it doesn't introduce new holes into the input geometry, whereas OpenSubdiv will just break up the geometry, like blasting the sub-geometry, subdividing it and merging both geometries as is.

Houdini Catmull-Clark also produces undesirable results in some cases, i.e. mixed topology, where it will either have some points misplaced or just crash Houdini due to the use of sub-geometry (bug pending).


Another major improvement is for open polygonal curves, where it will produce a smoother curve, because the default Subdivide SOP will fix the points of the previous iteration in subsequent iterations which produces different results if you subdivide an open polygonal curve 2 times in a single node vs 1 time in 2 nodes, one after the other. This is not the case for polygonal surfaces. VEX Subdivide SOP will apply the same operation at each iteration regardless of topology.


All numerical point attributes are interpolated using Catmull-Clark interpolation.

Vertex attributes are interpolated using bilinear interpolation like OpenSubdiv. Houdini Catmull-Clark implicitly fuses vertex attributes to be interpolated just like point attributes.

All groups are preserved except edge groups for performance reasons.

In some cases depending on the input geometry, it can beat the performance of even the fastest OpenSubdiv Catmull-Clark subdivision inside Houdini.


Combined VEX code is ~600 lines of code.

Add to cart
Size
51.6 KB
Copy product URL

Ratings

5
(5 ratings)
5 stars
100%
4 stars
0%
3 stars
0%
2 stars
0%
1 star
0%