Hello. I’ve been trying to figure out how to make these soft bubbles react to the rigid surface on top, recreating the effect shown in the balloon image - like the squeezing out form. I would really appreciate if anyone can help me figure out what I am doing wrong thanks so much in advance!
As far as I can tell, there are a couple of issues with your geometry that prevent this from working:
two of the base curves that you generate the meshes for the soft bodies from already intersect on the XY-plane, which is quite tedious to remedy with Kangaroo, better take care of it before the simulation
you generate the soft bodies as mesh surfaces, which might work for the inflation but is probably problematic for checking soft body collisions
your rigid collider is an open polysurface, whereas the SPC (Solid Point Collide) component from Kangaroo explicitly relies on a solid
a specific situation with the geometry of your rigid collider produces non-manifold edges, which should always be prevented, simply add a tri in “front”
In order for this to work, I’ve slightly adapted the geometry of your rigid collider and merged all its coplanar faces. Then I extruded the corrected, open polysurface slightly to get a solid. The new geometry is internalised in the Grasshopper file.
Base curve intersections are now taken care of before the simulation. The soft bodies themselves are also closed, water-tight meshes, which I deem preferable.
You can adapt the edge lengths factor and pressure strength to get different results.
You can also get an even more precise result by dividing the soft body meshes more, but that also slows the simulation down quite a bit.
SOFT AND RIGID 2.gh (126.3 KB)
WOW!!! Works amazing! Thank you so much for your help and expertise :’’)))))))
I just have one last question is there any way to control the spilling of the soft bodies ?? like the image below the bubble spill through the rigid landscape instead of having a clear boundary. Thank you in advance :)))))
What have you changed? It’s impossible to tell for sure without at least knowing some details! The definition that I uploaded above works fine for me.
In Kangaroo, it’s always about finding a state of balance between the different forces and goals.
If one goal is much stronger and opposed to another goal, it overrules it, and things tend to go astray moving forward. It’s always good to be patient and prudent, taking small steps.
It’s also absolutely imperative that your rigid body (i.e. topographical geometry) is a closed brep, closed polysurface, or water-tight mesh! If it isn’t, the SPC (Solid Point Collide) component can’t evaluate, whether points or vertices are colliding with the solid in question! It’s impossible for it to know what is inside and outside!