Single Blog

  • Home
  • Weekly Development Notes #8 – Using savestates in your workflow and Blender 2.82 Mantaflow release
FLIP Fluids Development Notes #8

Weekly Development Notes #8 – Using savestates in your workflow and Blender 2.82 Mantaflow release

Ryan Guy 18. February 2020 0 Comments

Covering the week of February 10th – 14th, 2020.

Hello everyone, this is Ryan with this week’s development update for the FLIP Fluids addon for Blender! We had a lovely long weekend here in B.C., Canada so I’m creating this weekly update on Tuesday rather than Monday.

In this post, I’ll detail how some of the FLIP Fluids addon workflow features used in our Valentine’s Day animation, as well as cover some common misconceptions on the topic of the new Blender 2.82 release of Mantaflow.

Valentines Animation

[gfycat data_id="unsteadyqueasyeelelephant"] 

This was a quick little doodle to end the week for Valentine’s Day on February 14th! We had some questions on how this animation was created, mainly on how the bulging effects were achieved. I used a few of our FLIP Fluids workflow features to help setup and run this simulation and I’ll add some details on the process of creating this simulation.

Zero Gravity

To prevent the fluid from falling towards the ground, the simulation was run in zero gravity. The gravity vector can be set in the FLIP Fluid World panel under the Gravity subsection. The gravity value can be set to use the Blender scene gravity, or your own custom gravity value. For zero-g, simply set a value of (0, 0, 0).

High Surface Tension

To get the fluid blobs to contract into a cohesive sphere as they change shape was achieved by enabling the Surface Tension Solver in the FLIP Fluid World panel. A relatively high value of surface tension was used to make the animation feel as if these were smallish water blobs floating in space.

Tip: How do I determine what surface tension value to use? For this type of simulation scenario, increasing surface tension has the effect of increasing the speed at which the fluid contracts. You will want to experiment with different values to get the right speed an feel in your scene. I suggest starting with a simple blob with some varied curvature, such as a long oval/ellipsoid. Simulate at a low resolution to quickly get an idea for how quickly the fluid will react under different surface tension values. Use Blender’s OpenGL renderer to quickly generate a video of your simulation to see an accurate result of your animation speed.

Tip: You often do not need a very high domain resolution for these types of zero gravity surface tension effects. The fluid motion in this scenario is not very complex, the fluid geometry is quite rounded and predictable, and you can often achieve a satisfactory result in a quick amount of time at low resolution. This animation was set up at 65 resolution for testing and produced quite a nice result in about 8 minutes of simulation time. For the final simulation, the resolution was doubled up to 130 and took 1h45m to simulate. Bumping up the resolution added a bit more detail and produced a better mesh, but there was not a very large increase in quality.

Bulging Effects

How did we get the fluid to bulge like that? It’s actually quite simple! Inflow objects were placed within the interior of the fluid and set up to emit small pulses of fluid towards the outside of the fluid blobs. Here is an OpenGL render to help show what is going on inside of the fluid:

[gfycat data_id="hollowwavyamoeba"] 

Here are some notes on the inflow features used:

  • By default, inflow objects do not have any effect on the simulation when completely submerged/surrounded by fluid. To get the inflow to push around jets of fluid within the blobs, the Inflow Constrain Fluid Velocity option was enabled. After enabling this option, the inflow objects will push around fluid at the specified velocity speed.
  • To get the inflows to push fluid in a certain direction, target objects were set in the Inflow settings. When a target object is set, inflows will emit or push fluid in the direction towards the target at the specified speed. The target option is a feature that makes it easier to set the velocity direction compared to specifying the (x, y, z) vector manually. Using an Empty Blender object is a good choice of object to use for inflow targets due to the simple geometry.
  • The inflows only emitted fluid in small bursts of about five frames in duration. Inflow objects can be started and stopped by keyframing the inflow Enabled option. When this option is disabled, the inflow will not emit or push around fluid.

    Tip: Nearly all options and settings in the FLIP Fluids addon can be keyframed. If you right click on the setting and there is an Insert Keyframe menu item available, keyframing this option is supported within the simulator.

Workflow Tip: using savestates to re-simulate from an earlier frame

Our FLIP Fluids addon ‘Savestates‘ feature was essential to the workflow when creating this simulation. Our simulator creates savestates (also known as checkpoints) to your simulation cache. This allows you to resume simulation from an earlier frame with updated settings, not just from the last frame or the beginning. By default, the simulator saves a state every 50 frames. This value can be set in the Savestates settings in the FLIP Fluid Simulation panel (Documentation here).

Note: The Update Settings on Resume option will need to be enabled. This ensures that your simulation setup is updated with new values and objects when resuming the simulation (Documentation here).

But how did I use this feature in my workflow? I used this feature because I did not know where to place inflow objects in advance. To create the bulging effects, inflow objects needed to be located within the interior of the moving fluid, but the only way to know where the fluid would be is to run the simulation. That’s where having the ability to go back in time, update the simulation setup, and re-run the simulation from an earlier point came in handy! Here was my general workflow for this simulation:

  1. Simulate about 100 frames
  2. Playback the simulation and scrub through the timeline to determine where I want to place an inflow, or multiple inflows.
  3. Keyframe the Inflow Enabled on and off for a duration of about 5 frames.
  4. Using a previous savestate, re-simulate from a frame just before I added or moved new inflow objects.

This process was repeated until I was satisfied with the full simulation result.

The savestates feature can really help speed up your workflow when you want to see how the effects of changing settings will affect the result in the middle of the simulation. By using this workflow feature effectively and in appropriate situations, you can save a lot of time by avoid having to re-simulate from the beginning of the simulation. This feature is also helpful for correcting errors in the middle of a simulation, such as if you forgot to enable an object as an obstacle for example.

Example .blend file

Need help getting starting with this type of simulation? Here is a simple .blend file setup using FLIP Fluids v1.0.7 and Blender 2.8. The setup has been simplified so that you can run the .blend file in our free FLIP Fluids Demo addon!

zerog_surface_tension_example.blend (953 kB)

This simple example will use an inflow to push a blob from one end of the domain to the other using the techniques described above. Simulation time: less than two minutes!

[gfycat data_id="slightsecretamericanbittern"] 

Blender 2.82 release and Mantaflow!

Last week, Blender 2.82 officially released on I am most excited about the new FLIP solver added to Blender called Mantaflow! This is a huge upgrade to the previous built-in fluid solver, Elbeem.

Lately we have seen quite a few misconceptions on what Mantaflow and the FLIP Fluids addon have in common and their differences. I’ll try my best to clarify some of the common misconceptions seen over the past weeks.

  • What does FLIP mean? FLIP is the name of a simulation technique that is popular in computer graphics simulation systems and stands for FLuid Implicit Particle. The FLIP simulation method can be found in other simulation systems such as Houdini FLIP, Phoenix FD, Maya Bifrost, Mantaflow, and others.
  • Why is our addon called FLIP Fluids? Simply put, we provide a simulation system that implements the FLIP simulation method to simulate fluids. The project was originally named Blender FLIP Fluids, but of course we had to drop the Blender trademark from the name when releasing the product. The name was shortened to FLIP Fluids (not very creative, eh?). A unfortunate side-effect of this simple name is that it has led to confusion when discussing topics such as the Mantaflow FLIP solver.
  • Mantaflow and the FLIP Fluids addon are the same thing (false). Mantaflow and the FLIP Fluids addon are separate development projects managed by separate teams. They are similar in the way that both simulation solutions use the FLIP simulation method, but are very different in the way of which features and workflows were implemented in the software. We choose to focus our development on features and workflows that improve on the usability and stability of the built-in Blender simulation tools, including the new Mantaflow tool. We also choose to narrow our focus strictly on liquid simulation effects while Mantaflow covers both liquid, smoke, and fire simulation.
  • Blender bought the FLIP Fluids addon to include in Blender (false). This is not true and this common misconception may be attributed to our simple name and the fact that Mantaflow is also a FLIP solver. Our development is fully funded through sales on the Blender Market. Mantaflow’s integration into Blender is funded by the Blender Foundation. A comment on the difference between how the projects are developed and funded can be found here here.
  • FLIP Fluids will no longer be developed now that Mantaflow is released (false). We’re fully committed to continue development of the FLIP Fluids addon for at least the rest of 2020 and very likely further. We receive so much support for this project from the Blender community and our users love what we are doing. It’s our pleasure to be able to continue development!

What are the Benefits of the FLIP Fluids addon?

Last week, we were asked what the benefits of our FLIP Fluids addon compared to Blender’s new built-in FLIP solver, Mantaflow:

@FlipFluids What are the benefits to your FLIPFluids addon, compared to Blender’s new built in Flip Fluids solver? Are they the same? is one faster? can one handle more complex simulations? Curious what you have tested.

From @MasonBlender on Twitter

Our response can be found on this Twitter thread here.

Hi Mason, I have been testing Mantaflow during the alpha/beta. We have received some feedback from our users testing Mantaflow and have seen a lot of comments on this topic from Twitter/Reddit/Instagram/Forums. I’ll try my best to detail some of our benefits and strengths.

Since release, funding through market sales has allowed us continue development full time for the last 20 months. It’s these thousands of hours of continued development that has furthered the usability, optimization, stability, and expanded features.

Usability: A large focus of our development is in usability and workflow features. Providing tools to help artists create simulation effects quickly and painlessly. Recently we have re-designed our product page to better highlight our usability features:

Stability: Our fluid engine rarely ever crashes during simulation. Our beta testers really stressed our engine, putting it into situations we had never expected. Stability has been mentioned frequently as something that helps our users to run complex and long running simulations.

Customer Support: Another large focus for us is providing responsive support Monday – Friday. We have maintained a 5 star rating on the Blender Market and many reviews mention our helpful support. Communication with our users is very important for us to help improve our addon.

Documentation: Upon release, our documentation was a bit sparse. Over time, through support and feedback, we were able to better understand our users’ needs. Adding and improving on many topics, filling out our settings/UI docs with helpful notes and tips on common issues.

FLIP Fluids and Mantaflow are both simulation tools that use the FLIP sim method. There will be strengths/weaknesses for both software solutions. Mantaflow is a huge improvement for Blender’s fluidsim tools and is attracting many new users to Blender for simulation effects.

Mantaflow has only just been officially released in Blender. There is room for improvement in usability and stability at the moment, but it’s great to know that the Blender Foundation is funding further development of the integration to improve and expand on the simulator.

Response from @FLIPFluids on Twitter

More Development Notes

  • Last week we added some final touches to our homepage and launched! That’s where you’re reading this blog right now!
  • Bug Fix: we had a report last week that moving obstacles were not pushing around fluid if there were a combination of regular obstacles and inverse obstacles in the scene. The fix was very simple within the engine and the cause of the bug was just a simple logic error. This is a serious bug and unfortunately there is no workaround to get around this issue at the moment. Due to the severity, this bug may prompt us to release a new version of the addon soon (v1.0.8) that contains this fix. In the upcoming week, I’ll focus on getting the addon ready for a new release, including a few other minor bug fixes and small quality-of-life features.