Softbody Actor

Softbodies are used to simulate deformable objects, like skin or fat. In order to create a softbody from a tetrahedral mesh you need:

  1. Create a Simulation Mesh from the tetrahedral mesh.

    While creating the simulation mesh from the source tetrahedral mesh with the tool described here, you must set the Distance Constraints Generate and Volume Constraints Generate properties to OnePerEdge and OnePerTetrahedron, and the Shape Matching Constraints Generate property to DontGenerate. This will create a simulation mesh with only Distance and Volume constraints, which is suitable for simulating a soft, deformable object.

  2. Create a SoftbodyActor and assign the Simulation Mesh.

    Create an empty GameObject and add a SoftbodyActor component to it by clicking Add Component > MAGES > Mesh Deformations > Actors > Softbody Actor in the inspector

    ../../../_images/AddComponentSoftbodyActor.PNG

    Assign the Simulation Mesh and a Physics World to the SoftbodyActor component

    ../../../_images/SoftbodyActorInspector.PNG

    Note

    You can edit the kinematic particles using the editing tool, by pressing the ‘Edit Particles’ button in the inspector.

    ../../../_images/edit-particles.PNG

    In the particles that appear on the scene, left click to make them kinematic (red color) and shift + left click to make them dynamic (green color).

  3. Render the softbody.

    To render the softbody, you must assign a mesh to the MeshFilter, add a MeshRenderer component to the GameObject and assign a Material to the MeshRenderer.

    Warning

    The mesh assigned to the MeshFilter should match the outer surface of the tetrahedral mesh used for generating the simulation mesh of this object in order for the object to render correctly.