Fluids - Pyro
Updated: Apr 16 2015
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.
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
Houdini specificH12 Documentation Entry on Simulating Liquids
To simulate most liquids use FLIP. For fluids such as smoke and flame - use pyro.
- Pyro shader documentation is a must
- tutorial on the pyro shader on vimeo titled Houdini 12.5 Pyro RENDER - jumps around a bit but useful
- Scott Keating's Volcano tutorial is also excellent here
- Peter Quint also has a video for Pyro
which is still applicable as well. In the pyro solver (part 1)
an overview is given. To begin he turns up the density scale
in the Pyro/Guides/Multi tab to 1.075 (default is .375). He
has an excellent discussion about the process and
parameters. This continues in pyro (part 2).
The presets are a good starting point. The tutorial starts with the Volcano preset.
NOTE: The sphere used here is 6 units large (in meters, so that's about 18 feet). Remember in simulations scale is important. (The defaults are in meters and kg - as seen in the Preferences/Hip File Options). He later makes it into an 11x4X11 size for the volcano.
TIP: Use the dark background so you can see pyro preview easier - hit d in the viewport, go to the Background tab and select dark.
A typical pyro network is seen below:
The source_density_from_sphere_object1 - this is where your source object is referenced. If you look in the documentation, this is described as "a microsolver that imports and directly applies SOP volume data". (It is possible, if you are an advanced user, to build an entire new solver out of mircosolvers and use that instead). The settings for volcano are initialized to Source Smoke with the volume path to the appropriate source object.
- Initialize - Source Smoke
- Volume Path - path to your object
The two diagrams below show your source object is changed to look like the figure below with the import pyro build (what you render)
In the volcano tutorial, he makes the volcano "thicker" by turning off minimum distance and empty interior to give more density to the source under the SDF From Geometry tab in the create_density_volume node. Noise was added as well. In particular, the Turbulence Settings Sharpness and Element Size were adjusted (similarly Cell Settings).
Back in the dop network, the pyro node and the pyrosolver node have a number of crucial parameters.
The smoke object (pyro) is where the Division Size is set as well as the size of the container (determining the voxel resolution). The lower the number, the more details - the longer the sim. The resolution is key to the look. (This number depends on the size of your simulation ie. values .04 to .07 can give good results, lower will be more detailed, however will increase sim time but may work just fine for smaller effects. If you can afford the sim times lower it, but be sure to check more than the first few frames.)
In the pyrosolver there are a number of tabs. Note that Timescale is animated to give the overall shape of the volcano quickly and then slowed down.
Overall the pyrosolver has the following tabs:
Simulation tab: Temperature is driving the upward force - here are the controls
- Timescale - deleted the animation that is
there by default- global scale for speed
- Temperature diffuse is the inside/outside
balance - blurs
- Cooling rate - (for volcano for example dropped from .75 to .1) so that it is not cooling off as fast
- Buoyancy lift/direction - ie. how fast
the smoke rises determines now much "lift" the simulation
has combined with the temperature (like a scale on the
temperature) - for the volcano this was reduced to 3 to slow
down the simulation - higher values, rises faster
Combustion tab: and subtabs are controlling
the combustion process with detail controls on subtabs
- Ignition temperature - whether it ignites
- Burn rate - percent of the fuel that
burns each second - acts like an overall control of how much
flame/smoke is produced (so at .9, some fuel is left over
- Fuel inefficiency - how much fuel is
- Temperature output - scale on how much temperature is produced
- Gas released - how much it will expand (divergence)
- Subtabs give finer control ie.
- Flames/Flame Height - higher values more flame, could also link them to the ramp that is controlling your temperature field (evaporation).
- Smoke - if you turn off Emit Smoke -
you will eliminate your density field (so don't).
- smoke amount
- heat cutoff - if heat is lower than that value, you'll create smoke - so the higher value, the more parts of the flame will produce smoke (so higher value, more smoke which will also make your flames look duller)
- Gas - flame/burn contribution
- Fuel - advect fuel - more explosive
Shape tab: add turbulence, noise to
influence the shape
- dissipation - how quickly smoke evaporates
Relationships and Advanced tabs exist as
Clearly, there are a large number of
controls - the key is to understanding what controls to
In the tutorial, another field is created by
creating a box the same size as the pyro container and adding
a volume sop. This is used to add vel (wind). A volume vop is
used to add noise/direction to represent wind to add to the
Peter Quint compares the combustion model
and how it relates to the Houdini controls.
Fuel creates Flames/Smoke/Temperature (Buoyancy)/Expansion to the pyro solver equivalents. In Houdini:
Fuels creates Heat/Density/Temperature/Divergence but Burn is also an intermediate value (not persistent - recalculates, disappears immediately when fuel runs out). See diagrams here.
Also see rendered comparisons and
explanations of parameters by Vladimir Abramov here.
An excellent more recent comparison has come
to my attention (thank you Christian) by Christopher Chamberlain