Hi Joao - MergeCoplanarFaces and MergeAllCoplanarFaces may help in the meantime. I suppose Quadremesh on the extracted control polygon of a subD might also be a workaround.
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.
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.
Have a problem with the unsibdivide script, the horse is missing parts of his legs. Any ideas how to solve this? Mesh is internalised, takes here 1 min to calculate. Thanks. Reverse_Catmull_Clark_DL.gh (6.4 MB)
Ah, I found the problem.
When I was writing this I included a counter in the expansion loop so that it wouldn’t get stuck processing indefinitely if something went wrong finding the adjacencies. The value set for this was too low for a dense model like this one.
Here’s a fixed version:
Hi Daniel,
I’m revamping this old thread because I got into a project where I need to do a “reverse modeling” of SubD shapes.
when this would become part of the Rhino full arsenal of incredible tools?
would it be possible/reasonable to add an input for the level of “un-subdivision”? Like in the wb catmull-clark there’s the number of subdivision here would be interesting to be able to control how far puch the simplification.
See my picture below, I’ve added the script 4 times to get back to the original shape.