Smoke and fire simulation

Also known as: pyro simulation

On this page 7

Smoke and fire simulation, often called pyro simulation, is the numerical solution of gas flow, temperature and combustion on a three-dimensional grid so that a 3D scene can show believable flames, smoke plumes and explosions. Within the topic of Simulation & effects in 3D graphics & animation, it belongs to the family of grid-based fluid solvers, but it models a hot, buoyant gas rather than a liquid with a free surface.

The output of a pyro solve is not a mesh but a set of volumetric fields such as density, temperature and flame intensity. These fields are cached to disk and rendered with a volume shader that turns density into smoke absorption and temperature into emitted light.

How a pyro solver advances smoke and flame

A pyro solver advances the gas state frame by frame by solving a simplified form of the incompressible Navier-Stokes equations on a voxel grid. Each time step typically follows the same order: sources inject fuel, heat and density; advection moves every field along the velocity field; external forces such as buoyancy and wind are added; and a pressure projection removes divergence so the gas does not gain or lose volume artificially.

Combustion is handled by a reaction model rather than real chemistry. Wherever fuel is present and the temperature exceeds an ignition threshold, the solver burns a portion of the fuel per step, converts it into heat and flame, and optionally adds smoke and gas expansion. Expansion pushes the surrounding air outward, which is what gives a fireball its characteristic billowing growth.

The following table lists the fields a typical pyro solver stores and what each one controls in the final image.

FieldTypeWhat it drives
DensityScalarSmoke opacity and light absorption
TemperatureScalarBuoyancy and blackbody emission color
FuelScalarWhere combustion can occur
Flame or heatScalarBrightness of the burning zone
VelocityVectorMotion of every other field
DivergenceScalarLocal expansion from burning gas
Core fields of a pyro simulation

Resolution, substeps and the parameters that shape the look

The most important setting is voxel size, because it sets the smallest detail the solver can represent. Halving the voxel size multiplies the voxel count by eight and roughly multiplies simulation time by ten or more, since the time step must also shrink to keep the solve stable. Production shots therefore use sparse grids that allocate voxels only where density or temperature is active.

Stability depends on the Courant-Friedrichs-Lewy condition, usually shortened to the CFL number: gas should not travel more than a few voxels per step. Fast explosions need two to eight substeps per frame, while a slow candle plume often works with one. The table below summarizes the parameters artists adjust most often.

ParameterTypical rangeEffect when increased
Voxel size0.5 cm to 10 cm per voxelCoarser detail, much faster solve
Buoyancy lift0.5 to 5Faster rising, taller columns
Dissipation0 to 0.2 per secondSmoke fades sooner
Cooling rate0.5 to 0.95Shorter flames, earlier smoke
Vorticity confinement0.1 to 2More swirling small-scale detail
Substeps1 to 8 per frameBetter stability, longer solve
Key pyro parameters and their visual effect

Because coarse grids lose small eddies, solvers add detail through vorticity confinement, turbulence noise and disturbance fields. A common workflow is to solve a low-resolution base simulation for timing and shape, then run an upres pass that adds fine detail without changing the overall motion approved by the director.

Pyro simulation shares mathematics with liquid simulation but differs in what it tracks. Liquids need a surface, so methods such as FLIP fluid or smoothed-particle hydrodynamics follow particles that define a boundary. Gases have no surface, so pyro solvers work purely on Eulerian grids and render the result as a participating medium.

Effect typeMain representationRendered asTypical use
Smoke and fireVoxel grid fieldsVolumeFlames, explosions, chimney smoke
FLIP fluidParticles plus gridMesh surfaceWater, splashes, pouring
Particle effectsPoints with attributesSprites or instancesSparks, embers, debris
Destruction simulationRigid fragmentsGeometryCollapsing walls, shattering
How pyro differs from neighboring effects

In practice these effects are combined. An explosion usually starts from a destruction simulation, whose fragments act as colliders and emit fuel, while a separate particle system adds sparks that are advected by the pyro velocity field. Dedicated real-time tools such as EmberGen and solvers such as Mantaflow, Bifrost and tyFlow implement the same principles with different speed and quality trade-offs.

Setting up a production pyro shot

A reliable setup starts with the source, because the emitter shape and its fuel, temperature and velocity attributes determine most of the character. Noisy, animated sources produce organic flames, while uniform sources produce flat, synthetic-looking fire. Scale also matters: a solver set to real-world units reacts to gravity and buoyancy correctly, whereas a scene modeled at the wrong scale looks like a miniature.

The decision table below matches common shot types with a reasonable starting strategy.

Shot typeRecommended approachReason
Candle or torchSmall grid, fine voxels, one substepDetail matters more than volume
CampfireAnimated noisy source, moderate coolingFlickering needs varied fuel
Building fireSparse grid, wind force, upres passLarge domain with local detail
ExplosionHigh expansion, four or more substepsFast motion breaks the CFL limit
Background smokeCoarse solve or volume spritesCost must match screen size
Starting strategies by shot type

Finished frames are written to a simulation cache, usually as OpenVDB files, so lighting and rendering can proceed without re-solving. Shading maps temperature to a blackbody color ramp and density to absorption and scattering, and the balance between those two controls decides whether the result reads as clean flame or as thick, sooty smoke.

Common failures and how to correct them

Most pyro problems trace back to scale, resolution or source design rather than to the solver itself. The list below covers the issues that experienced effects artists check first.

  • Mushrooming tops: buoyancy is too uniform; add turbulence and vary the source temperature.
  • Visible voxel stepping: the voxel size is too coarse for the camera distance; refine it or add an upres pass.
  • Smoke clipped at the domain edge: enable an adaptive bounding box or enlarge the container.
  • Exploding or jittering velocities: the time step is too large; raise substeps or lower the CFL number.
  • Huge cache sizes: store only the fields the shader needs and use 16-bit floating point compression.

A frequent misconception is that higher resolution always looks better. Detail without good motion still reads as fake, so experienced artists lock timing and silhouette at low resolution before spending render farm hours on fine detail.

Stripped to the essentials

Smoke and fire simulation is a way for a computer to imitate how hot gas moves. The software splits the space around a fire into millions of tiny boxes and keeps track of how hot, how smoky and how fast the air is in each box.

Hot air rises, cools down and turns into smoke, and the computer repeats those rules many times per frame. The result is moving fire built from rules, not drawn by hand, which is why it can look convincing from any angle.

Where it is applied

A visual effects team on a feature film needs a car explosion in a parking garage. The artists first run a rigid body destruction of the car body, then use the flying fragments as fuel emitters for a pyro solve with voxels of about 4 cm, high gas expansion and four substeps per frame to keep the fast blast stable.

After the director approves the timing on that coarse version, the team runs an upres pass at 1.5 cm, adds spark particles driven by the same velocity field and writes everything to OpenVDB caches. Lighters then render the volumes with a blackbody ramp, and the final shot shows a fireball that rolls along the ceiling and lights the concrete walls in a way that matches the practical lighting on set.