fluid


CGI Сoffee

Nvidia Physx Flex and Other Fluid Solvers for High-Quality Fluid Simulation

FleX and Redshift Milkshake Dragon FiestaBeware the strawberry milkshake monster!

Simulations are hard.

When it comes to doing simulations on meshes with a finite number of vertices it's relatively easy to achieve desired results. But as soon as you try taming hundreds of thousands or even millions of particles, you're in trouble. Especially when it comes to doing fluid simulations. You need a special kind of solver, a powerful rig or a network of rigs and a lot of patience. It took me by surprise how difficult seemingly trivial simulations can be.

In the animated film I'm working on I will have bodies of water large and small and certain gaseous liquids in the background for increased production value.

If you're a freelancer or a hobbyist on a budget in need to simulate some fluids, off-the-shelf tools available on the market can be a good choice... But there are so many of them that finding out their differences as well as pros and cons is a quest in itself. In this post I'll explore some of the ways an amateur like me can do various fluid-like simulations and what technologies there are to help get the job done.

The big guns

I'll briefly cover two of perhaps the most well known and renowned fluid sims on the market - Naiad and Realflow.

NAiad logo

There was the time when you could only purchase a single Naiad license for 5500$ or rent it quarterly for about 1400$. Luckily those times are over since in 2012 Naiad was sold over to Autodesk and turned into Maya Bifrost. So now you can get your hands on Naiad tech within maya for just $185 a month. You can find out more about Bifrost in this blog post at Digitaltutors. It's a powerful FLIP solver (more on this method below) and well integrated into Maya too with GPU caching and an ability to playback tens of thousands or even millions of particles in real-time directly within the DCC as well as a variety of tools for artistic direction of your simulations.

Realflow logo

Then there's Realflow, which comes with several solvers for you to choose (SPH, PBF, HYBRIDO) and with its Dyverso particle solver (the one which uses PBF) gives you the ability to simulate on CPU or GPU, the latter using OpenCL for computations. You can read more about Realflow's solvers here. Overall, Realflow isn't terribly slow and well scalable when you give it lots of cores to work with, but as soon as you realize your hardware limitations and the fact that the cheapest single-seat license with the C4D integration costs over 750 bucks you start looking for other solutions.

Other freeware and commercial tools for fluid simulation

I won't spend too much time on different types of solvers available on the market, only mention some of them for the sake of argument. There's an excellent (albeit slightly dated) article on the subject at fxguide explaining them in detail if you're interested in finding out more.