1
$\begingroup$

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!

$\endgroup$
5
  • $\begingroup$ blender.stackexchange.com/questions/57531/… $\endgroup$ May 2 '19 at 16:42
  • 1
    $\begingroup$ Perhaps see blenderartists.org/t/…. If you can bake the simulation to a sequence of shape keys, you can get this working. $\endgroup$ May 2 '19 at 17:50
  • $\begingroup$ @DonMcCurdy thanks for sharing! I will try it but I think I could get trouble because my verts count is changing over the time $\endgroup$
    – Fabian
    May 2 '19 at 19:02
  • 1
    $\begingroup$ 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 github.com/Jam3/three-fluid-demo. $\endgroup$ May 2 '19 at 21:18
  • 1
    $\begingroup$ More examples: threejs.org/examples/?q=water#webgl_gpgpu_water $\endgroup$ May 2 '19 at 21:19
0
$\begingroup$

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

$\endgroup$
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.