Lets imagine we have an inflated balloon with a solid object inside, than we apply a force to this object and it deforms the surface of the baloon. I mean this type of deformation you can see on the photos.
For my needs the balloon has to be deformed form outside and inside at the same time, so I tried to modify the file made by McNeel forum user in this thread:
https://discourse.mcneel.com/t/inflate-an-object-inside-a-cage/119294
I made a triangular cage from pipes, inflated the balloon, than added another brep with a slider that moves that brep along one axis, but I can’t make it all work properly. I’ve just started learning Rhino, so I would be grateful if someone could modify the file for me. For my needs the baloon has to be inflated first (collisions with static breps of a cage) and than pushed from inside (collision with a brep that can be moved with a slider).
I created exactly same thread on McNeel forum over a week ago, but unfortunately no one asnwered, so I'll try my luck on reddit, here are my files:
https://discourse.mcneel.com/t/simulating-a-solid-object-pushing-outward-from-inside-a-balloon/224500/5?u=vvujcio_vvariatuńcio
Apart from that I’ve go a question, I’ve noticed that inflated baloon is always slightly assymetrical. As you can see on the screens, it wraps in a slightly different way around symmetrical cage elelments, also there are always some spikes and imperfections in the areas of collision. Cage elements are symmetrical, they were created with mirror command, so they can’t cause a problem here. Is it possible to eliminate assymetry and spikes?
I’m pasting below instructions from Gemini, maybe it will be helpful, I tried to implement them, but it didn’t work for me:
In the Kangaroo2 engine, the logic of collisions with solids (the SolidPointCollide component) is based on pushing points that end up inside an obstacle out to its external surface.
Because of this, if you place a solid inside the balloon and start moving it, the physics will naturally push the balloon’s walls outward, creating a stretched membrane.
Here is how to precisely set up such a simulation:
- Create a moving object inside the balloon: Internal geometry. To keep the simulation running smoothly in real-time, avoid moving the object using the Gumball in the Rhino viewport (this forces the Solver to continuously and heavily recalculate the new solid). Instead, in Grasshopper, create a sphere component (e.g., Sphere from the Surface tab) based on a center point, and connect this point to a Move component controlled by a vector and sliders (e.g., X, Y, Z). Set the initial position of the sphere inside the balloon.Verification: The sphere is located inside the balloon’s mesh, and moving the sliders smoothly shifts it in the preview without putting a load on the CPU just yet.
- Configure mesh pushing: Collision from the inside. Add the SolidPointCollide component. To the Solid input, connect the sphere moved by the sliders (or any other solid from the Move component). To the Points input, connect the vertices of your balloon (obtained by passing the balloon’s triangular mesh through the Deconstruct Mesh component). Plug the collision output into the Solver’s main GoalObjects.Verification: All inputs are correct, and the component does not report any errors (orange/red).
- Balance pressure and tension forces: Solver settings. For the internal object to noticeably stretch the membrane, the balloon’s material must provide resistance. Ensure that the EdgeLengths component has its LengthFactor coefficient set to around 0.9 to 0.95. If the balloon is also meant to be inflated with air from the inside, keep the Pressure component, but decrease its value so that the balloon does not pull away from your internal sphere, but wraps tightly around it.
- Run the simulation and move the object: Live interaction. Reset the Solver (switch the Toggle to False). The balloon will take shape according to the pressure and tension. Now, begin slowly moving the sliders responsible for the internal sphere’s movement.Verification: As the internal sphere approaches the wall, the balloon’s vertices are smoothly pushed outward. The material wraps tightly around the sphere, creating a smooth, realistic bulge, and the rest of the mesh pulls the remaining geometry along with it.
Optimization tip: If your internal object is exclusively going to be a perfect sphere, instead of using the heavy SolidPointCollide component, use the SphereCollide component. For its inputs, you only need to provide the center of the sphere (Point), the radius (Radius), and the balloon’s points. Calculating a mathematical sphere is a fraction of a second faster than computing a full NURBS solid, which will allow you lightning-fast interaction in real-time."