Meshing metaballs

Hi,

I am having trouble with generating meshes from metaballs. I’ve tried all the ways found on the internet (Cocoon, Ball Pivot), but the only one that worked for me was using Chromodoris plugin (when I tried to use some other plugins, Grasshopper always got stucked, maybe because I have too much metaballs or because they are large). The problem I have with this is that the larger meshes made from metaballs have another smaller mesh inside them, that I can’t get rid off.

Is it possible to remove them, or is there another more efficent way of creating the meshes from metaballs?

Thanks for your help!

metaballs.gh (30.2 KB)

Hi,
it is not easy to have a perfect solution of your problem. First you are far from the origin and Rhino doesn’t like it for mesh as most of the time mesh is using float representation. Now there is a double precision mesh vertex in Rhino 6 but I am not sure it is well implemented everywhere.
It could be good also so separate the differents groups ou metaballs.
For each group make the slices in 3 planes cf. https://www.grasshopper3d.com/photo/metaballs-the-naughty-way?test-locale=&exposeKeys=&xg_pw=&xgsi=&id=2985220%3APhoto%3A31358&groupId=&groupUrl=&xgi=&page=1#comments
You could use Dendro that is very good. Dendro is based on OpenVdb and is quite robust.

I applied David’s Method, so I generate planes in the 3 directions (beware geometry is here centered on zero)


Then extract the points (you have to play with Metaballs accuracy and Rhino Tolerances)

Then bake them in Rhinoceros

Then apply the MeshFromPoints command for each group of points.


metaballs LD.gh (34.1 KB)

A version with geometry not necesseraly centered

metaballs LD.gh (34.1 KB)

2 Likes

Tried Dendro ???

Thank you so much!

I didn’t know that the distance from the origin could affect something, so thank you for letting me know. These metaballs structures are part of a bigger project, so that’s why they were so far from the origin. Anyway, I’ve moved them closer to the origin point, so now it should be fine.
Also, I’ve tried to divide the metaball curves and make the meshes from these points before, but I didn’t realize, that I can use different planes than XY for generating metaballs, so thanks for that.

Currently, I’ve managed to get the points from metaballs and group them using Point Groups (so no baking needed), but I have some struggles with applying the MeshFromPoints command. Did you mean the one from MeshEdit plugin (https://www.food4rhino.com/app/meshedit)? If so, could you please tell me, how should I set the number of points in U and V direction. I am not really sure, if I understand, how this works.
I’ve also tried to create the meshes using Ball Pivot, but for larger metaballs, I need so large radius and the command took minutes to finish.

The Dendro plugin looks really nice, but unfortunately, I am working mainly with Mac, and the plugin works only on Windows OS.

Also, I didn’t mention, that I am creating a low poly geometry from these metaballs, therefore I really don’t need precise meshes. Basically, I want a few weirdly shaped low poly blobs, that are randomly generated, like the ones in the renders (these were created before using the Chromodoris).

Hello
many questions, some anwers.
MeshFromPoints is a rhino command that surely use Ball Pivot but it seems it is not in Rhinocommon. It was implemented in Grasshopper by Tudor Cosmatu


But for some reason it doesn’t work for me !!

MeshFromPoints from MeshEdit needs points in a sort of rectangular fashion (in UV direction). Not good for this project.

For what you want here a solution, I let it far from the origin. I grouped points


Then put a sphere around it

Then shrink wrap it around metaball

201901_metaballs LD.gh (40.9 KB)

There are many examples of Shrink Wrap on old grasshopper forum

Exploring another strategy to make the approximation of metaball, not very good on all cases.



201901_metaballs LD2.gh (39.5 KB)

2 Likes

Thank you so much for your help!

I’ve had some problems with the meshes generated this way because they had uneven faces (some faces were really small and some really large) and it caused some problems when I tried to transform them into low poly geometry.

Anyway, I’ve managed to get on a PC and generate the meshes with Rhino MeshFromPoints command, which worked like a charm. I was wondering, why this command isn’t implemented into Grasshopper the same way it works in Rhino, since in Rhino it seems like it gets the job done pretty well and really quickly, even with a lot of points.

So thank you again for your help, you really saved me!

You are welcome, I also learned.
I don’t know why MeshFromPoints isn’t implemented, surely because it is isn’t in Rhinocommon.

You can find a script here, this script use the Rhino command.