I started to play around a bit with subdivision surface methods.

A distinction is made between mesh-smoothing and mesh-subdivision, whereas the first aims to make the surface smooth (smoothness being defined as either C1 or C2), and the latter aims to represent the same surface with more triangles (without making changes to the geometry).

There are a number of subdivision schemes you can use to subdivide meshes, most of them relate to b-splines and other quadratic curves, but I’m a bit rusty on the math for that, so instead I found some great resources (see below for links). I’ve implemented the famous *Loop* subdivision (using the Warren scheme) and *√3 *subdivision, both operate on triangle meshes.

Something I finally grasped is that when they talk about *even and odd* vertices, they mean the positioning of the vertex in an ordered list: *even *means the *original* vertices from the base mesh (that may have been moved), and *odd* means the vertices that are *created* (i.e. computed from the base mesh) and inserted in between. I never could get my head around that terminology, but it starts to make sense once you do.

Subdivision schemes also need bordering-rules that define the way vertices are calculated when they are on a border of the mesh. To address bordering cases, first a full inspection of the mesh (iteration over all polygons and edges) is required to determine which edges are shared between 2 faces. An edge with only 1 polygon is a bordering edge. Once that analysis is ready, we can handle bordering cases correctly. It’s a bit of work, but it pays off in the end. So far I’m recomputing this information with every subdivision step, but if anyone knows how to update it instead of recomputing it again, I’m all ears! Of course I could always resort to a nifty allocation strategy, but maybe there’s a more clever way?

Two cube models in this test set: the left-most is a Cube-8, which are 6 planes ( a plane is represented by 2 triangles) and every plane is defined by 4 out of the 8 vertices. The cube next to it is defined by the same 6 planes, but this time each plane is defined by 4 unique vertices per plane (i.e. vertices are not shared between triangles). I make this distinction because in non-smooth mesh cases (where edges and creases need to remain intact) one needs the face normal in the vertex for that plane.

As you can see, the *√3 *subdivision keeps the Cube-24 edges intact. The Cube-8, Icosahedron and Sphere objects are treated as smooth surface objects because they share vertices and vertex normals. On the other hand, Loop subdivision on the Icosahedron generates a very nice sphere, useful for dome-shapes etc.

Next up: *Catmull-Clark* quad subdivision. The *Doo-Sabin* subdivision was implemented (it is interesting since it can be applied to both triangle and quad meshes) but my render framework currently supports either triangle *or* quad meshes, not both within the same mesh object. A mixed quad/triangle representation is a natural subdivision result for *Doo-Sabin*: edges revert to quads, while vertices revert to polygons of the same degree as the valence of the vertex. For example, if a vertex has 3 incident faces, then a triangle is generated in between the new points. One solution for solving the rendering problem could be to simply fake polygons of higher degree than 3 using more triangles, but this leads to incorrect iterations.

Some useful links:

https://www.graphics.rwth-aachen.de/media/papers/sqrt31.pdf

http://web.eecs.umich.edu/~sugih/courses/eecs487/lectures/38-Subdivision.pdf