Soft Bodies

Introduction

Realistic deformations play an important role in computer graphics, games, simulations and VR environments.

Soft body simulations are used to change an object shape, when external forces are applied.

The computation of physically accurate deformation of objects when VR users uses hands controllers to interact is a liturgy, which requires much computation power. Only a few applications and simulations use soft body deformation due to computation power needed.


MAGES SDK & Soft bodies

In MAGES SDK, we provide a novel soft mesh deformation algorithm suitable for Virtual Reality interaction and collaboration.

The soft deformation algorithm in based on shape matching techniques and particle based soft body simulations. Our particle-based soft body algorithm is different from the state of the art because it provides easy control of the particles as physical objects and a center point, which controls the entire soft body position.

Velocity based interaction can be applied directly to our particles while as physical objects can interact also with the environment.

Our Virtual Reality interaction system uses velocity base approach providing the ability to pick up, hold and drop objects. Due to our soft body particles nature, this interaction can be applied directly.


Real time soft mesh deformations

With the use of term soft body, we mean a mesh that can change its initial vertices position when interacting with other physical meshes. Our main idea of creating a soft body physics algorithm is based on three main categories:

  1. Clustering

    The term clustering describes how each vertex on our mesh being grouped in another object that is used to calculate its deformation.

  2. How physics are applied

    For the soft bodies to achieve some deformation, physics should be applied. To apply physics in our soft bodies efficient and with good performance, we apply them to the clusters that we used to group all the vertices.

  3. Mesh deformation

    Finally, we have to calculate the mesh deformation. The resulting deformation derives from the Clustering transformation after the physics calculation. This transformation has an effect on our mesh vertices.


Soft bodies Interaction In VR

In virtual reality environments, the user can utilize hand controllers or other devices to interact with virtual objects. In this chapter, we provide a method on how this interaction can be performed based on physics properties.

We focus on how this interaction can be done by pickup and drop an object or physically interact with it. Then, we use this method to interact with our soft body mesh.

  • Pickup objects

    With the use of VR controller, the user is able to pick an virtual object and move it according the laws of physics. The object is not able to pass by another object and normally stops or drags around it or push it.

  • Physical interaction

    The user is able to use the VR controllers to interact with object physically. For example, the user is able to push an object.

  • Interact with soft body

    To interact with a soft body mesh, we use both of the above methods. The user is able to grab a soft body mesh (the entire object or a part of it) or physically interact with it.


How-To

To create a soft body interaction, you need to attach the CreateDeformMesh component onto the object you want to be deformable.

HandPoser Final

This gives you the following properties:

  1. Particle grouping method selection

    enum ParticleGroupMehod {distance, closest_point, distance_with_soft_interaction};

  2. Type of particles collider

  3. Mass per particle

  4. Particles Angular drag

  5. Particles resistance

  6. Particles Division for grouping based on closest point

  7. Particles creation distance for clustering

  8. Particle affection range

  9. Particles soft interaction distance

  10. Particle scale selection

  11. Simulate in local space

  12. Center object scale

  13. Use mesh collider for center selection

  14. Enable self-collisions

  15. Restrict soft body in a selected area based on collider


Explanation of Deformable Mesh properties

  1. MAGES SDK offers three clustering algorithms.

    1.1. Distance clusters the vertices only by finding the closest N vertices.

    1.2. Closest Point, picks a vertex and group all the vertices that have the distance N into a particle.

    1.3. Distance with Soft Interaction, group all vertices based on desired distance but a vertex can be stored also in different particles with weights.

    The reason for implementing different clustering algorithms is because the vertices topology is different on meshes and only algorithm cannot serve all the different meshes.

  2. The type of collider will be added to each soft-body particle.

    Even though this field does not have a big effect when a lot particles are used, when their number is limited choosing a collider that fits the surface of the deformable mesh can lead to better visual results.

  3. On each particle a rigidbody component is attached. The following rigidbody variables can be configured:

    3.1. Mass

    3.2. Angular Drag

  1. Resistance is the force that each particle applies to the virtual hand. Higher resistance leads to less deformation.

  1. The range that the particles will affect the vertices.

  2. In case distance with soft interaction is selected the above value is discarded and this is used in a similar way.

  1. The scale of the center particle which acts as a pivot point. By using a bigger center particle our algorithm will fill the surface of the object with deform-able particles.

  2. Create a mesh collider and use it for particle calculation.

    Warning

    This is an extremely CPU intensive method and should be not be used lightly.

  3. Enable collisions between particles.

  4. Add restricting collider that specifies the area that particles will be spawned.


For 15. you need to create a SoftBodyRestriction gameObject and add a collider.

Then, you you can drag and drop the collider into the Bounds Collider property as in the image above.