A command opposite to SubDivide would be great

I wrote something a while back I’d been meaning to add as a tool, but here’s a script in case it is useful to anyone.
Given a mesh which was generated by a Catmull-Clark subdivision, it groups together faces into 4s to recreate the coarse faces.

Just doing this gets you the topology, but the shape will not be the same as the original mesh before subdivision, since the vertices get moved by the smoothing part of the subdivision.
Then I found and implemented bits of this paper [Lanquetin and Neveu 2006], which describes a neat way to recover exactly the original vertex positions just from the subdivided version.

This script gives the option to just to do the topological grouping, or to also do this vertex relocation.
Note that this will only work if the input mesh has fully Catmull-Clark topology - i.e. quad faces which can be grouped into 4s.

Reverse_Catmull_Clark.gh (21.6 KB)

For closed meshes without any valence 3 vertices it should recover the original exactly.
Valence 3 vertices require a slightly more involved procedure described in the paper to find the weights which recover the exact positions, which I didn’t implement here, but instead used an approximation that gets pretty close. If it would be useful the exact version doesn’t look to hard to add though.
Any naked vertices are just kept fixed, and I didn’t think at all about creases here, so it assumes everything is smooth.

12 Likes