Hi folks!
I’ve been getting pretty mixed results when importing GLB files into Rhino using the new Import Content Grasshopper component in Rhino 8. For some context, I am experimenting with loading Google Maps 3D Tiles: I make a POST request to the API, get the glTF geometry back as binary, save it to disk as GLB files, and then load them back into Grasshopper with Import Content.
For some strange reason, when I drag GLB files into Rhino directly, it imports valid meshes (although, texture mapping on some tiles looks a bit wonky). When I import the same files using Grasshopper, I get a lot of invalid meshes:
The Import Content component loads all GLBs as a Model Mesh
. I then try to cast it into a regular mesh, which works for some tiles but also makes a good chunk of them invalid.
I tried fixing invalid meshes by running CullDegenerateFaces()
in C# and unifying normals, but had no luck so far. Rhino’s import command clearly goes through some extra repair steps that I was unable to replicate in Grasshopper.
So my questions are as follows:
- Is there a better way to import glTF geometry into Rhino 8 using Grasshopper? I am open to 3rd-party plugins.
- Are there other mesh repair mechanisms I can try in Grasshopper?
- Is there any obvious reason for texture mapping being broken on some tiles and not others?
I am attaching the GLB files as an example.
Thanks!
3D_tiles_GLBs.zip (2.0 MB)