Questions about procedural mesh generation

Godot Version

Godot 4.3

Question

I would like to get some recommendations on how to use procedural mesh generation, my main goal is to make it so that I can procedurally generate several meshes in one, that is, so that the model is considered one, but I can turn off the visibility of some meshes and change the material, I had several problems in godot-cpp when writing a plugin with such an option that inside Node3D I had two MeshInstance3D, which is not a suitable option, I need one node with several meshes inside, what do you advise?

No such thing for godot, easiest is multiple mesh instance, especially for parts that can toggle visibility.

Otherwise you are getting into custom shader territory that you will have to mathematically select control vertex alphas on a single mesh.

Or, maybe you can generate a single mesh with the mesh builder classes and have to regenerate each time you “toggle” visibility on. But that can be cpu intensive depending on the mesh. But this would also be mathematically tricky to get the vertex points right