Obi Official Forum
Softbody 2D is folding in - Printable Version

+- Obi Official Forum (https://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Softbody (https://obi.virtualmethodstudio.com/forum/forum-12.html)
+--- Thread: Softbody 2D is folding in (/thread-4100.html)



Softbody 2D is folding in - creekat - 01-02-2024

Hi!

I want to fix my softbody with respect to the Z axis so I tried using a 2d mesh with a 3d Obi Softbody Skinner bound to it.
Similar to what you demonstrated in this query. https://obi.virtualmethodstudio.com/forum/thread-1488.html?highlight=z+position

Since I want to drag the softbodies around, I added an Obi Particle Picker and Obi Particle Dragger in the scene, but I am encountering the error below.
(https://drive.google.com/file/d/1dn3_l6BnVoGbg25P-rYxtkGoO-4SOBqJ/view?usp=sharing)
I want to be able to force them into tight spaces without them seemingly folding in or rotating about their place. 
There comes a point wherein the mesh turns into a weird shape and as much as possible I do not want this occuring.
Is there a way that I could possibly achieve this?

If this is not possible, is there a way then for me to accomplish something similar in 3D? The reason I used the 2d mesh bound to a softbody skinner system is so that the balls will not go in front of one another when being moved. However, with Obi Solver in 3D mode, the balls always go in front or behind one another.
I demonstrated this in the second video below.
(https://drive.google.com/file/d/1FmdQkQhZF6e0c8mRsKVlw95_6WzH3q7c/view?usp=sharing)

I figured that maybe this is how a softbody works and that there is no workaround, but I would like to ask just in case.

Thank you so much in advance!


RE: Softbody 2D is folding in - josemendez - 01-02-2024

(01-02-2024, 08:54 AM)creekat Wrote: I figured that maybe this is how a softbody works and that there is no workaround, but I would like to ask just in case.

Hi!

I'm afraid that's the case. Softbodies are made of a network of particles held together by shape matching constraints, which keep the overall shape of each particle's neighborhood. However this shape matching is local to each particle (not global for the entire shape), which means if you force the softbody into very large deformation (close to squashing or turning it inside out), it will keep that deformation since each particle only has information about its immediate neighborhood, but not the entire object. This applies both to 2D and 3D softbodies.

The other relatively common method for making a softbody is using simple springs to hold particles together, which is less resilient to this problem as there's no shape matching involved at all.

For specific shapes such as a circle, you can write some custom code that applies a force to all particles away from the circle's center, which may help in recovering the object's shape after being squashed. See: http://obi.virtualmethodstudio.com/manual/6.3/scriptingparticles.html

Another, more involved solution would be to add your own shape matching constraint involving all particles in the softbody. See:
http://obi.virtualmethodstudio.com/manual/6.3/scriptingconstraints.html

kind regards,