I am learning about soft-body implementations in Unity recently, and I stumbled upon the game Blob Merge 3D.

It is quite an interesting implementation because the blobs do not overlap one another and cannot pass through or in front of another blob, which technically violates how a soft-body actually works. It feels like it was actually implemented with a rigidbody in the backend but just uses a "soft-body" in the frontend.

I tried to implement the same concept with Obi softbody, with Unity springs and 3D rigidbodies put together to form a sphere, with Unity's built-in 2D spine animator, etc. but cannot seem to figure this one out.

How can I implement a similar "soft-body?" Ideas on how this much wiggle and jiggle was added would also be really helpful.

Screenshot of Blob Merge 3D

  • \$\begingroup\$ In what way does "not passing through other objects" "technically violate how a soft body actually works"? When you're implementing a soft body, you get to define how it will work, up to and including not passing through others. There's nothing fundamental to soft body physics that makes this impossible (and manifestly so, since you've found an implementation that does it), it's just another computational expense to budget for. Try to explain in more detail what it is about your concept of soft bodies that precludes this, and we can likely find the root cause to fix. \$\endgroup\$
    – DMGregory
    Feb 10 at 2:07
  • \$\begingroup\$ Okay. I might be wrong with what I said, but I understand softbodies are made up of many tiny particles held together by some sort of spring mechanism. If I were to define how it will work so that it will not pass through others, would it be efficient if I just checked every particle per frame and made sure that it does not have the same transform with any other particle in the softbody? I am sorry if I am not able to relay my thoughts clearly, I just do not know where to start with the implementation. \$\endgroup\$
    – creekat
    Feb 10 at 2:18
  • \$\begingroup\$ The nature of particles is that they're small, so they can easily slip between one another. The unit you probably want to consider is the "solid" triangle between three particles. If a particle of one body falls inside a triangle of another, you want to push it out along the triangle's exterior edge, and apply an equal and opposite push to the particles on either end of that edge. \$\endgroup\$
    – DMGregory
    Feb 10 at 2:53


You must log in to answer this question.

Browse other questions tagged .