Some scripts from a couple of years ago to export multiphase OpenFOAM multiphase simulations from ParaView and import them into Blender. Basically load a bunch of x3d files into Blender. I hope this helps someone.
There is a version for Blender 2.79 and one for 2.80 because some of the API changed.
- export scene from ParaView (either just water surface or volume or both): name+framenumber
- adapt file path and name in script for Blender
- adapt number of first and last frame in script for Blender
- import once manually to adapt the name of water surface/volume if necessary
- create the materials (
water_surf_mat
for surface andwater_body_mat
for volume, see examples for 2.79) - remove the import parts you don't need
- run the script
- use the
delete
script if necessary to remove all the objects
For Blender 2.79, I've adapted a part of the VisualSPHysics addon to work with the same x3d files.
- VisualSPHysics needs to be installed, otherwise parts are missing
- Put the pythonfile into Blender/2.79/scripts/addons (or equivalent)
- De-activate the addon when you don't use it.
- Name the files you want to load: name_0000.x3d, name_0001.x3d, ...
For Blender 2.80, I also include an adapted script where a rendered picture for each frame is exported.
except for the VisualSPHysics addon which is under GNU