- SofaAdvancedPhysicsAPI, a C++ library efficiently wrapping SOFA concepts in a single API
- SofaUnity, a C# Unity3D asset binding SofaAdvancedPhysicsAPI to add SOFA as a physics engine in Unity3D
With this module you can therefore take advantage of the interactivity, the flexibility and the performance of SOFA while developing your Unity3D application. Simulations of deformable objets possibly including interactions with haptic devices, VR or AR become possible!
The asset allows you to run SOFA simulation in background while your Unity3D project is running. At each Update of the Unity3D application, a simulation step will be requested in SOFA. Note that the execution is performed asynchronously and thus the time step used in your physical simulation may be different to the Unity update frequency. Through a hierarchy of C# classes relying on the Unity3D mono-behavior mechanism, the asset provides a set of Unity3D scripts and GameObjects representing the main SOFA components. Like any GameObject, they can be edited using the Inspector view and added to the SOFA simulation scene graph through the Hierarchy view. See Object Creation of Scene Graph Edition for more details.
Several levels of the SOFA integration within Unity3D are available to create SOFA simulation using SofaAPAPI-Unity3D:
- the simplest way is by loading existing SOFA simulation scene (*.scn). See the section: SOFA Scene Parsing
- by creating high level SOFA-Unity objects. See the section: Object Creation
- or by creating SOFA component representation directly inside the Unity3D scene graph. See the section: Graph Edition
A more detailed presentation is available on InfinyTech3D website, as well as a list of additional available SOFA-Unity assets.