Deform Dynamics - Unity plugin

Welcome to the Deform Dynamics Unity plugin manual!

This manual explains how to create interactive deformable animations in Unity using the Deform Plugin.

Pages:

Introduction to the Unity plugin

The Deform Dynamics Unity plugin allows users to create deformable objects and animate them inside the Unity editor. It also allows exporting the animations to other 3D programs via the FBX format.

The plugin is written in C# (Unity-specific code) and C++ (physics engine code). The C# code calls functions via an interface to the Dynamo SDK.

The plugin has been tested using Unity version 2019.4.1f1. This is at the time of writing the latest Long Term Support (LTS) version of Unity. Later versions may still work, but they haven't been tested.

Using the plugin

To quickly get started using the plugin, please read Installation followed by Getting started.

Theoretical background

In the documentation for the Deform plugin, you may come across some unfamiliar concepts. To learn about the theoretical background behind the library, we recommend that you read:

Vivace: a Practical Gauss-Seidel Method for Stable Soft Body Dynamics

Marco Fratarcangeli, Valentina Tibaldo, Fabio Pellacini
ACM Transactions on Graphics (SIGGRAPH Asia), 2016

Benchmarks

Scene: The cloth consists of 10 000 vertices and 19 602 triangles, attached by two points.

Gear: Tested using a laptop with a NVIDIA GeForce GTX 1070 GPU and an Intel Core i7-7820HK CPU.

Performance: 151 FPS (6.6 ms per frame)
Scene: The dress consists of 24 151 vertices and 47 509 triangles.

Gear: Tested using a laptop with a NVIDIA GeForce GTX 1070 GPU and an Intel Core i7-7820HK CPU.

Performance: 62.2 FPS (16.1 ms per frame)

Limitations

  1. Currently, the engine uses discrete sphere-sphere self collisions. This can result in tunneling if high forces are exerted on the cloth.
  2. The material behavior of the cloth is approximated to achieve high performance. The result of the simulation should be viewed as a visually plausible solution, not a physically correct one.
  3. To be able to run the plugin at maximum performance, the plugin requires a CUDA capable graphics card.

Release notes

2020-09-18

[Engine]

- Particles belonging to pressure objects can now be pinned by setting their mass to -1.

- Multiple mapped objects are now supported.

[Plugin]

- Added Remesher tool.

- Added support for axis-aligned box colliders.

- Changed DeformColliderMesh to support proxy meshes instead of old remeshing system.

- Changed DeformPicking script. It now requires a Camera component, and only needs to be added once per scene. To enable/disable picking of a DeformBody, the Picking Enabled toggle is used.

- Updated Deform Menu to contain Deform Patch Creator and Deform Manager.

[Documentation]

- Updated tutorials to reflect new remeshing workflow.

2020-07-31

[Plugin]

- Removed the Deform Serializer component. Use the Base Mesh parameter of the Deform Body instead.

- Added tooltips for all component parameters.

[Documentation]

- Updated the Saving and loading a garment configuration tutorial to use the Base Mesh parameter of the Deform Body instead of the Deform Serializer.

2020-07-27

[Engine]

- Implemented importing of seams from XML metadata files exported from CLO and Marvelous Designer.

- Improved handling of intersecting particles in self collider.

- Removed sticky colliders.

- General stability improvements.

[Plugin]

- Added Deform Seam Importer script for importing seams from CLO and Marvelous Designer.

- Added Deform Mesh Exporter script for exporting mesh assets from simulations.

- Made menus for Deform Dynamics components more consistent.

- Made gizmos visible game objects with Deform Collider components attached.

[Demos]

- Added "Controllable Character Berkeley Dress" demo, which contains a clothed character that can be controlled using the keyboard.

- Added "Character Seams Imported" demo, which uses a garment exported from Marvelous Designer, including seams.

- Added "Mapped Hoodie" scene, which shows a real world application of the mapping functionality.

- Added "Character Jumping B01 Dress" scene.

- Added "Character Hip Hop Dance" scene.

- Updated character demos to use deformed meshes and base meshes.

2020-06-25

[Engine]

- Made it possible to use several DeformBodyInflatable objects in the same simulation.

- Fixed issue with console window flashing when launching a scene with a Deform Manager.

- Initialization time has been further reduced.

- General stability improvements.

[Plugin]

- Added DeformMapping component, which takes a DeformBody as input and then maps the vertices of the MeshFilter/SkinnedMeshRenderer on the GameObject of the DeformMapping to the animated vertices of the DeformBody.

- Added "Base mesh" parameter to DeformBody, which makes it possible to use one mesh (the base mesh) for the initialization of constraints, and a deformed version of that mesh in the MeshFilter/SkinnedMeshRenderer.

- Added DeformMeshExporter which can save any mesh in a MeshFilter/SkinnedMeshRenderer to a project asset.

- Made it possible to change Computation Type in Deform Manager. The possible options are CPU (single-core), CPU_MULTI (multi-core) and GPU_CUDA. If GPU_CUDA is selected but no CUDA graphics card is available, CPU_MULTI is automatically selected.

- Improved stability and consistency of the DeformPattern component.

- Made it possible to paint collision masks for multiple DeformBody objects simultaneously.

[Demos]

- Added "Pressure Multiple" demo.

2020-05-20

[Engine]

- Mass is now taken into account when reacting to forces such as wind, and when responding to collisions.

- Force fields have been added.

- Laplacian damping has been added.

- Pressure constraints have been added.

- Reduced vibrations of self-collisions.

- Various improvements to speed up initialization.

- General stability improvements.

[Plugin]

- Added the DeformBodyInflatable component, which can be inflated/deflated by setting the pressure scale.

- Added laplacian damping to DeformManager.

- Removed the deprecated simulation mesh parameter from DeformBody. This will be replaced by the more general "mapped objects" in a future release.

[Demos]

- Added "Force field" demo.

- Added "Masses" demo.

- Added "Pressure" demo.

[Known issues]

- There is currently a rarely occurring bug that may affect collisions when multiple mesh colliders are used.

2020-02-20

[Engine]

- Added support for skinning deformable objects to mesh colliders, and added scalar skinning strength.

- Interpolated rotation and translation of all implicit colliders.

- Updated API.

- Serialization functions now take a coordinate system as input.

[Plugin]

- Updated DeformSkinning component to reflect changes in engine.

- Cleaned up assets.

[Demos]

- Added "TwistedCloth" demo.

2019-11-07

[Engine]

- Improved the general performance of the mesh collider

- Implicit colliders are now interpolated over each timestep

- Vertices can now be retrieved in local space

[Plugin]

- The picking functionality has now been moved from the Deform Manager to a new script called Deform Picker

- The timestep can now be set from the Deform Manager

- Deform Body now supports Skinned Mesh Renderer

- Added new functionality: collision masks

- Added new functionality: skinning

- Added new functionality: proxy meshes

- Added new functionality to enable the use of separate simulation and render meshes

- Added an option in the Deform Body to merge close vertices

- Improved code efficiency in the Deform Collider Mesh

- Improved code layout of DeformPlugin.cs

- Fixed a bug with the transforms of hierarchical game object structures being wrong

- Fixed a bug occuring when duplicating objects containing patch creators

- Fixed a bug where the physics engine would receive the wrong rotation of mesh colliders

- Fixed a bug where the sewing would end up in an infinite loop

[Demos]

- Added tutorial scene Tutorials/SkinningToCharacter

- Added tutorial scene Tutorials/CollisionMasks

- Added a demo scene DemoScenes/FlagProxies

[Documentation]

- Updated the benchmark results

- Added documentation for the Deform Body Proxy component

- Added documentation for the Deform Skinning component

- Added documentation for the Deform Picking component

- Added documentation for the collision masks

- Added new tutorial: Using proxy meshes

- Added new tutorial: Using skinning

- Added new tutorial: Using collision masks

- Added multiple items in the Troubleshooting page

2019-08-28

[Engine]

- Fixed memory leak in collision handling data structure on the GPU.

[Plugin]

- Made it possible to paint several DeformBody objects at once using the vertex painting editor.

- Bug fixes in the sewing GUI.

- Made it possible to place the DeformBody component on the parent object of a MeshFilter.

[Documentation]

- Updated the section about vertex painting.

2019-08-02

[Engine]

- Reduced initialization time of the remeshed mesh collider.

- Reduced computation time of finding mesh contours.

- The deform_plugin.dll is no longer needed.

- A bug with high-frequency parts of collider meshes (such as hands) has been removed.

- Gaps between stitched clothes have been removed.

- Ability to sew cloth to itself.

[Plugin]

- Serialization of clothes now possible. This enables the user to load a cloth in any pose.

- When a mesh is changed, the sewing is recalculated.

- When a mesh created from a DXF is changed, an option to retriangulate is available.

- Added a bend modifier script

- Improved the sewing GUI.

- New and improved DXF importer.

- A new plugin class has been created, containing all the access points to the DLL.

[Demos]

- Added tutorial Tutorials/ClothedCharacterSleeves

- Added tutorial Tutorials/SewingPatches

- Added demo DemoScenes/CharacterScenes/CharacterBackflipDressAssymetric

- Added demo DemoScenes/CharacterScenes/CharacterCoolDanceAssymetric

- Added demo DemoScenes/CharacterScenes/CharacterMMAKickPantsBlouse

- Added demo DemoScenes/CharacterScenes/CharacterMMAKickPantsShirt

[Documentation]

- Added API documentation for the Plugin class

- Added documentation for the Deform Pattern

- Added documentation for the Deform Serializer

- Added documentation for the Deform Modifier Bend

- Added new tutorial: Sewing two patches together

- Added new tutorial: Saving and loading a garment configuration

- Added new tutorial: Creating one-piece sleeves

2019-05-02

[Engine]

- The collision detection system has been improved and there are no longer crashes when two portions of the cloths are distant from each other.

- Improved friction model. All colliders now have functioning static and kinetic friction parameters. Friction can also be set per cloth particle.

- Increased general performance by removing unnecessary copying of data.

- Added functionality to automatically remesh mesh colliders.

[Plugin]

- Added “sticky” collider. If a particle collides with the sticky collider, it will become fixed to it.

- Removed a bug where the plugin crashes when not having a DeformManager in the scene.

- If the simulation is stopped while recording an FBX, the plugin still produces the FBX files. This will remove the need to explicitly press the “Stop recording”-button.

- Painted vertices are now visible through objects.

- Enabled functionality for painting per vertex friction.

- Added remeshing option for the mesh collider.

[Demos]

- Added a scene FrictionSphere demonstrating the new friction model.

- Added a scene MeshColliderDownsampling demonstrating the remeshing functionality of the mesh collider.

[Documentation]

- Added information about the new friction

- Added information about the glue collider

- Added information about the remeshing of the mesh collider