Supplementing the Blender simulator with other tools can enable creating animations not otherwise possible. How can another simulator be co-simulated with Blender?


1 Answer 1


Blender 2.8 can co-simulate with simulation tools that generate FMUs (see https://fmi-standard.org/ ) using the FMPY library. Most versions of Modelica will create FMUs. A complete list of simulation tools that create FMUs is found at https://fmi-standard.org/tools/ .


To co-simulate with an FMU, the library FMPY (https://github.com/CATIA-Systems/FMPy ) should be installed. This procedure will work on Blender 2.8 and later.

  1. Using the python version with Blender, at the command prompt enter 'python -m pip -install FMPY'
  2. Is FMPY installs successfully, the final message should say something like 'Successfully installed ...'
  3. Verify installation by opening Blender and typing 'import fmpy' into the console. If it successfully imports, then the library was installed.
  4. Verify an FMU can be imported by downloading an FMU and loading.
  5. Download 'rectifier.fmu' from https://github.com/modelica/fmi-cross-check/blob/master/fmus/2.0/cs/win32/Dymola/2019FD01/Rectifier/Rectifier.fmu
  6. Enter the following python commands:
from fmpy import *
fmu = 'path-to-fmu\\rectifier.fmu'
  1. If a summary of the fmu prints out, then the module is working an able to import fmu's.


To co-simulate, a python script can be used with animation nodes to initialize and co-simulate. The fmu_simulate command can be used to set the state,set inputs, step in time, and get the outputs and new state. See https://github.com/CATIA-Systems/FMPy/blob/master/fmpy/examples/coupled_clutches.py for an example of this command.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .