FLIP Fluids Addon: A liquid fluid simulation tool for Blender


(adrencg) #404

Is there a best practices list to follow to keep the addon stable? Anything I’ve tried to do outside a tutorial makes the simulation crash Blender. Could it be scale?

(lumpyoatmeal) #405

Post a blend file so we can see and try it. I have my units set to meters and my domains are typically no more than 5 meters in any direction. My highest resolution is 320.

(adrencg) #406

Got it working, thanks.

(adrencg) #407

Any experts here know how i can convert the flip whitewater particles into actual geometry for OBJ export? I tried Alembic and it’s not importing into Softimage, but I can definitely get actual geometry from Blender to Softimage.

(RLGUY) #408

What did the problem end up being? This could be useful for others that might be running into the same issue.

There is a workaround for how to export fluid surface/whitewater to Alembic here: https://github.com/rlguy/Blender-FLIP-Fluids/wiki/Scene-Troubleshooting#export-to-alembic-cache-is-not-exporting-animated-meshes

This workaround will also work for exporting to an OBJ sequence, however the OBJ exporter may be very slow and result in very large files. The whitewater particles will be exported as meshes containing only vertices where each vertex represents a whitewater particle. I am not sure how Softimage works and if is able to import vertex-only meshes.

(adrencg) #409

Will try that, thanks. The problem initially was that I scaled everything up too large in blender. I had imported the scene from Softimage and it came into Blender very small, and i didn’t think a fluid sim would calculate well at that scale. I made everything 10 times bigger, but that made Blender crash when simulating, and mainly when using the “invert” feature on collision objects. Once I cut the scale down some, it became stable.

(adrencg) #410

Here’s the text from that page you linked…

Alembic export is not officially supported in the FLIP Fluids addon. The reason for this is that the Blender Alembic exporter can be buggy and unstable with the large meshes produced by the fluid simulator. The Alembic exporter also does not offer much in terms of customizability, so how the cache is imported into other software may be unpredictable.
However, there is a workaround that may help you export the fluid meshes to an Alembic cache. In order for Blender to recognize the fluid object meshes for export (fluid_surface, whitewater_foam, whitewater_bubble, whitewater_spray), a modifier must be added to the objects. A modifier which does nothing such as a smooth operator with 0 repeats would be a good choice. The animated meshes can then be exported within Blender (Blender > File > Export > Alembic (.abc)).

So are the whitewater elements particles or meshes? They’re mentioned as meshes but they look like particles to me. The main fluid can be exported as an OBJ sequence which I can load into Softimage. If I use a smooth at zero on the whitewater particles, Blender crashes when exporting ABC file. If I save it as an OBJ, it does register that something has happened, but loading it into Softimage just gives me a cube.

Is there a way to change the FLIP particles to a mesh in Blender and export?

(lumpyoatmeal) #411

Is there a way to get the volume of the fluid mesh in cubic meters (or whatever)?

(lumpyoatmeal) #412

Fluids with viscosity of 0.1 don’t seem to flow up a tube. At first I tried with a viscosity of 1.0 but that never went up all of the way either. Changing it to 0.1 and increasing the velocity of the inflow didn’t help either. Here’s a video of what it’s doing (or not doing). When it gets to the top it barely moves forward.

(Or streamable video.)

The tube is a corkscrew, aka Archimedes spiral, from the Add Curve: Extra Objects add on. In the Curve Object Data I did a bevel with a depth of 20 cm, then used the solidfy modifier, going outward (Offset 1 instead of -1).

Here is the current version of the file which is baking and working properly, but it has the viscosity turned off so it’s using whatever the default viscosity is, and I also turned on whitewater, just for fun.


(RLGUY) #413

The whitewater particles are meshes. They look like particles because the Blender mesh contains only vertices. As stated in the troubleshooting page, Alembic export is not officially supported due to instability. Some users experience crashes when exporting to Alembic.

These is a way to calculate the volume of a mesh with a Python script. You will need to copy this into the Blender text editor and press Run Script. To view the calculated mesh volume you will need to open the Blender system console (Blender > Window > Toggle System Console).

import bpy

def signed_volume_of_triangle(p1, p2, p3):
    v321 = p3[0] * p2[1] * p1[2]
    v231 = p2[0] * p3[1] * p1[2]
    v312 = p3[0] * p1[1] * p2[2]
    v132 = p1[0] * p3[1] * p2[2]
    v213 = p2[0] * p1[1] * p3[2]
    v123 = p1[0] * p2[1] * p3[2]
    return (1.0 / 6.0) * (-v321 + v231 + v312 - v132 - v213 + v123)

def calculate_mesh_volume(mesh_data):
    volume = 0
    vertices = mesh_data.vertices
    for p in mesh_data.polygons:
        p1 = vertices[p.vertices[0]].co
        p2 = vertices[p.vertices[1]].co
        p3 = vertices[p.vertices[2]].co
        volume += signed_volume_of_triangle(p1, p2, p3)
    return abs(volume)

surface_object = bpy.data.objects.get('fluid_surface')
print("VOLUME OF SURFACE MESH:", calculate_mesh_volume(surface_object.data))

Just reminder that the FLIP Fluids Summer Sale begins in just 10 days!

Also, check out this new animation:

(RLGUY) #414

I missed this post with my last update! Inflows in the current version of the addon do not function properly when submerged. A feature for this has been added to the next version (1.0.4) which will be available August 11th! Details about this feature can be found here: #322

Development Update: Adaptive Mesh Generator

We’ve got a cool new performance enhancement coming for version 1.0.4: a new particle mesher. We’ve entirely rewritten the mesh generator to take an adaptive approach to the mesh calculations. Instead of making mesh calculations over the entire domain, the new ‘smart’ mesher will be optimized to only make calculations where fluid is active.

Benchmark: Cascading Water Feature

We’re currently testing this new mesher by comparing simulation times between v1.0.3 / v1.0.4 and the results are looking good!

Here are the stats from the Cascading Water Feature scene:

In this test, it looks like the improvements shaved off about 140 minutes from the meshing process. Note that other calculations in v1.0.4 took longer than calculations in v1.0.3. This could be explained by the fact that the higher performance meshing calculations are running ontop of those other calculations, which is decreasing performance of those other calculations. Overall, the total bake time of the simulation decreases by 89 minutes.

Also note that the mesh cache file size is larger in the v1.0.4 test. During this test we have identified a bug that was causing bumpy edges on the fluid surface and this creates a larger mesh size. This is something we’ll need to work out, but we’re still on track for an August 11th release!

And another note: the preview cache is only 6kB because preview meshes have not yet been implemented into the new mesher. Generation of preview meshes take a negligible amount of time to produce, so this should not affect the results of the test.

Benchmark: Fluid in an Invisible Box

Another benchmark scene, Fluid in an Invisible Box, is ideal for the new particle mesher. This is because that scene always has fluid in a much smaller volume than the total domain volume. The new mesher only needs to make calculations where the fluid exists whereas the old mesher needed to make calculations over the entire domain.

This test is currently running and it’s looking like the old mesher accounts for 45% of the bake time and the new mesher only accounts for 8% of the bake time.

Future Performance Enhancements

Since these results are looking good, there is some good news! These meshing calculations can be applied to the velocity advection and some of the fluid particle calculations. Now that we know this performance enhancement works, we can work on applying these types of calculation in other areas of the simulator to increase performance in the future.

(lumpyoatmeal) #415

It seems that they sort of work when the viscosity is left at the default. Here’s a test I did where the inflow is a sphere rotating around in a vat and behind it is an empty which is its target.


(Gilles Charbonneau) #416

Question for you guys, at the moment I am working on a fracture modifier architectural destruction tutorial set, I was thinking doubling on it with an in-depth Flip Fluids tutorial as well, since both are from the same developers and work together, also, I was on the beta team for the add-on.

I am a TD from Montreal, at work I use mostly Houdini, but I have been using Blender for my personal projects for 6 years now, I am an expert at fluid simulations and I have been making free tutorials since the mid 90s for 3D and 2D software, here are some of the tutorials I made in recent years for a 2D software called Moho/Anime Studio.

Gilles Charbonneau - Anime Studio tutorials and articles blog
My Moho/Anime Studio Youtube channel

There is a catch though, I need a new personal workstation badly, so I want to ask 10$ for both tuturials, if there is a demand, might do a crowdfunding for the series.

Here are images of the model I made for my architectural destruction tutorial, it is very detailed with 225K polygons and this is exactly the kind of model that would be used in a Hollywood movie production.

So I was wondering if there is any interest for something like that?

(RLGUY) #417

Just a heads up: FLIP Fluids Version 1.0.4 is now available on the Blender Market. You may find it in your Blender Market account downloads! Check out the changelog at the bottom of the Blender Market Product Page.

And by popular request and also to celebrate the SIGGRAPH 2018 computer graphics conference, we have just launched our Summer Sale!

(Klutz) #418

This may sound like a daft question, but how do I upgrade from 1.03? The update is visible in User preferences, but I’m stumped as how to proceed from here…

(RLGUY) #419

The best way to install a new version of the addon is to:

  1. Uninstall the old version
  2. Restart Blender
  3. Install the new version

Instructions for how to install/uninstall the addon can be found here: https://github.com/rlguy/Blender-FLIP-Fluids/wiki/Addon-Installation-and-Uninstallation

(Klutz) #420

Thanks, I figured it out in the meantime. I should have explained that I was unable to find a download location, but it turned out it was the same page on Blender Market where I originally downloaded the purchase.

(Tedri Mark) #421

I just downloaded the demo addon, and the scenes, but I don’t see the test case menu in the physics panel?

(RLGUY) #422

Hey Tedri_Mark,

Were there any errors when you installed the Demo addon? You can check for errors in the Blender system console (In windows, you can open this menu with Blender > Window > Toggle System Console). Note: If you previously installed another version of the demo addon, you must uninstall this one first before installing a new version.

If the demo addon installed correctly, you should see this in your user preferences (maxe sure to save user settings after enabling the addon):

If installed correctly, you should see a FLIP Fluid button in the physics menu:


When you open a demo scene, the physics menu should looks like this:

(Tedri Mark) #423

Ah yes! I must have misread the instructions and thought the demo menu would be there on opening and I’d select a test case from there…

All good now.