Houdini Resources

Updated on March 26  2017


Tips and Tricks (list)

copyright  Deborah R. Fowler

Fluids - liquid

Deborah R. Fowler



Fluids - Liquid

Posted: 2013
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 phenomena".

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

Rob 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 notes.


Houdini specific

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.

TIP: OpenVDB can come in extremely handy with complex collision geometry (see tips and trips entry under Flips).

TIP: When 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 class).

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.

TIP: Use feedback scale for dropped objects. Adjust density of the object.

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 parameters: http://archive.sidefx.com/docs/houdini15.0/nodes/sop/particlefluidsurface

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).

hscript filename.hipnc
cd out
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 interesting shader 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 3 feet)

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.

H12 Documentation Entry on Simulating Liquids
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).

Flip Fluids

You should have knowledge of other methods as well, however as of Houdini 12 and higher, FLIP is recommended.

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:

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 H15 (new particle fluid surface replaces the vdb from particle network setup in H13)
Missing Image

Previously:


           
    From version H13 (vdb from particle fluid node replaces the previous 12.5 version of vdb from particles/vdb smooth nodes)