Recently, I was asked to model an entire city, a monumental task. To assist us, we received a 3D file of the city: a 3DS Max file that had evidently undergone a lot of treatment to look nice for visual imagery.
However, the mesh topology is disastrous. Some edges share 3 or 4 faces, there are open meshes in multiple places (often imperceptibly), and the face normals are random. In short, it’s a 3D mesh that even Rhino’s repair functions have little chance of fixing.
At first glance, the mesh might look fine, but here’s what it looks like when we detect open edges or incorrect topology (such as multiple connected faces).
The goal of this modeling project is to create a scale model at 1:1000, a platform of 16 meters by 10 meters, with buildings around 25 millimeters tall and an Eiffel Tower approximately 30 centimeters high. All these buildings will be 3D printed, so the meshes need to be closed and error-free.
My first approach was to use Rhino 8’s ShrinkWrap function. It’s a fantastic tool, but in this specific case, I encountered a few limitations. First, the function can’t be applied to a set of city blocks all at once; it has to be run on each block individually.
And with a model like this, that adds up to quite a lot…
The function itself is fast, taking about 10 to 40 seconds per block depending on complexity, but with such poor topology, roughly 15% of the buildings are ignored. Additionally, when part of the mesh is skipped, a cluster of small spheres often appears attached to its edges.
So, I decided to write a script to perform batch retopology on this dreadful mesh. And the results are promising! In 20/60 seconds, I can process a set of city blocks with results nearly comparable to the ShrinkWrap function.
As with the ShrinkWrap tool, the result is an approximation with a few flaws. After some test prints, these imperfections, which look large on-screen, only measure a few hundredths of a millimeter in reality and are invisible on the printed pieces.
There’s still a lot to do, and for now, this project is just an experiment. For example, it’s amazing to process 4,000 city blocks simultaneously in just a few seconds!
-
But what next? If we ask subcontractors to print all 4,000 pieces, they’d deliver a bag that would look like a giant puzzle box (especially since there’d be around 20 bags). So, a labeling system will need to be integrated.
-
The generated meshes are currently open on the underside, so each block will need a thickness added or a closed bottom.
-
And a challenge inherent to any automated batch system is ensuring reliability. No one wants to inspect every corner of 4,000 city blocks to confirm processing is error-free.
That said, I’m happy to share this work, which wouldn’t have been possible without Rhino and Grasshopper!
jmv