Softbody simulation and rendering are taken care of by two separate components: ObiSoftbody (simulation) and ObiSoftbodySkinner(rendering). The former generates a particle-based representation of a mesh. The latter skins an arbitrary mesh to that particle-based representation, so that they move and deform together.
Using two separate components lets you decouple simulation and rendering, which is oftentimes very useful. Also please note that you're not forced to have a single ObiSoftbody skinner for each ObiSoftbody. You can skin multiple meshes to a single softbody, using multiple ObiSoftbodySkinners.
Any object can be turned into a softbody by adding an Obi Softbody component.
This is how ObiSoftbody's inspector window looks like:
You will see additional constraint components added apart from this one.
Softbodies are generated by sampling the input mesh by "sprinkling" oriented particles on its surface. Then, shape matching clusters are generated that bind each particle to its neighbors. This two-step process takes place when you press the "Initialize" button. Here's a cutaway view of a softbody, showing the actual mesh surface and the oriented particles used to represent it:
Let's take a look at all parameters that control particle and cluster generation:
The "Input mesh" slot in the softbody component allows us to specify which mesh to use for particle generation.
Radius of the particles that will be seeded on the surface of the Input Mesh. This is the main parameter that controls the quality/performance ratio of your softbody: a very small radius will result in many particles added to the mesh surface (as many as vertices in the Input Mesh). Larger values will result in coarser sampling of the mesh.
Percentage of overlap allowed between particles. Large values will ensure more thorough coverage of the input mesh surface, by means of generating more particles. Values of 0.5-0.7 usually are the coverage/performance sweet spot.
Amount of laplacian smoothing applied to the mesh prior to particle seeding. Large values can help in representing thin features such as antennaes and limbs with linear particle chains.
Radius around each particle that is considered when calculating the shape and orientation of that particle. Values close to or slightly larger than the Particle Radius give good results.
Maximum ratio between the longest axis of a particle and its shortest one. Large values will result in very pronounced ellipsoidal shapes, small values will result in more spherical particles.
Radius around each particle that is considered when linking that particle to the ones around it. Values 2-3 times the Particle Radius usually give good results.
If enabled, uses one-sided particles to help with collision detection. While regular particles project overlapping bodies in the direction of the shortest path to the particle's surface, one sided particles use the shortest path to the softbody mesh surface.
This component performs automatic skinning of a target SkinnedMeshRenderer to the softbody particles. This is done by searching for the closest particles to each mesh vertex and assigning distance-based weights. You can control how this distance weighting is performed using the following parameters:
This is how ObiSoftbodySkinner's inspector window looks like:
The SkinnedMeshRenderer used for skinning.
Intensity of the skinning falloff. A value of 1 means linear falloff, larger values increase falloff exponent, thus giving more weight to particles closer to the vertex.
Maximum distance to consider when skinning each vertex. Particles further away than this distance will not be considered.
Once you click "Bind Skin", Obi will skin the mesh to the softbody particles.
If we hit play after initializing the softbody, nothing will happen. This is because ObiSoftbody only creates particles and sets up constraints between them, but does not perform any simulation by itself. That is the job of the ObiSolver component.
This component can be attached to any GameObject in your scene, so go ahead and add it to any existing object or create an empty GameObject for it. Then feed it to the Obi Softbody component "solver" attribute.
Now hit play, and watch the simulation take place.
You can hit "Edit Particles" to enter the particle editing mode exactly in the same way as you can with any other Obi actors.
Keep in mind the steps to set up softbodies: