Making a water balloon. My approach not working...

Hi guys,

Im trying to simulate a water balloon.

One of the ideas I had is to make a circular piece of rope. a rope here is just a series of revolute joints, joining a series of rectangles together.

if i reduce the limit on the angles of the joints, the circle can maintain its circle shape on its own and i can make use of the softness due to the iterative solver to for a somewhat elastic behavior.

the problem with this is that the rope can easily get 'tangled' when forces are applied to it as one piece of rope can tunnel through another. making each rope segment a bullet wont work because the segment will tunnel through a joint.

the second approach i have is to make the rope, but set the joint angles as a very high #, allowing the rope to move freely.
i then stick a circle in the middle of the rope, that is smaller in circumference the rope itself. this keeps the rope from tunneling through itself, BUT circle can now tunnel through the rope. again, bullets wont work because of the joints.

any other suggestions or will i have to study up on fluid dynamics
i guess one idea i just had is to make a shape consisting of smaller shapes all joined by some sort of spring joint.

has anyone added a spring joint to box2d?
Check whether the 3rd example scene of this meets ur needs:
http://boristhebrave.com/project/contro ... -pack/demo
Here is a demo that you might find useful -
http://www.brainblitz.org/BoxCAD/?load= ... ssel-41314

Each circle has a gravity controller applied to it with a negative setting. The circles making up the "skin" are not the same size in the example, but even as such, it provides a very uniform behavior.

Of course it's only an approximation, as this object is compressible, and real water isn't. It'd do for most casual applications though.

Boxcad doesn't dump the code necessary for the gravity controller, but I can provide boxcad's gravity class, if needed. It would probably be easier to use Boris' controllers though - viewtopic.php?f=8&t=1567 , as they're probably more generalized.
hi verso

thank you so much for the help.

i ran into boris' controllers and i do think that this is a very viable option indeed.
this gets rid of the center object and allows me to not have to rely on exploitng an insufficient timestep for an elastic effect
actually could you provide the gravity class?

i want to check out that code too.

verso wrote:
Here is a demo that you might find useful -
http://www.brainblitz.org/BoxCAD/?load= ... ssel-41314

Each circle has a gravity controller applied to it with a negative setting. The circles making up the "skin" are not the same size in the example, but even as such, it provides a very uniform behavior.

Of course it's only an approximation, as this object is compressible, and real water isn't. It'd do for most casual applications though.

Boxcad doesn't dump the code necessary for the gravity controller, but I can provide boxcad's gravity class, if needed. It would probably be easier to use Boris' controllers though - viewtopic.php?f=8&t=1567 , as they're probably more generalized.

Original thread: https://box2d.org/forum/viewtopic.php?t=1633