Liquid Modeling Toolchain

My goal is to establish a toolchain for creating volumes which appear to be “snapshots” of fluids
in motion flowing over geometry. I do not need to do it all in Grasshopper - happy to move to other pieces of software (realflow/houdini, blender), but hope to ultimately bring it back in to grasshopper at least. I’m brand new to 3D modeling but jumped headfirst into grasshopper and am loving it so far. Adding on another framework might be a bit much right now, but at the same time if GH is not the right tool for the job I am willing to.

Think images like this:

Ultimately, I am more interested in forms created by fluids flowing down geometry than splashing - eg imagine a large blob of viscous fluid on top of a solid and flowing over/down the surface. Finding drainage paths is relatively trivial (either with kangaroo my applying a downwards force to points while keeping them on a surface/mesh, or using flex hopper and colliders), but I’m after the shape of the mass of the liquid, not the drainage path.

I do not need the final geometry rendered in realtime necessarily (it’s fine if it happens slowly), though being able to observe the particle simulation in realtime is definitely a big plus.

This is mostly speculative right now, no clearly defined end goal, but I am approaching this with the idea that I want to ultimately be able to physically fabricate the geometry, so the priority is more on creating a solid/volume rather than a rendering.

Fluid simulation

So far, my initial approach has been to use Flexhopper to generate the fluid simulation natively within grasshopper. I use the fuzzy preview, and then once it seems to be in a desired form, I pause the simulation. It seems that so far, Flexhopper is probably sufficient for at least generating point clouds. Currently, I am generating thousands of points to simulate the fluid, and the end results are satisfactory.

Point Cloud > Volume

Right now, my next challenge is to convert the frozen point cloud into a mesh/solid which appears liquid. I understand that this is, essentially, a volumetric rendering question. However, maybe there are other approaches which would be sufficient.

Essentially, I want to create hulls around around point clouds, though not necessarily convex. Assuming one contiguous blog of liquid (as opposed to multiple droplets), then I think the goal would be to make a cover for the set of points which also minimizes its volume. There would need to be some means of determining which points are on the interior vs on the surface of the bounding volume. Additionally, in the case of multiple “droplets” there would need to be some mechanism for differentiating the droplets into individuals.

Mesh Tools

I’m sure there must be some tools for doing this using meshes, but I am not sure what they are. I was wondering if people could recommend any?

Once a mesh boundary around the continuous blobs of liquid is formed, it seems like smoothing the mesh out probably wouldn’t be too difficult, but I am having trouble identifying the right tools to create a minimal volume around the point cloud.

I suppose one way to do it would be to maybe create a spherical mesh around the blob of points and then use kangaroo to shrink it down, with each point in the cloud acting as a spherical collider.

Z-axis Sectioning

One approach seems to be to use metaballs along the z axis. This approach could be used to generate sections, potentially useful in some fabrication circumstances, but I am interesting in ultimately ending up with actual meshes/surfaces. It does take upwards of 10minutes on my machine to run the metaball with the number of points I am using.

Volumetric

A better approach is probably to use some sort of 3D volumetric point-to-mesh/surface/solid conversion. I want to create some sort of set of solids which cover the points.

A naive way to do this would be to just make a sphere/cube around each point, take the boolean union, and then apply some sort of smoothing to the resulting surface/mesh. This seems like it is probably far less efficient than a bespoke system.

Dendro seems to be a main choice for volumetric grasshopper processing, but it seems that it is not quite right for this job according to this thread

Speaking of bespoke tools…

Cocoon

This seems like another option, which as I understand would essentially let me create 3D metaballs. Not sure how computationally intensive this is relative to other approaches, but it seems like it is pretty much designed for this task. So far I haven’t been able to get it to work on a simple point cloud made with Populate3D, but I think I just need to spend more time working with per-existing samples first.

Clustering

I realize that the large quantity of points, though realistic, might not be necessary for solid generation. For instance, it might make sense to do some sort of clustering before hand, especially given that a lot of points are “interior” to the fluid.

I haven’t fully thought through the implications of this yet, but it probably is an important area to explore.

Faking it

Another approach is of course to fake it, using low numbers of points/curves and doing it “by hand” in grasshopper/rhino.

Tools other than Grasshopper

Maybe trying to do this in Grasshopper is picking the wrong tool for the job? Would be curious if people have other experience with this, and if so, if I would be better served in your opinion learning a new tool (blender, houdini, some sort of mesh editing software, etc) to create the geometry and then import it into Rhino. Or, alternatively, to take the point cloud from Flexhopper, export it into another tool, and then quickly render it to a mesh there.


Anyways, this is the research I have put together so far. I would be curious to hear what other people have done! I’m brand new to 3D modeling, so maybe my naive approaches are off-base. Looking forward to discussing this!

Edit: ah, found this link and this link which seem to go into some more detail albeit briefly about the shrink wrapping approach, cocoon, and a volvox + weaverbird approach.

1 Like

Would just do this in a mograph software (Maya, Houdini, Cinema4d) which have already preset systems to do this. Doing this (accurately and efficiently) in grasshopper would be like using a hammer to put in a screw. Possible but painful.

Here you can do in Houdini with this short tutorial in a pretty simple way. Houdini Retime FLIP Sim custom Reseeding -- Long Version - YouTube

Or melting

Rhino+GH is my fav software but it just isnt the tool for this.

If you really want to try and volumize your many points you can use Dendro in GH which uses OpenVDB (same as houdini although quite slower in GH). https://www.food4rhino.com/app/dendro

This really depends on what your end goal is. If you are trying to get better at Rhino/GH then I would say go for it. If you are trying to get the best fluid sim in the shortest time without going crazy then you should use other software.

For a GH solution, you can use Dendro Point to Volume then a Volume Smooth then output to mesh to get something tangible from your existing point cloud data pretty quickly. As a fair warning though, if you are new to GH want more complex control then this is a pretty difficult project to try and bite off. Controlling basic things like fluid viscosity and surface adhesion to get the look you want will super challenging.

I would try using Blender. The fluid simulation after version 2.9 is great and there are plenty of tutorials out there for how to do basics (plus its free!). You can then bake out your fluid sim as a mesh and save to STL to get it back into Rhino pretty easily.

Let’s Make Coffee: Blender Fluid Sim (Manta Flow) For Beginners

Yeah it’s mostly that, just trying to push stuff and see where it takes me!

Playing around with the surface tension and viscosity in Flexhopper has worked out so far well enough, following along with the parameter ranges used in the Flexhopper workshop series on YT.

Yeah, I was playing around with a similar approach using Volvox point clouds > Mesh > Weaverbird catmull clark last night, and it was pretty decent. Still not quite right.

Cocoon looks the est, but with the number of points I am generating I don’t think it could make a solution.

Probably going to try out a blender > grasshopper workflow in the next week or two. Probably a good exercise to get familiar with Blender and moving between different pieces of modeling software

Use Dendro, you will get the same kind of results like cocoon but much faster.