Reduce Mesh (cull overlapping vertices) while keeping Vertex Colors?

Hi everyone,

My aim is to reduce a large mesh that is made up of an array of joined pyramids, totalling over 4.5 million vertices. I can reduce it to ~750k, but in doing so I loose the vertex colors. So the question is how to cull/weld these overlapping vertices (or rebuild the mesh) while keeping the mesh vertex colors intact.

So far, I’ve tried several approaches, but I keep hitting snags:

  • Kangaroo2 (Clean & Combine), MeshEdit (Cull Unused Vertices) and Pufferfish (Rebuild Mesh) and Nautilus (Weld the Vertices of a Mesh) - Successfully reduce vertices, but they strip the vertex colors from the output mesh.
  • WeaverBird (Join Meshes and Weld) - Reduces the vertices, and keeps the vertex colors but messes them up when vertices are welded.

I’ve attached a small portion of the mesh as a GH file to illustrate the setup. Has anyone had success with similar projects or know a method/tool that can merge overlapping vertices while preserving vertex colors?
clean_mesh_keep_colors.gh (92.3 KB)

Any advice or tool recommendations would be greatly appreciated!
I don’t need grasshopper for this, a rhino command is fine, it’s just that i am more familiar with it gh than plain Rhino

PS: I cannot to back to the source file to see if I can somehow rebuild it differently.

Thanks!

Hello
there was some discussions on face Coloring but I didn’t test that. Perhaps @AndersDeleuran could help on this subject. Keeping vertex color seems to be a bad idea here because color will be mixed. but its is doable.

What I can propose is for you to transform the color to a bitmap texture.


In order to do that your initial mesh must have texture coordinates.
Command: _ApplyPlanarMapping

Here the script 6s for 1024x1024 pixels texture, 25 s for 2048
clean_mesh_keep_colors_LD.gh (97.8 KB)

1 Like

Thanks for liking into my file, Laurent. Much appreciated

I missed that topic you referenced, interesting read, had no idea that facet colring could be done.

this will give you, for each vertex in the reduced mesh, the List of colors that were applied to those vertexes in the original -complex- mesh:


clean_mesh_keep_colors_inno.gh (78.5 KB)

but once you see vertexes in the very same given location originally had like 8 different colors applied: which color you want to keep?

That’s not possible, as far as I know. One must unweld all vertices in order to color faces without them “bleeding” into each other (which is now a lot faster at least, but also your mesh is already unwelded). This was partly the issue explored in the topic @laurent_delrieu linked to above, maybe going through that can help clear up some misunderstandings. Also, before checking your mesh I quickly slapped this together from your old topic and this one, demonstrating methods discussed:


241031_MakeAncColorPyramidMeshes_00.gh (646.4 KB)

Here’s a quick Rhino 8 version. The threading seems to work quite a bit faster, or maybe that’s the NETCore performance boost. And the mesh face coloring is now about three times faster on my system… very niiiiice:


241031_MakeAnDColorPyramidMeshes_V8_00.gh (661.7 KB)

1 Like