1

Is there any possibility to export a fluid simulation as an animation and import it in three.js?

As I read in some threads it seems to be impossible to export a fluid simulation to a gltf, so I started to copy my simulation multiple times and apply the fluid modifier for all objects in different frames to get an independent new mesh for each frame. After that I used the outlier to hide the individual mesh in the corresponding frame and keyframe that using (i) after clicking to the eye button.

Thats works well if I play the animation using the blender timeline play button. But there is no animation exported to the gltf .. is something wrong with my idea, or do anyone know an other possibility run my fluid blender simulation in three.js? I am grateful for all ideas!

Fabian
  • 111
  • 4
  • https://blender.stackexchange.com/questions/57531/fbx-export-why-there-are-no-materials-or-textures/ – Duarte Farrajota Ramos May 02 '19 at 16:42
  • 1
    Perhaps see https://blenderartists.org/t/export-bezier-curve-animation-as-gltf-and-or-fbx/1151423/4?u=donmccurdy. If you can bake the simulation to a sequence of shape keys, you can get this working. – Don McCurdy May 02 '19 at 17:50
  • @DonMcCurdy thanks for sharing! I will try it but I think I could get trouble because my verts count is changing over the time – Fabian May 02 '19 at 19:02
  • 1
    Hm, yeah that could be an issue. I don't know of any general-purpose way of animating something involving topology changes, and you can't really export an offline Blender simulation directly into a realtime engine like threejs and just run it. You could maybe build the simulation directly in threejs, but this is a complex topic. See https://github.com/Jam3/three-fluid-demo. – Don McCurdy May 02 '19 at 21:18
  • 1
    More examples: https://threejs.org/examples/?q=water#webgl_gpgpu_water – Don McCurdy May 02 '19 at 21:19

1 Answers1

0

Try using LightWave Objects plug in, you can export physics simulation to keyframes, if you export and import it as .mdd (Lightwave Point Cache), I think this will covert the simulation to keyframes, from there you can export to gltf

  • https://blender.stackexchange.com/questions/200210/fluid-how-to-convert-the-simulation-to-a-series-of-meshes – batFINGER Oct 28 '20 at 15:58