Fluids - Liquid
Updated: May 20 2016
What is a fluid? It is anything that takes the shape of its container (liquids and gasses). (quote here).
Fluid simulation - wiki
"increasingly popular tool in computer graphics for generating
realistic animations of water, smoke, explosions and related
An excellent introduction by Mike Seymour in
fxguide on The
Science of Fluid Sims is a must read.
(There is a follow up article that focuses on RealFlow rather than Naiad and an fxpodcast from an interview with Double Negative's Harry Biddle at DigiPro from July 2013.)
More in-depth reading
Bridson, co-founder of Exotic Matter (creators of Naiad)
from UBC, has some excellent
references on the underlying equations controlling fluids
for computer graphics. Many of the references are to Siggraph
2006 and 2007 courses as well as his co-authored book on Fluid
Simulation for Computer Graphics. I would suggest to start by
looking at the course
TIP: VOLUMES, VOLUMES, VOLUMES - collision objects can't have thin geometry - if they do, use a proxy - also, collision/emitter objects need volume, so a grid for example needs to be extruded.
OpenVDB can come in extremely handy with complex collision
geometry (see tips and trips
entry under Flips).
creating a volume such as a pool at the bottom of a waterfall,
you can use the sculpted particle fluid rather than waiting for
the fluid to fill to a level.
TIP: Cache out your sim when rendering
on the renderfarm. You can use the
cache node or a rop output driver (two places to cache shown in
TIP: On the flat tank - increase the
particle amount to get more spray in the
whitewater_sim/waterwater_emiiter node (thanks Chao). Also there
is a description in the documentation about the differences
between the various flip tanks here.
feedback scale for dropped objects. Adjust density of the
TIP: Don't use bgeo.gz, now since H14
use bgeo.sc - there is also compress - see new default
network shown below
15 TIP: If your fluid is "glitching"
take a look at the tips for the particle surfacing fluid node.
Turn reseed off, but you can also adjust the surfacing
On linux, if you have multiple rops
that would be useful to run at once, create fetch nodes in your
out context (reference your rop driver in your fetch), attach
them to a merge node and then command line rop out your cache
bgeo.gz (or bgeo) files using the command line as follows (note
this is also available on windows by running the Houdini Command
Line Tools to bring up a ms-dos shell with the correct path
settings. In ms-dos, dir is used instead of ls).
render -Va -I merge1
Example file: fetchExample.hipnc
Here is a list of command line options from the documentation.
Keep in mind you could even read the bgeo information from another hipnc - all you need is the file node to read it in.
TIP: There is an
available from odforce for the ocean nodes. Thank you Chad Fetzer for
this find! There is now a new
shader available in H13. Try both.
TIP: Don't use the default particle
separation (values around say .06 (good values depend on the scene
scale) will give you more detail)
TIP: Lumpy fluid? Are you in H12.5 or
H13? In H12.5 - try a different operation type on your
VDBSmoothSDF. Here is a
diagram on a simple fluid showing the differences in the
operations. But why use H12.5? Now in H13 it comes with a
VDBfromParticleFluid which creates less lumpy fluid.
TIP: Just as with RBDs scale
matters - 1 unit is 1 meter (roughly
There is also a really excellent tutorial on wetmaps
by Peter Quint. (A wetmap essentially is a shader applied to the
surface of the object to appear darker in color and increase the
specularity of where the fluid hits.) In his new tutorial,
he uses the new solver available in 12 and point clouds.
Make sure you write out the cache files before rendering. The
shader references these files. UPDATE 3/9/2014 -
there is a free otl download for this on orbolt - I have not used
it myself but it has been recommended by Tyler. See tips and tricks student entry.
The above document is a must read for 428. Note that it refers to Zhu and Bridson's Siggraph 2005 paper on "Animating Sand as a Fluid". There are some good tips on simulating fluids as well.
To simulate most liquids use FLIP. For fluids such as smoke and flame - use pyro.
Particle fluids (SPH and FLIP). Particle fluid simulations use particles to represent fluid. For visualization and rendering, the particles are surfaced (surface is created based on the particles).
- SPH (particle-only) -
not recommended since version 11, but good to be aware of
technique. (good for slow-moving fluids that react to
fast-moving constraints, such as a glass of water)
- FLIP (particle plus
grid) - very similar to SPH - solver copies the particles'
velocities onto a grid and calculates a new velocity field
that is copied back onto the particles.
Master Class with Jeff Lait - Building Fluid Solvers from Scratch
and one of the best tutorials on flips is Scott Keating's two part waterfall tutorial part1 and part2!
Note the new changes in H12.5 and above. The whitewater and mist shelf tools are intended to make the second half of part1 easier.
The flip setup for creating a fluid mesh does not use the particle surface node now. It converts the points to a volume using vdb nodes and transfers the velocity using a wrangle node (vex snippet).
H12.5 had additional features changing the look of the flip fluid network. OpenVDB nodes and point wrangle now appear in the particle fluid node. In H13 OpenVDB nodes are used with a new VDBFromParticleFluid and an attribtransfer in place of the point wrangle.
Interesting forum on making cloudy/murky liquid here. This entry includes a sample hip file as well.
Overview of a Houdini Flip Set
If you were to create a sphere and make it a FLIP Fluid, you would automatically get the following:
- AutoDopNetwork - inside are the usual
suspects including gravity and the
- flip object - particle fluid object
- particle separation - increasing lowers
the resolution but is faster, measured in meters - lowest
possible value is .02 really depends on your scene scale.
Default is set to .1
- particle radius scale - detail of the surface - higher values result in smoother surface
- substeps (usually not adjusted unless fast moving and colliding with other objects or slow moving viscous fluid)
- unexpected collision behavior?
- tip - enable Collision and Collision Velocity visualization under the guides tab
- thin objects may need proxy collision
geometry (see tips and tricks as well)
- flip solver - is a hybrid between a particle based and volume based fluid sim. Fluid data is stored in the particles however the pressure projection step is done on a volume that is created. A temporary velocity field is made. Particle velocities are transferred to a grid and the grid is used to perform the fluid projection.
- now include OpenVDB nodes, wrangle node (see image below)
- sphere_object1_fluidinterior - displays nothing, but imports the RENDER output from the fluid object. This object has a uniformvolume shader assigned to it (the other has basic liquid). A good example of its use is with the murky liquids mentioned above.
To see an excellent example of some tests done
with H12.5 flip tools alumni Steve Bevins has them here
on his website.
From version H13 (vdb from particle fluid node replaces the previous 12.5 version of vdb from particles/vdb smooth nodes)