FLIP Fluids Addon: A liquid fluid simulation tool for Blender

Weekly Development Notes #55 – New Geometry Attribute Features

Covering the week of April 12th – 16th, 2021.

Thanks for checking out our 55th development update for the FLIP Fluids liquid simulation addon for Blender! Last week felt like such a productive week for code development. I was able to clean up and optimize some code to add proper attribute based shading feature implementations using Blender’s 2.93 new geometry attributes, and that is what I’ll cover in today’s post.

Incremental Resolution Test

We ran 560 simulations using the text sheeting + surface tension splash example scene, each time increasing resolution and grabbing the last frame. Here’s the result!

https://gfycat.com/selfassuredsoupyhydatidtapeworm

New Geometry Attribute Features

A few weeks ago we released a prototype build for velocity-based shading (read more in development notes #52). We heard, and saw from many of you that you are loving this type of feature so we have bumped this up in our development priorities. We now have a proper feature implementation for some new geometry attribute features in the latest experimental build.

These attribute features can be enabled in the FLIP Fluids Surface panel. After baking, the attributes can be accessed in a Cycles Attribute Node.

An important note is that due to a bug in Blender, these new attribute features will cause render crashes or incorrect renders. Until this is fixed, rendering from the command line will be required to prevent render crashes and ensure correct rendering when using these attribute features.

Velocity Attribute

We have added a feature to attach 3D velocity vectors to the fluid surface mesh. After baking, the velocity vectors (in m/s) can be accessed in a Cycles Attribute Node with the name flip_velocity from the Vector output. Here is an example shader set up:

This shader uses the Vector Math Length node to convert the directional velocity vector to a speed value. If the velocity direction is not needed in your shader, enabling the Speed Attribute would be a better choice.

Speed Attribute

If the velocity direction is not needed, enabling the speed attribute instead of velocity would be more optimized and uses 1/3rd the amount of cache storage compared to the 3D velocity vector data. After baking, the speed values (in m/s) can be accessed in a Cycles Attribute Node with the name flip_speed from the Fac output. Here is an example shader set up:

Here are two tests using speed based shading on our Volume Force Animated Character and Stair Step Ocean example scenes. The shader was adapted from Ducky 3D’s Procedural Lava Shader.

https://gfycat.com/recentkindamericanwarmblood

https://gfycat.com/classicinfinitehorsefly

Age Attribute

We have also added a feature to attach the fluid age to the liquid surface mesh. After baking, the age values (in seconds) can be accessed in a Cycles Attribute Node with the name flip_age from the Fac output. Here is an example shader set up:

An Attribute That Did Not Work Well

Last week we also experimented with adding an attribute to make it possible to support simulations with multiple material fluids. Sadly, this did not work as well as we had hoped and this feature will need more work to add a correct implementation. We added a Source ID attribute that can be set on each Fluid or Inflow object hoping that accessing this data in a shader could be used to differentiate between materials.

In this setup, there are three fluid objects each set to a Source ID value of 0, 1, and 2. The shader selects the material based on the attribute value. 0 is Red, 1 is Green, and 2 is Blue.

The problem with this method is that when different materials touch each other, there are jagged edges because the attribute data is aligned to the mesh vertices and interpolated inside of the faces. Even at high mesh resolutions, the jagged materials are still quite noticeable.

Another problem due to interpolated data is that two touching materials can result in the wrong ID attribute for part of the face. For example, when Red (ID 0) touches Blue (ID 2), the interpolated ID value averages in the middle to 1, which is why there is a green stripe in the render.

In this render test, the Source ID and Age attributes were used to color the liquid. Notice the jagged edges and flickering between the two liquid materials:

https://gfycat.com/wellinformedoldhypacrosaurus

We’re working on a better method in order to support multiple material liquids. Instead of outputting source ID values, we are going to try generating blend percentages for each source ID. Example: a vertex could contain data like 30% Material1, 10% Material2, and 60% Material3 and a shader would correctly mix the shaders in order to create a smooth blend between touching materials.

This feature is currently hidden from the UI until a better implementation is added, but if you would like to play around with the current state of the feature, this can be unhidden by checking the Enable Developer Tools option in the FLIP Fluids Preferences menu.

Experimental Version 9.0.9.19

Want to try out these new features? They can be tested in our Experimental Builds Package in the latest version!

Release Notes v9.0.9.19 (21-APR-2021)

  • This version is the first experimental build since the release of FLIP Fluids 1.0.9b (06-APR-2021).
  • Added geometry attribute features for the liquid surface mesh that can be enabled in the FLIP Fluid Surface panel.
    • Added a velocity attribute. After baking, the velocity vectors (in m/s) can be accessed in a Cycles Attribute Node with the name ‘flip_velocity’ from the Vector output. If the velocity direction is not needed, use Generate Speed Attributes instead.
    • Added a speed attribute. After baking, the speed (in m/s) can be accessed in a Cycles Attribute Node with the name ‘flip_speed’ from the Fac output.
    • Added an age attribute. After baking, the age (in seconds) can be accessed in a Cycles Attribute Node with the name ‘flip_age’ from the Fac output.
    • Only supported in Blender 2.93.
    • Only supported using the Cycles renderer. According to the Blender developers, EEVEE support will come at a later date.
    • Due to a bug in Blender, these new attribute features will cause render crashes or incorrect renders. Until this is fixed, rendering from the command line will be required to prevent render crashes when using these attribute features.
    • Compatibility with older .blend files: If you had tested our prototype build for velocity-based shading, you may need to fix your .blend file when using this version. To fix your file, delete all shape keys attached to the fluid_surface object.
9 Likes

Hi. I am doing a little experiment:

I have two doubts:
Is there any place where I can check different Viscosity attributes? I would like to have the fluid a bit more like paint than caramel…I believe it looks a bit thick. I would also like to not have those blobs you can see…it looks like if it was porridge and I am aiming to something more fluent…aka paint.
Thank you !

Hi, viscosity attributes or variable viscosity features are not supported at the moment (Limitations: Multiple Fluid Interaction). Only a single value of viscosity can be set.

If you would like to simulate a thinner liquid, this can be set in the domain FLIP Fluid World > Viscosity menu. Setting a lower value for the viscosity will result in a thinner liquid.

For a smoother liquid surface, the amount of smoothing can be increased on the fluid_surface Smooth modifier (located in the modifiers tab).

Adding some surface tension to the liquid can help with realism for a paint type liquid.

Hope this info helps!

1 Like

New #FLIPFluids video! We’ve gathered five of the most common issues that are faced when using our FLIP Fluids addon and show you how to solve them.

  • Reducing Volume Loss
  • Reducing Mesh Flickering
  • How to find the FLIP Fluids Helper menu
  • Why is my inflow not generating liquid?
  • How to turn an Inflow object on and off

If you are looking for sound effects and music for your video productions- here is a special link for you! Visit Audiio to start for free now and use discount code "EARLYADOPTER " to get %20 off out of the new annual music/SFX plan called Audiio Pro!

2 Likes

Weekly Development Notes #56 – Solving Issues Video, Blender 3.0, And Cycles-X Testing

Covering the week of April 19th – 30th, 2021.

Thanks for taking a look at our 56th development update for the FLIP Fluids liquid simulation addon for Blender! There was not an update last week as I was mostly away from development during Monday – Wednesday. The last two weeks of development mainly involved catching up on fixing reported bugs. We also released a new video and had a chance to test Blender 3.0 Alpha!

New Video: Solving Common Issues

(The video is linked in the post above this one!)

Dennis and I gathered common issues that are faced when using our FLIP Fluids addon. These are the most frequent issues that come up during help requests, and in this video Dennis helps explain and solve the issues as well as add some helpful tips (I even learned a few things about Blender from the video!).

Blender 3.0 Alpha and Cycles-X Compatibility

We usually don’t start testing new Blender versions this early (Blender 2.93 still has 3 weeks until release!), but we’ve heard from some of you that you’re real excited about the new Cycles-X branch. As a celebration for the 10th anniversary of the Cycles renderer, the Blender developers are adding some nice optimizations and preparing Cycles for the future. You can read more about Cycles-X here and can download the branch here.

We had a chance to start testing Blender 3.0 as well as the Cycles-X branch this week. At the moment, there are no known issues when using these versions of Blender with the FLIP Fluids addon version 1.0.9b or the latest experimental version. You may encounter some error messages in the system console when FLIP Fluids 1.0.9b, but these will be harmless and are not displayed in the Blender UI.

Compatibility may break and issues may arise as development of Blender 3.0 continues. Issues can be reported and tracked in this GitHub thread.

Performance Testing

During some brief testing on a high geometry simulation, Cycles-X definitely decreases render time. In this test on a GTX 1070, Blender 2.93 Beta and Blender 3.0 Alpha performed nearly the same at 1m30s. Cycles X reduced the render time down to 1m06s, but also used more memory. We’ll need to do more testing on larger scenes to see how the memory usage scales.

We’ll also need to test how Cycles-X performs with a large amount of instancing which is used to render whitewater particles.

Experimental Version 9.0.9.20

Want to try out the latest fixes and improvements? They can be tested in our Experimental Builds Package in the latest version!

Release Notes v9.0.9.20 (05-MAY-2021)

  • This version mostly adds fixes for reported issues.
  • Blender 3.0 Compatibility: Blender 3.0 is in early development and is set to release on August 25, 2021. At the moment, there are no known issues when using Blender 3.0 with the FLIP Fluids addon version 1.0.9b or the latest experimental version. The Blender 3.0 Cycles-X branch also seems to work after some brief testing.
    • Issues related to Blender 3.0 compatibility can be reported and tracked in this thread: issue #535
  • Added ‘Remove Mesh Near Domain’ feature support for the preview mesh.
  • Added an option to the FLIP Fluids Preferences menu to hide the experimental build warning displayed in the physics panel.
  • Bug Fix: Simulation will no longer stop if a frame statistics temporary file is found to be in use and unable to be deleted (issue #529).
  • Bug Fix: Issue where surface and whitewater materials would be removed when changing between scenes.
    • This involved many changes for how the addon sets up the viewport and render. Please let us know about any odd behavior in how the simulation is displayed.
  • Bug Fix: Issue where command line operators may not work if spaces are contained in the Blender executable path, specifically when located in C:/Program Files/.
  • Bug Fix: Fixed inconsistent UI issues (issue #533).
  • Bug Fix: Issue where non-mesh type objects could be selected as a custom whitewater particle object, leading to an error.
  • Bug Fix: Re-fixed preview rectangle artifacts issue that was introduced as a side effect by another bug fix (issue #491).
  • Bug Fix: Issue where the whitewater display percentage setting loaded an incorrect amount of whitewater after resuming a simulation. Notes:
    • This was caused by the addon saving incorrect information to the savestates cache.
    • Simulations will need to be re-baked for this fix to take effect.
  • Bug Fix: Issues where (harmless) error messages could be displayed when using Blender 3.0.
  • Known Issue: The Age and Source ID attributes are not yet supported when using the particle sheeting feature. A fix is in progress!
3 Likes

I’ve been monitoring this thread and saw this comment and the white water wake comments above it, so here’s one more request for streamlining workflows around that scenario. We’re using PhoenixFD at work, but I’m keeping an eye out for alternatives as I’m personally not very fond of Max.

@RLGUY , hello.

I have a question:
Is it possible with the flip fluids addon to create a fluid with 100 million particles and 1 billion voxels?
Create a simulation like this:

This simulation was created with houdini flip solver.
How long would it take to bake a similar simulation (on your computer)?
Can this be done within a reasonable time frame?
Judging by the information from this video (at 1:02 am), 124 frames were baked for 9 hours 2 minutes:
https://vimeo.com/465308081

I found this video, with a simulation of a flip fluids addon:

The description states that the simulation took 3500 hours.
Why is houdini so much faster?
Does it depend on more cunning and faster algorithms?
Or does houdini make simplifications?
Is it possible to optimize the flip fluids addon to simulate 100 million particles at 1000x1000x1000 resolution?
Or is the existing algorithm already optimized as much as possible?
Huge simulations now take an inordinate amount of time.

Hello! It’s possible to create simulations with 100+ million fluid particles and it is not that uncommon to see when artists share their files with us, but they do take a long time to simulate. Typically a few days of baking. I am not sure what caused the simulation linked to take so long (3500 hours is 146 days!).

However, at the moment, a 1 billion voxel simulation wouldn’t be possible in the addon due to memory constraints. Many of the calculations we are running are performed on a dense grid where all memory is reserved, even empty space. We’re slowly moving towards a more sparse memory representation where empty space can be ignored, but this will take a lot of time.

Our simulator is far from being as optimized as Houdini FLIP. Houdini has the benefit of being in development for much longer, with a larger team, with more brilliant minds, and with a lot more resources. We’re a small team with a single programmer and were still quite new to this with only a few years of development experience in simulation. It will take a lot of time and effort to develop software to be comparable to Houdini.

There are also limitations of the Blender software, which just cannot handle huge amounts of geometry data efficiently and with stability. Loading the data of massive simulations require a huge amount of memory as well as time to set up in the scene. For example, there is a limit of around 16 million whitewater particles that can be rendered on the CPU (about 8 million on GPU) before memory runs out on a typical system whereas other software can render and handle 100+ million whitewater particles with much less memory and much less render time.

3 Likes

This makes me curious on your take on the pointcloud rendering that if i recal correctly is comming up in blender 3.0? Is it going to be a great edition for rendering white water or do you think it will be relativly the same?

Hoping it will be helpful to improve our whitewater feature! I haven’t had a chance to look very far into this yet, do you have any links with more information about the feature?

I first found it in this thread:

And this was posted in there as well:https://developer.blender.org/D9887

And here it was mentioned it will be for blender 3.0:

1 Like

Thanks! These two notes on D9887 have me quite excited for this feature:

This add support for rendering of the point cloud object in Blender, as a native
geometry type in Cycles that is more memory and time efficient than instancing
sphere meshes
.

For CPU rendering the Embree primitive is used, for GPU there is our own
intersection code. Motion blur is suppored.

deffently. Personally I have multiple simulations backed with 100 million white water particles. but memory is indeed the biggest pain to getting them rendered. I hope it will reduce memory used per particle so it will scale with higher numbers. Motion blur is going to be really usefull to smooth out the white water. So I am certainly hyped for this feture. And with cycles-x on the horizon it might actually become reasonable for me to render some small animations :slight_smile:

1 Like

Hi Flip Fluid team, I’ve been trying your addon and I feel extremely satisfied :smiley:
And I have some question :smiley:

  1. How can I increase the influence of an obstacle to the fluid. Like this video you did, the torus moves slowly but it does a lot of splash
    FLIP Fluids in the real world [example / breakdown] - YouTube
  2. Is it possible to limit the simulation range in a small domain? I mean I don’t want the waves, the white water collide the edge of the domain
    Thanks a lot and have a good day!

Hi! For #1, setting an appropriate simulation scale and animating the obstacle to a realistic speed will help with realistic liquid motion. Documentation on world scale can be found here: https://github.com/rlguy/Blender-FLIP-Fluids/wiki/Domain-World-Settings#world-size

For example, an object rotating in a bathtub sized body of water will have small splashes. If the physics size is scaled up to the size of a lake, then there would be much larger splashes with the same obstacle animation.

For #2, a technique if adding outflows and inflows to the edge of the domain can be used. Placing outflows above the water level will remove liquid that splashes against the edge of the domain. Placing inflows under the water level will add more fluid if the water level ends up dropping. Depending on the situation, the inflows may not be necessary.

Here is a diagram to help show what I mean:

Hope this info helps!

3 Likes

Weekly Development Notes #57 – Adding Support For The Apple Silicon M1 Chip

Covering the week of May 3rd – 7th, 2021.

Welcome to our 57th development update for the FLIP Fluids liquid simulation addon for Blender! Recent work mainly involved adding support for the Apple M1 Chip, and we’re looking for feedback.

Apple M1 Compatibility

Recently I had learned that there is a new branch of Blender that adds native support for Apple Silicon M1 systems. You can find this version of Blender on https://builder.blender.org/download/ labelled as Blender 2.93.0 Beta MacOS Arm 64 bit:

In the latest FLIP Fluids experimental version 9.0.9.21, we have added support for the ARM 64-bit architecture so that the addon will be compatible with this version of Blender.

The latest stable version of our FLIP Fluids addon (v1.0.9b) is only compatible with Intel or AMD 64-bit processors and cannot run natively on the Apple Silicon processor which is based on the ARM architecture. Attempting to run this version of the addon with the Arm Blender build will result in this error when starting a simulation:

This error is generated because the simulation engine library is not compatible with this version of Blender. Our FLIP Fluids simulator is built for the x86_x64 architecture (64-bit Intel/AMD) and not for the ARM 64-bit architecture.

Feedback Wanted

In order to add support for Apple M1 systems, we needed to make a few changes to how we build and package the MacOS side of the addon. We are looking for feedback on whether this new version is working for you, on both Apple M1 systems and Apple Intel systems. More details below in the release notes.

Experimental Version 9.0.9.21

Want to try out the latest fixes and improvements? They can be tested in our Experimental Builds Package in the latest version!

Release Notes v9.0.9.21 (13-MAY-2021)

  • This version adds preliminary support for the Blender 2.93.0 Beta MacOS Arm 64 bit version of Blender!
    • The MacOS ARM build of Blender is for native support on the Apple Silicon M1 processor.
    • This version of Blender can be downloaded here: https://builder.blender.org/download/
    • The way that we build and package the MacOS side of the addon has changed and we are looking for feedback:
      • Please let us know if you encounter any error messages.
      • If you have access to a MacOS M1 system, feedback on whether you can run a simulation using this addon version and Blender version would be greatly appreciated.
      • If you do not have access to an M1 system, we would also appreciate feedback on whether the simulator still runs on your MacOS Intel system.
      • A ‘Yes, it runs‘ answer is just as valuable to us as a ‘No, it does not run‘ answer.
      • Feel free to let us know on the Blender Market, on our GitHub thread, social media pages, or through support at flipfluids.com.
  • Bug Fix: Fixed a FileNotFoundError when using the FLIP Fluids Helper > Generate Batch File if the render output location was set to a relative path.
2 Likes

Development Notes #58 – 2020 To 2021 Development Video

Covering the weeks of May 13th – 21st, 2021.

Welcome to our 58th development update for the FLIP Fluids liquid simulation addon for Blender! Recent work on the FLIP Fluids addon involved a few bug fixes and small feature improvements, and our 2020/2021 video covering the past year of development is now online! We have also started a new development project.

Development Video 2020 – 2021

May 1st, 2021 marked three years since our FLIP Fluids addon became available on the Blender Market. We couldn’t have created this simulator without you! Our yearly development video for 2020-2021 is now on our FLIP Fluids YouTube channel. Check it out to learn more about how to use some of the new features added over the last year of development:

New Development Project

We are now in the early stages of beginning a large new development project! It’s still too early to give exact details on the project other than that it is related to Blender, simulation, and benefits all users of the FLIP Fluids addon. It will take quite a bit of development time until we have some solid details for you, but we will keep you updated when we are ready.

In the early stages of this project, we will be splitting development time between this new project and regular development of the FLIP Fluids addon. Three days of the week will be devoted to this new project and the remaining two days will be spent of further maintenance and development of the FLIP Fluids addon.

As we are not ready to give solid details on the project yet, these development notes may become less frequent than our weekly schedule.

Experimental Version 9.0.9.22

Want to try out the latest fixes and improvements? They can be tested in our Experimental Builds Package in the latest version!

Release Notes v9.0.9.22 (25-MAY-2021)

  • version 9.0.9.22 (May 25 2021)
    • This version adds bug fixes and small feature.
    • Reverted a bug fix in 9.0.9.20 (Issue where surface and whitewater materials would be removed when changing between scenes) that ended up causing large problems in material set up for the simulation mesh objects. A better fix without side-effects will need to be implemented.
    • Added operator to FLIP Fluid Cache panel to set the cache location to a directory based on the name of the .blend file.
    • Added +/- operators to the FLIP Fluid Cache panel to increment/decrement a number at the end of a cache directory, similar to the icons when saving a .blend file.
    • Added support for all render output image file types when using the Helper > Generate Batch File operator.
    • Bug Fix: fixed issue where Helper > Generate Batch File operator did not support image file prefixes in the render output location.
    • Bug Fix: The cache directory can no longer be set to a location directly relative to the .blend file (ex: ‘//’).
    • Bug Fix: Fixed issue where liquid could be spawned with triangle line artifacts for cuboid shaped Fluid objects in high resolution simulations.
2 Likes

I suspect it will be something fire/smoke simulation related. Given how incredibly bad mantaflow is, there’s huge gap on the market, and covering it would be very wise :slight_smile:

than that it is related to Blender, simulation, and **benefits all users of the FLIP Fluids addon.**

if I had to make a blindshot, and a semi educated guess based on the fact he mentiones *benefits all users of the FLIP Fluids addon. I would say its a rigid body simulator. I do not think there has been a big push from inside the blender development to improve the Rigid body simulator.

I have also seen it mentioned that for buoyant objects and interaction between fluid sim and rigid bodies, you need to get data from rigid body simulation. Which is the big problem iirc for why say mantaflow still does not do this, as the 2 simulators can not talk to each other right now.

Hence the mention its also going to be usefull for people who use flip fluids addon. But ye lmfao this is a wild prediction on just some sentences

Possible guesses (maybe too high):

  • Rigid bodies support
  • Viscoelastic engine
  • Fluid mixing/fluid color attribute support
  • Granular engine
  • Waves as force field
  • None of that… :slight_smile: