Overview
The Pyro tab on the shelf contains both preset effects, such as “Fireball” and “Billowy smoke” and building blocks such as “Pyro container”.
The pyro tools were designed based on a few concepts:
Integration with the rest of Houdini’s dynamics network.
Rather than being one monolithic do-everything DOP node, the pyro tools create a network of DOP nodes that work like the rest of Houdini’s dynamics, combining objects with solvers. This leverages the interface features Houdini already has for working with nodes and parameters, and lets you customize how the pyro simulation interacts with other simulated objects.
Base simulations with optional up-res.
Houdini lets you take the base simulation and adds detail on top of it at a higher resolution using a second up-res object. Because it is not calculating motion, just elaborating on existing motion from the base simulation, the up-res simulation is much faster than running the original simulation at the higher resolution. Adding the up-res gives very realistic-looking results much faster.
Adding a smoke/fire effect to an object
Select the object you want to use as a smoke/fire emitter.
In the Pyro tab of the shelf, click one of the pre-made effects.
Billowy smoke emits thick, cloud-like smoke from the source object.
Fireball emits a large explosion from the source object.
Flames emits continuous flames, essentially setting the source object on fire.
You can start with an effect similar to what you want and use the parameters on the nodes to alter it once you've created it.
The shelf tools adjust certain parameters on the dynamics nodes, such as the noise scaling, to match the size of the source geometry.
Note
If you want the emitter to be part of the simulation (for example, you want the emitter to be a simulated rigid body, and/or you want the emitter geometry to interact with the smoke/fire it’s emitting) you should make the object a rigid body before you add smoke/fire to it.
For example, select the object, then on the Rigid bodies tab click RBD Object or Static object to make the object simulated. Then use the steps below to add smoke/fire to the object.
If you try to make an object into a rigid body using the shelf tools after adding smoke/fire to it, Houdini will display an error that the object is already simulated. In that case, you would have to set up the RBD object manually in the DOP network instead of using the shelf.
See smoke and RBD interaction for more information.
Understanding the Pyro nodes
The shelf tools create a network of dynamics nodes, as well as Geo objects at the object level for rendering the simulation.
The dynamics network created by the smoke and fire tools is divided into two separate groups of nodes connected by a switch: nodes that create/control the base simulation and nodes that control the up-res simulation.
The network created by the shelf tools may not be layed out clearly. Press L in the network editor to fix the node layout automatically.
The pyro object node (
pyro) represents the box containing the smoke/fire. This node has parameters for the resolution of the base sim (the Divisions parameter) and for controlling visualization.The pyro solver node (
pyrosolver) runs the simulation on the pyro object. This node contains the controls for how the base simulation behaves (see working with the base simulation below).The optional fuel node (
optional_fuel) lets you optionally emit fuel from a second object instead of the smoke/fire source object. See using an optional fuel object below.The up-res pyro object (
uprespyro) and up-res pyro solver (uprespyrosolver) optionally take the base simulation and add extra turbulence/detail on top, giving a higher-resolution look very quickly. See adding up-res detail below.The Switch node (
switch_simulationmode) node lets you switch between outputting the base (Low res) simulation, the increased resolution simulation, or both. The switch is created set to Low res, so only the base simulation part of the pyro network runs.
Tip
By default the shelf tools create nodes inside a DOP network called AutoDopNetwork at the object level. If you already have a DOP network and you want the shelf tools to create nodes there instead, right-click (or press and hold on) the
“brain” icon in the bottom right corner of the status line, then open the Current simulation sub-menu and choose the network.
Working with the base simulation
Use an object with volume (for example, a sphere) as a source.
The general workflow is to work with the base simulation at a relatively low resolutions, starting at about 40 divisions and working up to around 70-80 (for general use) or higher (in film production). Then add the up-res simulation at a resolution starting at 150, and tweak it.
Add at least one directional light (for example, a spotlight) pointed at the pyro object so you can visualize the shape of the smoke at the object level. You may want to
Pin the Scene view at the object level so you can see the lighting even while working in the DOP network in the network editor.
Shadow maps on the lights need to be fairly high-resolution once you begin moving beyond test renders. 1024×1024 is probably sufficient.
The controls on the Guides tab of the pyro object (smoke object node) let you visualize the simulation. The Visualize sub-tab has controls for turning different visualizations on/off. The other tabs have controls for the individual visualization types.
The Sources tab on the pyro solver controls the interaction of the source object with the simulation.
The Emitters sub-tab controls what the source object emits into the simulation.
The Apply temperature and Scale temperature controls on the pyro solver control whether the solver adds temperature to the simulation and how much. You can also increase the starting temperature of the source object (using the Temperature parameter on the Physical tab) to get faster-rising smoke.
The Noise sub-tab lets you add noise to the emission of smoke and/or fuel, so it is not emitted from everywhere on the source object equally at all times. This is a nice method of adding motion to the smoke/fire at the source.
The ramp at the bottom lets you control where the noise appears, where the horizontal axis is density, so you can control emission in low density areas vs. high density areas. You can use this ramp to, for example, emit from a shell of the source geometry by setting the ramp high at non-zero low densities (the edges of the geometry) and low elsewhere.
The Simulation tab on the pyro solver controls how the simulation behaves.
Buoyancy lift controls the rate at which smoke rises. If you want more continuous upward movement, decrease the Cooling rate.
The Fuel tab controls the behavior of fuel in the simulation.
The Combustion tab controls whether high-temperature areas of the simulation burn into fire. Turn on Allow combustion to have fire. To have fire without smoke, turn off Emit smoke from fire. The Inefficiency parameter lets you make flames last longer by having the fire consume less fuel than is realistic.
The Diffusion tab controls how fast the temperature, fuel, and density in the simulation spread out.
The Turbulence tab adds noise to the motion of the smoke. This is where you’ll spend a lot of time tweaking the look of the base smoke.
The controls on the Noise sub-tab control the noise. The Frequency parameter controls the size of the details added.
The Mappings sub-tab lets you apply different amounts of turbulence amplitude and roughness to areas with higher or lower “force scale source”, where “force scale source” is defined by the value of the Force scale source parameter on the Forces tab. For example, if Force scale source is “Density”, the ramps in the Mappings sub-tab let you apply more or less turbulence to areas of higher or lower density.
The Forces tab lets you scale and map the effects of forces (such as gravity, wind, drag, etc.) based on Density, Density and Burn, or Temperature.
To animate smoke/fire emission on and off, keyframe the Smoke amount and/or Fuel amount parameters on the pyro solver.
To set the initial temperature of the source object, find the source object DOP, click the Physical tab and set the Temperature.
Adding up-res detail
When you're happy with the base simulation and want to start adding up-res detail. When the up-res part of the network is active (that is, when Simulate is set to “Both” or “Up res”), at each time step the uprespyro node fetches the velocity field from the base simulation, and the uprespyrosolver node adds additional small (high resolution) motion/detail on top of those fields.
Select the
switch_simulationmodenode and change the Simulate parameter from “Low res” to “Both”.Select the base pyro object (
pyro) and turn off visualization of the density in the Guides tab.Select the up-res pyro object (
uprespyro) and make sure visualization of its density is turn on in the Guides tab. This should be on be default.Still on the up-res pyro object, set the resolution of the up-res box using the Uniform divisions parameter.
On the
uprespyrosolvernode, you may need to set Peak turbulence to the maximum turbulence value you have in the base simulation. The default value of15is usually right, but if you know you have higher values you should increase it. The solver clamps values greater than this parameter when it converts the field to0-1range for solving.A good starting resolution for the up-res box is around 150. Adding up-res detail is fast because it doesn’t have to apply any forces or recalculate turbulence/velocity.
On the up-res pyro solver node, the parameters on the Turbulence scale tab control where to add noise to the base simulation.
The “Curl” setting of the Source popup menu is best for smoke and fire. The “Wavelet” setting adds a lot of noise and might be useful if you want lots of turbulence for a certain effect. The “Constant” setting just adds noise constantly through the entire volume.
For smooth smoke, turn on Scale by density. This prevents detail from being added outside the boundaries of the base simulation, keeping the smoke smooth. For fire, you should turn off Scale by density since you want spikes outside the original boundaries.
The Remap turbulence scale ramp lets you add more or less turbulence based on the current turbulence. So you can amp up or dampen areas of the base sim that have high or low turbulence.
You can use the visualization controls on the
uprespyroobject to see where the up-res solver will add noiseTurn off visualization of the base pyro object.
On the
uprespyroobject’s Guides / Visualization tab, turn on Turbulence and turn off other visualizations.Just for this kind of visualization, before you begin tweaking the parameters to affect the look, you may want to turn the
uprespyroobject’s Uniform divisions down below100to get better interactive feedback.You can see areas of maximum turbulence as red in the visualization.
If/as you use the controls on Turbulence scale tab of the up-res pyro solver node, you can see turbulence being added or subtracted in the visualization.
The parameters on the Noise tab control how to add detail to the base simulation.
The Amplitude parameter is a kind of master control for how much noise to add to the base sim.
On the Frequency sub-tab, when Compute frequency cutoff is on, Houdini will calculate the proper settings based on the frequencies of the base sim, and you can use Frequency scale to increase or decrease the frequency. Larger frequency scales add smaller details. However, you can turn Compute frequency cutoff off and use Absolute frequency if you want to use abnormally high frequencies to achieve some effect.
The Settings sub-tab contains the usual Houdini noise parameters, such as Noise type, Turbulence, and Roughness.
Saving the simulation to disk
Once you have the simulation looking like you want it to with the base sim and up-res sim on at the same time, you can “bake” the base simulation’s motion out to disk (so Houdini doesn’t have to recalculate it) at a higher resolution, and then increase the resolution of the up-res sim to add more detail if necessary.
Go to the Scene (
/obj) level in the network editor.The pyro shelf tools create two Geometry container nodes at the Scene level for rendering the pyro effect (only objects are renderable in Houdini, so dynamics simulations must be imported into an object so you can render them).
Double-click the
lowrespyroobject to go inside.The object contains two surface nodes: a DOP Import node named
visualizationand a DOP I/O node namedpyrofields.
Select the
pyrofieldsnode. In the parameter editor, click the Export to file tab.Set the Geometry file parameter to the location to save the simulation cache files to. The default (
$HIP/${OS}_$F.bgeo.gz) saves compressed binary files for each frame into the same directory as the.hipfile you are working on. Since this can result in hundreds of new files in that directory, you might want to set up a new directory just for simulation files (e.g.$HIP/sims/${OS}_$F.bgeo.gz).$HIPis the directory containing the current.hipfile.$OS(or${OS}) is the name of the current node.$Fis the frame number. See expressions in filenames for more information on using expression variables in filenames.Set up the frame range and other settings for saving out the simulation, then click Render.
(In this case, “rendering” means to save out the simulation geometry at each frame. It does not render 2D images.)
Once the simulation files are written out, turn on Load from disk at the top of the parameters.
Go back to the DOP network. Select the
switch_simulationmodenode and set Simulate to “Up res”. The simulation will switch to load the base sim from the disk files written out by thepyrofieldsnode.
Tip
If you need to make a change to the base simulation, remember to turn off Load from disk in the pyrofields node first. Then, after you make the change in the DOPs, go back to pyrofields, re-render the simulation geometry files, and then turn Load from disk back on.
Finally, when you have the up-res look right, you can also bake the up-res simulation (by repeating the above steps inside the uprespyro object). Then turn off simulation so Houdini and mantra can play the sim back completely from disk without taxing the CPU.
Rendering the simulation
The pyro shelf tools create two Geometry container nodes at the Scene level for rendering the pyro effect (only objects are renderable in Houdini, so dynamics simulations must be imported into an object so you can render them).
The display geometry for these nodes is imported from the pyro simulation. The render geometry is switchable between also being imported or being read from saved simulation files (see saving the simulation to disk above).
Use the blue
visibility flags on the geometry container nodes to control the visibility and rendering of the base and up-res simulation at the scene level.
The shelf tools automatically add a material to the geometry container nodes. To jump from the parameters of the object to the material, select the object, click the Material tab, then click the
Jump button next to the Material parameter.
Using an optional fuel object
By default, the source object for smoke/temperature is also used to emit fuel. You can optionally use a second object as a fuel emitter, for example to have an animated source spewing fuel into the pyro box which the temperature emitted from the primary source will eventually ignite.
In the DOP network, create an RBD Object or Static object (depending on whether you want the fuel object’s motion to be simulated). Set the node’s OBJ path to point to the geometry you want to use for the fuel object.
Connect the new object’s output to the merge node below the pyro network.
Append a Source relationship DOP node after the merge. Set the Affected objects to
optional_fueland Affector objects to the name of the fuel object node you just created.Select the base pyro solver (
pyrosolver). Click the Fuel tab and turn on Use fuel object. Use the controls below the checkbox to control how fuel is emitted from the fuel object.
Interacting with RBD objects
To make sure the pyro effects collide with any other DOP objects, you have to make sure the smoke and fire have the right collision fields.
Make the geometry you want smoke and fire to collide with an RBD object or Static object.
Make sure the RBD object is a collision object in the DOP simulation. Verify this by visualizing the collision guide geometry on the RBD object.
Increase the divisions to get better interaction with the smoke. The RBD object may have an adequate collision representation for RBD/RBD collisions but not for the smoke to interact with. The pyro solver translates the RBD object into a volume collision object when it solves, adjusting the velocity at the points of interaction (so the smoke starts moving around and interacting with it).
The pyro object has controls for visualizing collision (Guides tab, Visualization and Collision sub-tabs).
By enabling this you should see the object as rebuilt by the solver in the viewport. This is the actual volume collision geometry the solver will use to update the velocity field and is directly related to the resolution of your actual simulation.
If your collsion geometry is smaller then the size of a voxel it will not work properly. If you're trying to collide smoke with a detailed mesh, your should set your base sim resolution fairly high to get good results. You might try to collide the smoke with proxy geometry instead.
The pyro solver only recognizes animation automatically at the object level. If you are using animation at the geometry (SOP) level, you will need to tell the pyro solver to use point velocities to calculate collision geometry. In the pyro solver’s parameters, click the Advanced tab, Collisions sub-tab, and turn on Use point velocity for collisions.
Tips
Use low levels of turbulence for smoke effects, high turbulence for explosions.
When doing up-res for effects with both smoke and fire, on the
uprespyrosolvernode, go to the Noise tab and turn on Separate temperature amplitude. This lets you add more detail to the smoke than to the flames.If you want smoke to leave the pyro box, you should add sink geometry at the “open” edges of the box instead of turning off Closed boundaries on the pyro object.
To set up a fireball, on the
pyrosolvernode, in the Sources / Emitters tab, animate the Fuel amount to be high for the first few frames, then go to 0.You should try to use temperature to give lift, rather than increasing Buoyancy lift (on the Simulation tab of the
pyrosolvernode).When simulating fire, use parameters on the
pyrosolvernode in the Simulation / Combustion tab, especially Burn rate, Inefficiency, and Gas released, to influence the duration, size, and behavior of the fire. Use Heat source for faster moving flames.If you are rendering larger scale simulations, increase the Volume Step Size parameter on the Sampling tab of the mantra output driver.
To accelerate mantra’s rendering of fire, copy the heat field but renamed it “density”. This gives a correct mask for mantra to use for acceleration.
When trying to create a radical force for a cylinder, make sure it does not reach the top and bottom of the box so that the fluid can come in from the ends to push out the center, like a pair of toroidal currents.
You could also try using a compressible fluid to allow the fluid to expand in the center. You can do this by setting the divergence field to the amount of compression/expansion you want to occur in each voxel.