Houdini 18.0 Pyro

Sparse vs dense simulations

On this page

Simulation area

At any given point during the simulation, the pyro fields are defined inside of the current container. The pyro container starts out very small, and the solver constantly expands/shrinks it as the simulation proceeds. To perform its internal resizing, the solver tracks the specified Reference Fields, which can be set on the Advanced ▸ Resizing tab. With the default settings of density flame, for instance, the solver will ensure that the simulated region contains all space that has some smoke or flame. See the Understanding Resizing section below for a concrete example of how resizing is performed.


You can see the extent of the simulation container by turning on the Bounding Box on one of the enabled visualization options for the smoke object. These controls are located on the node’s Guides tab.

The Pyro solver can operate in either sparse or dense mode.

  • In dense mode, the entire container is simulated. This is useful if your gas occupies the whole simulation container or if the velocity values are needed beyond the areas where visible smoke exists.

  • In sparse mode, simulation is only performed in the active subset of the container. This mode is generally much more efficient, since it only performs expensive computations in the areas of interest. However, there are some limitations. See the Sparse Solving section for more information.


Prior to Houdini 18, pyro simulations could only be performed in dense mode.

Sparse solving

The pyro solver will operate in sparse mode if both the solver and the object have Enable Sparse Solving turned on. These parameters can be found on the Properties tab of the object and the Advanced ▸ Sparsity tab of the solver. Since these two parameters are enabled by default, simulations will be done sparsely, unless explicitly put into dense mode.

The only other condition is that all resizing of simulation fields must be performed in full tiles (this concept will be explained below). As of Houdini 18, external resizing should only be done while sourcing, by the Volume Source DOP. Therefore, if Enlarge Fields to Contain Sources is enabled on this node, Enlarge by Full Tiles must be as well.


2D simulations and OpenCL are not supported in sparse mode.

Errors will be generated if any incompatible sparse mode settings are detected on the object and the solver. However, the solver is oblivious of external resizing, so you must ensure that it’s done in full tiles.

The object’s active mask field stores the simulation region in sparse mode. This field is equal to 1 in regions that are simulated by the solver and 0 in inactive areas. The active field is rebuilt at every timestep to account for the motion of the fluid and new sourcing. See Understanding Resizing below for more information about how this is actually done.


  • The Gas Build Occupancy Mask operator takes care of constructing the active field.

  • You can enable Active Region visualization on the smoke object’s Guides tab to see the simulated areas.

  • Inactive areas in sparse mode are treated as vacuum that smoke is free to move into. Therefore, if there are two puffs of smoke blowing toward each other, they will be completely invisible to one another until they come close enough for their active regions to merge.

Full tiles

For efficiency, active regions come in full tiles. A full tile is a 16x16x16 chunk of voxels, and boundaries of full tiles must remain fixed. Therefore, it is very important that resizing performed outside the solver is done in full tiles.

Stenciled operations

When working in sparse mode, the pyro solver ensures that all its internal steps are done sparsely. However, other microsolvers in the network (such as an additional Gas Disturb), need to use the active field as a stencil to avoid doing unnecessary work. In particular, if a node has a Stencil Field parameter, it must be set to active. When a stencil field is provided, only voxels whose stencil value exceeds 0.5 will have the operation applied. In the context of a sparse pyro simulation, using the active field as a stencil means that the node’s work will only be carried out where needed.


Default value of the Stencil Field parameter is set to active to ensure that newly-attached microsolvers only work in the areas of interest.


The active field is up-to-date as of the solver’s Forces input. Stenciled microsolvers should be attached here.

Understanding resizing

Parameters on the Advanced ▸ Resizing tab of the pyro solver specify how the simulation domain is determined. Particularly, the goal is to track the non-zero areas of the Reference Fields and supply them with a large enough buffer (as indicated by Padding). In dense mode, this involves bounding the non-zero voxels of the Reference Fields and inflating the bounding box by Padding on all sides. In sparse mode, the active region is subsequently found within this bounding box; the intermediate active region is then expanded to accommodate Padding.

The steps of the resizing process are illustrated in the table below. The background grid in the following diagrams shows the tile boundaries.


This example is in 2D for simplicity. However, 2D simulations cannot be done in sparse mode.



Simulation start. The initial container is small and empty.

Sourcing. The Volume Source resizes the density field as part of sourcing, since Enlarge Fields to Contain Sources is enabled. The field’s new boundaries match with the tile grid as well, because Enlarge by Full Tiles is also turned on.

Bound fields. The bounding box of the non-zero voxels of the Reference Fields (which is set to density) is computed. This box is represented by the blue box in the image.

Add padding. The intermediate bounding box is expanded on all sides by Padding. If the solver is not in sparse mode, and Resize in Full Tiles is disabled, then the blue region forms the new container bounds, and the subsequent steps are not performed.

Snap to tile boundaries. The walls of the intermediate box are snapped to the tile boundaries, forming the new simulation container. If the solver is not in sparse mode, and Resize in Full Tiles is enabled, then the subsequent steps are not performed.

Find active tiles. The active tiles inside the new simulation container are identified. A tile is considered active if at least one of the Reference Fields is non-zero inside it. These active tiles are represented by shaded blue boxes in the image.

Expand for padding. The intermediate active region is expanded to accommodate Padding. The active field corresponds to the result of this step.


Sparse Pyro

Legacy Pyro