Adaptive Catmull-Clark Subdivision with Compute Tessellation – Filmic Worlds
Your browser is quite old! Why not upgrade to a different browser to better enjoy this site?
Catmull-Clark subdivision is the standard for smooth surfaces in offline rendering, going back to Geri’s Game in 1997. Catmull-Clark recursively refines a mesh, allowing<br>artists to author a low-poly mesh and subdivide it during rendering. It’s also a well-known tool in modeling for multi-resolution sculpting, particularly with ZBrush and Mudbox. When<br>you export a displacement map from ZBrush, it’s actually the displacement between the sculpted geometry and the subdivision surface. If we want games and real-time rendering to match<br>the quality of film, we need to figure out how to support Catmull-Clark properly.
The header image shows Catmull-Clark in action. The left image is the uniform tessellation wireframe, the right is the adaptive tessellation wireframe, and the middle is the adaptive version shaded.
In this post, we’re going to discuss a new approach to this problem, as a spiritual descendant of the feature-adaptive subdivision work from Brainerd et al. [2]. The key innovation of their approach<br>is to split the problem into two parts:
Tessellation: Dicing a mesh using hardware tessellation.
Subdivision: Given a barycentric coordinate on a face, calculating that limit position and normal.
We’ll be taking it one step further, using compute tessellation (from the previous post) as well as a novel way of calculating the limit position of the surface. But<br>before we get into that, we need to go over the background of Catmull-Clark, as well as the innovations over the last few decades.
Here you can open the live WebGPU Catmull-Clark viewer. Or if you prefer you can<br>download the viewer as a standalone zip. The code is MIT licensed.
Catmull-Clark Background
The original algorithm is quite simple and elegant. At each level, we start with a polygon mesh. Each iteration requires three steps:
For each face, create a new point F at the centroid of each face.
For each edge, create a new point E based on the previous level and the new F points.
For each vertex, create a new point V based on the new E/F points and the previous level vertices.
Semisharp Creases and Vertices
One of the difficulties with vanilla Catmull-Clark is generating sharp edges like bevels. You can do it by adding extra edge loops where you need them,<br>but that adds complexity and authoring cost. As such, semisharp rules have been proposed and gained wide adoption [3].
Edges and vertices have both a smooth rule (original Catmull-Clark) and a sharp rule, where each vertex and edge has a semisharp weight. If the weight is, say, 3.6,<br>then the first 3 subdivisions would use the sharp rule. The fourth would use a 60%/40% split between the sharp and smooth rules, and the rest would be smooth only.
The image below shows the comparison between the sharp and smooth rules for both vertices and edges.
Here is a screenshot of semisharp edges and creases from the actual demo.
Bicubic B-Splines
Catmull-Clark subdivision has a very interesting property. If a set of vertices makes a clean 4x4 grid of vertices, then the inner quad is called “regular”. And a regular quad can actually<br>be evaluated analytically with a simple formula: the Bicubic B-Spline. Given any (u, v) value inside that quad, we can evaluate it as a simple polynomial.
We can apply any tessellation we desire to that quad, and analytically evaluate the position and normal. The hard part is<br>calculating the limit positions and normals of irregular polys.
Semisharp Edges with Bicubic B-Splines
Can we use the Bicubic B-Spline evaluation for quads that have a semisharp edge or vertex? It depends.
If we have a single semisharp edge, then we can use an analytic evaluation.<br>In Nießner, Loop, and Greiner [7] they show that a single cubic B-Spline can be made equivalent to the semisharp rules by applying a change of basis. Since a Bicubic B-Spline<br>is separable, we can simply rotate the patch so that the one semisharp edge is along the same axis. So, if a regular quad has one semisharp edge, we can still evaluate it analytically.<br>But if the quad has multiple semisharp edges or a single semisharp corner, then we have to treat the quad as irregular.
Feature-Adaptive Subdivision
The key innovation comes from Feature-Adaptive Subdivision by Nießner, Loop, Meyer, and DeRose [1]. In the scene below, we have an irregular vertex in pink that touches 5 quads. Look at what happens as we subdivide it.
As it subdivides, only quads that touch the irregular vertex stay irregular. The other new quads are regular by construction. If we wanted to apply pure subdivision, we would need 4x as many vertices<br>at each level. But if we only subdivide at the irregular vertices, each level requires the same number of points.
The original feature-adaptive paper [1] used special rules to cut the mesh. But the Brainerd et al. [2] approach used a...