Skip to content

InfinyTech3D/SofaUE5-Renderer

Repository files navigation

SofaUE5-Renderer

Description

This repository is a Unreal Engine 5 plugin allowing to render a SOFA simulation scene inside UE5. All SOFA VisualModel components present in the loaded simulation will be rendered inside UE5 engine as Actor with a GeneratedMesh instance. Thus, it is possible to apply Unreal Engine Materials to each visual model and also to combine UE5 rendering pipeline with the SOFA simulation.

Important: This version allows only to change the Gravity and the TimeStep of the SOFA simulation and only the VisualModel are mapped into UE5.
A full integration of SOFA components with a two-way communication will soon be avaible.

Compatibility:

  • Unreal Engine version 5.0.3
  • SOFA version >= 22.12 with SofaPhysicsAPI
  • Only tested on Windows

Installation guide

  1. Install Unreal Engine version 5.0.3
  2. (optionnal) Create a new project
  3. clone the repo inside your Unreal Engine project: git clone git@github.com:InfinyTech3D/SofaUE5-Renderer.git /UnrealEngine/myUE5Project\Plugins\SofaUE5-Renderer
  4. Copy the SOFA dll libraries inside: /UnrealEngine/myUE5Project\Plugins\SofaUE5-Renderer/Binaries/ThirdParty/SofaUE5Library/Win64/ (for windows)
  5. Restart Unreal Engine and reopen your project. The new plugin should be there.

Usage

Once the plugin has been loaded you should have this folders structure under Plugins/

  • SofaUE5 Content contains several examples listed below with their corresponding SOFA scene as well as textures and Materials.
  • SofaUE5 C++ Classes provide the components to be used to add SOFA simulation inside the UE scene
  1. Drag and Drop the SofaContext C++ class into your current level. This component will be added to the scene and can be access inside the Outliner. This compoment will create a SOFA simulation physically represented by this Actor in the Level.

You can access the SofaContext parameters by clicking on it and change its parameters. You can scale or move the SOFA frame to match your current scene. Other parameters linked to SOFA can also be changed like the gravity vector as well as the time steepping and activating the logs.

  1. Click on the button next to the File Path to load a SOFA scene. This will create an Actor SofaVisualMesh with a GeneratedMesh for each SOFA VisualModel

SOFA simulation will be performed as soon as Unreal Engine is playing.

Examples

Three examples corresponding to SOFA Demo folder are provided inside the package: They are available in the folder /Scenes/Demos/

Here are a some results of the integration:

License

This Unreal Engine plugin is under GPL-3 license.
Other license formats can be provided for commercial use. For more information contact: contact@infinytech3d.com.

Releases

No releases published

Packages

No packages published