Adaptive Subdivide SOP
Adaptively subdivides geometry using proximity look ups to another geometry.
Performance gains can range from 10 to 1000s of times over Houdini Catmull-Clark subdivision surfaces algorithm where the gains increase a lot more at higher subdivision levels. t0*2^n vs t0*5^n to t0*5.7^n where n is the number of iterations and t0 is the time it takes to cook the first iteration.
The new version is completely rewritten for performance, precision and accuracy. It's superior in every way to the version I used in the movie X-Men: Dark Phoenix for the face crack setup:
https://vfxscience.com/2019/07/12/x-men-dark-phoenix/
It's using a modified OpenSubdiv Catmull-Clark subdivision surfaces algorithm, with the ability to switch to a modified hybrid OpenSubdiv Catmull-Clark (bilinear refinement on borders) or a modified OpenSubdiv Bilinear algorithm.
The biggest improvement is the ability to completely preserve the borders without breaking up the geometry, without a performance penalty, previously that was only possible using the standard Houdini Catmull-Clark subdivision surfaces algorithm, which unfortunately has impractical time complexity with higher subdivision levels.
The proximity look ups is especially optimized for quads for uniform coverage across the surface of the input geometry.
Note that in the video, in the last test I am comparing the modified hybrid OpenSubdiv Catmull-Clark subdivision level 10 to Houdini Catmull-Clark subdivision level 7, because subdivision level 10 using the latter algorithm would take at least 16 hours to cook.
Some timings from the video for different levels of subdivision (Houdini Catmull-Clark vs modified OpenSubdiv Catmull-Clark):
Level 5: 16.5s vs 1.8s (9x faster)
Level 6: 1m 23s vs 3.37s (24x faster)
Level 7: 7m 57s vs 6.6s (72x faster)
Level 10: 16h (5^2) vs 55s : (1000 - 1600x faster, 5^2 - 5.7^2)
Time complexity of adaptive subdivision using the modified OpenSubdiv Catmull-Clark for each iteration n is 2^n, and the same operator using Houdini Catmull-Clark is between 5^n - 5.7^n.
Even though I have to perform a lot more operations over Houdini Catmull-Clark algorithm to preserve the borders at each subdivision level, most of these operations are multi-threaded VEX code and the performance gains of OpenSubdiv negates all of the other costs by orders of magnitude over Houdini Catmull-Clark algorithm.