ANR Tools

ANR 2D fire smoke sim

Fire and smoke from any roto or alpha, simulated in 2D and shaded as a lit, premultiplied element ready to merge over the plate.

Overview

The node turns the alpha of its Source into an emitter and simulates fire and smoke rising from it, frame by frame, on a 2D grid the size of your image or a percentage of it. Fuel burns where it is hot and makes flames and soot; the hot gas rises, swirls and breaks up into licks and billows. The result is shaded like a lit volume: blackbody flames, smoke with self-shadowing and rim light, and light from the fire on the smoke.

Use it for torches, burning objects, flames along an edge, smoke plumes, chimney smoke and steam: anything seen from the front, where a 2D simulation reads well. Roto or paint the burning area, connect it and play forward. A Collision alpha blocks the flow, for a wall or an object the smoke has to go around.

The tabs follow the order you work in. Emission sets what the emitter adds each frame, Turbulence and Shape set how the gas moves and breaks up, Shading sets the look and never re-simulates, and Sim holds the grid, the walls and the cache. The simulation lives in the node: playing forward costs one step per frame, scrubbing back restarts from the nearest memory snapshot, and an edit to the roto upstream is noticed and re-simulated by itself.

For a finished shot, build a disk cache: the node then plays the saved frames, opens instantly with the script and never re-simulates. Bullet Time holds the simulation on one frame, for frozen-moment shots.

Inputs

SourceCollision2D fire smoke simOutput
  1. Sourcerequired

    The emitter: a roto, a key or any image. Its alpha (or the channel chosen in emit from) says where fire and smoke are born, from 0 (nothing) to 1 (full emission). Animate it and the fire follows.

  2. Collisionoptional

    Optional solid shapes. Where its alpha is solid, the flow is blocked and goes around it, like a wall, a ceiling or an object in the way.

Output. Premultiplied fire and smoke over transparent black, ready to merge over the plate (or tick over source to see it over the Source image). output can also show fire or smoke alone, the raw simulation fields, velocity, the emitter, normals or a lighting pass; render layers adds the passes as extra channels.

Quick start

  1. Make the emitter: a Roto, a key or a painted alpha where the fire should start. Connect it to Source.
  2. Add ANR 2D fire smoke sim and view it. On the Sim tab check start frame: the simulation starts empty on that frame.
  3. Play forward from the start frame. The fire builds up frame by frame; going back re-simulates from the nearest snapshot.
  4. Set the amounts on Emission: fuel and temperature for flames, smoke for pure smoke. emit velocity y and velocity jitter shape the flame tongues.
  5. Shape the motion on Turbulence (buoyancy, wind, turbulence) and on Shape (shredding and disturbance for licks and cauliflower edges).
  6. Grade the look on Shading: fire intensity and colour temperature, smoke colour and lighting. These changes do not re-simulate.
  7. Merge the result over the plate.
  8. When the motion is right, set a cache folder in Sim > Cache (or click Generate Autofill), turn off proxy and press build / rebuild cache. read cache turns on and the shot plays from disk.

The panel

The node's panel as Nuke shows it, with the values of a new node. Click any control to see what it does; tabs and sections work as in Nuke.

ANR_2D_fire_smoke_sim1

Bullet Time, what the emitter adds each frame (fuel, heat, smoke, flicker, velocity) and the combustion settings.

Bullet TimeFreeze at1
reset cache
emit fromAlpha
emit gain1
smoke0.5
temperature0.8999999762
fuel0.6000000238
flicker1.299999952
flicker size28
flicker speed0.07999999821
emit velocity x0
emit velocity y3
velocity jitter5
velocity blend2
ignition temperature0.3000000119
burn rate1
heat release0.8000000119
soot0.5
flame yield2
expansion1.5
cooling0.07999999821
flame decay0.1000000015
fuel dissipation0.01999999955
smoke dissipation0.0120000001

All controls

Emission25 controls

Bullet Time, what the emitter adds each frame (fuel, heat, smoke, flicker, velocity) and the combustion settings.

Bullet TimeCheckboxbulletTime

Freezes the simulation at the Freeze at frame while the shading keeps the timeline. Holding a frame costs no simulation time. Ticking it freezes at the current frame. Animate it off to let the simulation go on. Works live and on Read cache.

Default: off

Freeze atSliderbulletFrame

The simulation frame Bullet Time holds. Before it the simulation plays normally; from it on it stays still. Animatable.

Default: 1

reset cacheButtonresetCache

Throw away the simulation cache and re-simulate from the start frame. Upstream edits are detected automatically; this is the manual override.

emit fromMenuemitChannel

Which Source channel drives the emitter (0 = nothing, 1 = full emission).

Default: AlphaOptions: Alpha Luminance Red Green Blue

emit gainSlideremitGain

Multiplier on the emitter mask before clamping to 0..1.

Default: 1

smokeSlideremitSmoke

Smoke density added per frame where the mask is 1. Fire makes its own smoke via soot; use this for pure smoke.

Default: 0.5

temperatureSlideremitTemperature

Temperature the emitter heats the gas to (~0.9 = fire, 0.3 = warm smoke).

Default: 0.8999999762

fuelSlideremitFuel

Fuel added per frame. Fuel burns while hot: flame height = burn time x rise speed.

Default: 0.6000000238

flickerSliderflicker

Noise modulation of the emission (0 = steady, 1 = fully broken up).

Default: 1.299999952

flicker sizeSliderflickerSize

Size of the flicker noise in pixels.

Default: 28

flicker speedSliderflickerSpeed

How fast the flicker noise evolves per frame.

Default: 0.07999999821

emit velocity xSlideremitVelocityX

Velocity the emitter pushes gas towards, px/frame (positive = right).

Default: 0

emit velocity ySlideremitVelocityY

Velocity the emitter pushes gas towards, px/frame (positive = up).

Default: 3

velocity jitterSlideremitVelocityJitter

Random velocity added at the emitter, px/frame. Breaks the flame into tongues.

Default: 5

velocity blendSlideremitVelocityBlend

How strongly the emitter imposes its velocity (0 = not at all).

Default: 2

Combustion

ignition temperatureSliderignitionTemperature

Fuel burns only above this temperature.

Default: 0.3000000119

burn rateSliderburnRate

Fraction of fuel burned per frame while hot. Lower = taller flames.

Default: 1

heat releaseSliderheatRelease

Temperature added per unit fuel burned.

Default: 0.8000000119

sootSlidersootYield

Smoke produced per unit fuel burned.

Default: 0.5

flame yieldSliderflameYield

Flame (the visible fire field) produced per unit fuel burned.

Default: 2

expansionSliderexpansion

Gas expansion while burning (pushes the flow outward).

Default: 1.5

coolingSlidercooling

Fraction of temperature lost per frame. Lower = taller, longer-lived fire.

Default: 0.07999999821

flame decaySliderflameDecay

Fraction of flame lost per frame.

Default: 0.1000000015

fuel dissipationSliderfuelDissipation

Fraction of unburnt fuel lost per frame.

Default: 0.01999999955

smoke dissipationSlidersmokeDissipation

Fraction of smoke lost per frame.

Default: 0.0120000001

Turbulence17 controls

Forces on the gas: buoyancy, gravity, wind, vorticity and substeps, plus buoyancy variation and the smoke and fire turbulence.

buoyancySliderbuoyancy

Upward acceleration per unit temperature, px/frame^2.

Default: 2.5

smoke weightSlidersmokeWeight

Downward acceleration per unit smoke density.

Default: 0.05000000075

gravitySlidergravity

Constant downward acceleration on everything, px/frame^2.

Default: 0

wind xSliderwindX

Constant drift applied to everything, px/frame (positive = right).

Default: 0

wind ySliderwindY

Constant drift applied to everything, px/frame (positive = up).

Default: 0

vorticitySlidervorticity

Vorticity confinement: sharpens and sustains swirls. Above ~1 it runs away.

Default: 0.02999999933

velocity dampingSlidervelocityDamping

Fraction of velocity lost per frame.

Default: 0.01999999955

substepsSlidersubsteps

Simulation steps per frame. 2 is a good default; raise for very fast motion.

Default: 2

Buoyancy variation

strengthSliderbuoyancyVariation

Noise modulation of the buoyancy (0 = uniform lift). Uneven lift splits the rising head into several lobes instead of one clean mushroom cap.

Default: 2

sizeSliderbuoyancyVariationSize

Size of the buoyancy noise in pixels.

Default: 42

speedSliderbuoyancyVariationSpeed

How fast the buoyancy noise evolves per frame.

Default: 0.02500000037

Smoke turbulence

strengthSliderturbulence

Large curl-noise force applied where there is smoke / heat.

Default: 1.799999952

sizeSliderturbulenceSize

Size of the large eddies in pixels.

Default: 32

speedSliderturbulenceSpeed

How fast the large turbulence evolves per frame.

Default: 0.1199999973

Fire turbulence

strengthSliderfireTurbulence

Small, fast curl-noise force applied inside the flame only.

Default: 2

sizeSliderfireTurbulenceSize

Size of the flame eddies in pixels.

Default: 16

speedSliderfireTurbulenceSpeed

How fast the flame turbulence evolves per frame.

Default: 1

Shape21 controls

How the flame front and the smoke edges break up: shredding, disturbance and diffusion.

Shredding

shreddingSlidershredding

Pushes / pulls the flow along the temperature gradient at the flame front: the licks and tears typical of fire.

Default: 2

thresholdSlidershreddingThreshold

Temperature the shredding acts around (the flame front).

Default: 0.3000000119

widthSlidershreddingWidth

Temperature band around the threshold that is shredded.

Default: 0.25

sizeSlidershreddingSize

Size of the push/pull pattern in pixels.

Default: 12

speedSlidershreddingSpeed

How fast the pattern changes per frame.

Default: 1

Fire disturbance

strengthSliderdisturbance

Random per-block accelerations inside the fire (control field above the threshold).

Default: 1.5

block sizeSliderdisturbanceBlockSize

Block size in pixels.

Default: 16

thresholdSliderdisturbanceThreshold

Acts where the control field is above this.

Default: 0.150000006

controlMenudisturbanceControl

Field the threshold is tested against.

Default: TemperatureOptions: Temperature Density

Smoke disturbance

strengthSlidersmokeDisturbance

Multi-scale random accelerations on the smoke: breaks the smooth swirl outlines into cauliflower.

Default: 2.5

block sizeSlidersmokeDisturbanceBlockSize

Largest block size in pixels; each octave halves it.

Default: 24

octavesSlidersmokeDisturbanceOctaves

Number of block sizes (each half the previous, half the strength).

Default: 3

thresholdSlidersmokeDisturbanceThreshold

Acts where density is above this.

Default: 0.02999999933

cutoffSlidersmokeDisturbanceCutoff

Fades out above this density, so only the thin edges are disturbed (0 = everywhere).

Default: 0

Smoke shredding

strengthSlidersmokeShredding

Pushes / pulls the flow along the density gradient at the smoke boundary with a noisy sign: grows fingers and cauliflower on the edges.

Default: 1

thresholdSlidersmokeShreddingThreshold

Density the smoke shredding acts around (the visible edge).

Default: 0.1199999973

widthSlidersmokeShreddingWidth

Density band around the threshold that is shredded.

Default: 0.1000000015

sizeSlidersmokeShreddingSize

Size of the push/pull pattern in pixels (the finger spacing).

Default: 13

speedSlidersmokeShreddingSpeed

How fast the pattern changes per frame.

Default: 1.5

Diffusion

temperature diffusionSlidertemperatureDiffusion

Blurs the temperature field a little each frame. Lower = sharper, higher-frequency shredding; higher = wider, calmer licks.

Default: 0.3000000119

flame diffusionSliderflameDiffusion

Blurs the flame field a little each frame.

Default: 0.200000003

Shading48 controls

The look, without re-simulating: output mode, fire colour and brightness, smoke, lighting, depth layers, motion blur and render layers.

outputMenuoutput

Beauty: fire + smoke, premultiplied. Fire only / Smoke only: the two halves of the beauty (beauty = fire + smoke), for separate grading. Raw fields: R density, G temperature, B flame, A fuel. Velocity: RG = motion in px/frame. Emitter: the mask the solver sees. Normals: smoke pseudo-normals (xyz) + alpha, for relighting. Lighting: R key transmittance, G occlusion, B fire light, A alpha.

Default: BeautyOptions: Beauty Fire only Smoke only Raw fields Velocity Emitter Normals Lighting

over sourceCheckboxoverSource

Composite the result over the Source image.

Default: off

Fire

intensitySliderfireIntensity

Brightness of the fire emission (values above 1 clip to white in the viewer).

Default: 2.599999905

kelvin minSliderfireKelvinMin

Colour temperature at temperature 0 (cool tips).

Default: 1000

kelvin maxSliderfireKelvinMax

Colour temperature at temperature 1 (hot core).

Default: 3000

temperature powerSliderfireTemperaturePower

Brightness ~ temperature^power. Higher = brighter core, dimmer tips.

Default: 1.5

contrastSliderfireContrast

0 = soft blob, 1 = hard-edged tongues.

Default: 0.08500000089

detailSliderfireDetail

Sub-grid detail noise on the flame.

Default: 0

color variationSliderfireColorVariation

Detail noise on the colour temperature.

Default: 0.3000000119

alphaSliderfireAlpha

How opaque bright fire is in the alpha channel.

Default: 0.5

Smoke

opacitySlidersmokeOpacity

Opacity per unit smoke density.

Default: 1.5

colorColoursmokeColor

Smoke albedo. Dark values = black soot (still lit by the fire). Only visible over a plate: Merge over it or tick 'over source'.

Default: 0.400000006 0.400000006 0.4199999869

volume depthSlidersmokeDepth

Reconstructs a shallow volume with internal shadows from the 2D smoke. 0 keeps the original look; 1 is a thick starting point. Uses opacity, ambient, key, shadow density, scattering and fire light; bypasses the surface form/rim and smoke layer controls.

Default: 1.799999952

depth sizeSlidersmokeDepthSize

Depth and internal billow size in pixels. Larger values fill out the smoke and broaden its shadowed folds.

Default: 40

internal detailSlidersmokeDepthDetail

Flowing density variation inside the reconstructed volume. 0 is smooth; higher values add shadowed pockets.

Default: 0.5

detailSlidersmokeDetail

Sub-grid detail noise on the smoke.

Default: 0

softnessSlidersmokeSoftness

Blur in pixels applied to the density before shading: the sub-grid mixing a 2D grid cannot resolve. Softens the fronts.

Default: 2

edge break-upSlidersmokeBreakup

Displaces the smoke lookup by noise that moves with the flow, in pixels: crisp sub-grid detail on the edges. Applied after the softness blur, so soft fronts still get broken edges.

Default: 0

break-up sizeSlidersmokeBreakupSize

Size of the break-up noise in pixels; two smaller octaves sit under it.

Default: 14

occludes fireSlidersmokeOccludesFire

Absorption of fire within the smoke. Higher values embed the flames more deeply; 0 leaves emission unattenuated.

Default: 0.400000006

Lighting

ambient colorColourambientColor

Colour of the sky / environment light (comes from above).

Default: 0.6999999881 0.75 0.8500000238

ambientSlidersmokeAmbient

Ambient light intensity.

Default: 0.4499999881

occlusionSliderambientOcclusion

Darkens thick regions (dense cores) so thin edges read brighter.

Default: 0.9499999881

occlusion radiusSliderocclusionRadius

Blur radius in pixels used as local thickness.

Default: 40

key colorColourkeyColor

Colour of the directional key light.

Default: 1 0.9499999881 0.8500000238

keySlidersmokeLight

Key light intensity (with self-shadowing).

Default: 1.399999976

key direction xSliderlightDirectionX

Direction the key light comes from (positive = right).

Default: -0.6499999762

key direction ySliderlightDirectionY

Direction the key light comes from (positive = up).

Default: 0.6999999881

key direction zSliderlightDirectionZ

How much the key light comes from the camera side (0 = grazing, 1 = frontal).

Default: 0.349999994

wrapSliderlightWrap

Wrap lighting: softens the light / shadow terminator (1 = fully wrapped, translucent look).

Default: 1

shadow densitySlidersmokeShadow

Extinction used for self-shadowing towards the key light.

Default: 2

shadow lengthSlidersmokeShadowLength

How far light is traced through the smoke, in pixels.

Default: 94

scatteringSliderscattering

Multiple-scattering approximation: lets light bleed deeper into the volume (0 = single scattering, hard shadows).

Default: 0.4650000036

formSlidernormalStrength

How strongly the smoke is shaded as rounded puffs (pseudo-normals). 0 = flat.

Default: 1.309999943

form sizeSlidernormalSoftness

Blur radius in pixels for the pseudo-normals: bigger = larger, rounder puffs.

Default: 52

rimSliderrim

Brightening of thin, lit edges (silver lining).

Default: 2.079999924

light softnessSliderlightSoftness

Blur radius in pixels applied to the computed lighting: scattered light is diffuse.

Default: 62

fire lightSliderfireLight

How much the fire illuminates the smoke.

Default: 9.800000191

fire light radiusSliderfireLightRadius

Softness / reach of the fire light, in pixels.

Default: 236

Depth layers

smoke layersSlidersmokeLayers

Slices each pixel's optical depth into layers composited front to back: the front is thin, light and lit, deeper layers are darker. 1 = off.

Default: 3

layer thicknessSliderlayerThickness

Optical depth per layer (smaller = the dark core shows through sooner).

Default: 0.8000000119

layer darkeningSliderlayerDarkening

How much darker the deepest layer is.

Default: 0.5

fire layersSliderfireLayers

Additive flame sheets, each with its own detail noise (parallax-like depth).

Default: 2

Motion blur

shutterSlidermotionBlur

Shutter in frames: smoke and fire are blurred along the simulation velocity (0 = off).

Default: 0.5

samplesSlidermotionBlurSamples

Samples along the shutter.

Default: 8

Detail noise

sizeSliderdetailSize

Size of the sub-grid detail noise in pixels.

Default: 24

speedSliderdetailSpeed

How fast the detail noise evolves on its own per frame (it also moves with the flow).

Default: 0.3000000119

Layers

render layersCheckboxrenderLayers

Also output the passes as channels: fire, smoke, normals, lighting, velocity (rgba stays the beauty). Layers share the simulation and add shading work; enable them when separate passes are needed.

Default: off

Sim20 controls

GPU, start frame, simulation resolution, closed walls, the memory snapshots and the disk cache.

use GPUCheckboxuseGPU

Run the simulation and the shading on the GPU through OpenCL (falls back to the CPU if none is available).

Default: on

deviceStatusdevice

Which device the simulation runs on.

start frameSliderstartFrame

The simulation starts empty at this frame.

Default: 1

sim resolution %SlidersimResolution

Simulation grid size as a percentage of the output. 50 is 4x faster than 100; softness and detail noise fill in below that.

Default: 50

seedSliderseed

Random seed for the noise.

Default: 0

detail reset periodSliderdetailPeriod

Frames before the advected detail texture is refreshed (longer = more stretched wisps).

Default: 6

Closed walls

leftCheckboxclosedLeft

Left edge is a solid wall (otherwise open).

Default: off

rightCheckboxclosedRight

Right edge is a solid wall (otherwise open).

Default: off

bottomCheckboxclosedBottom

Bottom edge is a solid wall (otherwise open).

Default: off

topCheckboxclosedTop

Top edge is a solid wall (otherwise open).

Default: off

Cache

snapshot everySlidercacheInterval

Keep a simulation snapshot every N frames so scrubbing only re-simulates from the nearest one.

Default: 12

cache memory (MB)SlidercacheMemoryMB

Memory budget for snapshots; older ones are thinned out when exceeded.

Default: 1024

always re-simulateCheckboxalwaysResimulate

Re-simulate from the start frame on every render (slow, but always consistent).

Default: off

Generate AutofillButtonanrCacheAutoFill

Create a fresh node-type/footage_letter_4digits subfolder on every click, then stop. Previous caches are kept.

Fills cache folder with a new, uniquely named folder for this node: inside the folder you typed there or, when it is empty, next to the saved script (save the script first). Every click makes another folder; old caches stay. Nothing is simulated until you build.

cache folderFilecacheFolder

Required for Build / rebuild cache. Each build writes a new cache_... folder here; nothing is written anywhere else. Use a local fast disk: about 1.2 GB per 100 frames at HD with 50% sim resolution.

Default: empty

cache to frameSlidercacheLast

Last frame the build simulates (from the start frame). 0 = the end of the timeline.

Default: 0

after last frameMenucacheAfter

Frames after the cached range: hold the last frame still, or show nothing.

Default: Hold last frameOptions: Hold last frame Empty

build / rebuild cacheButtonbuildCache

Simulate from the start frame to 'cache to frame' and write every frame into a new folder inside the cache folder, then switch 'read cache' on. Turn off proxy first. Cancel keeps the previous cache.

read cacheCheckboxcacheOnly

Play the built cache: no simulation, no upstream evaluation, saves and reopens instantly. Shading and output stay live; simulation settings need a rebuild. Before the cached range: nothing. After it: see 'after last frame'.

Default: off

cache statusStatuscacheStatus

What the cache holds and what is playing.

Tips

  • sim resolution % at 50 simulates about four times faster than 100, and softness and detail noise fill in the look. Raise it for crisp close-ups.
  • Smoke colour only shows against a plate: judge color in the Smoke section with the result merged over your background, or with over source ticked.
  • output > Emitter shows the mask the solver sees. Use it to check the emit from channel and emit gain.
  • Fire only and Smoke only add up to the beauty, so you can grade them separately and Plus them back together.
  • volume depth gives the smoke internal shadows and a thicker look; 0 keeps the flat 2D look.
  • Closed walls on Sim turn image edges into solid walls, for smoke that pools against a ceiling or spreads along a floor.
  • shutter in the Motion blur section blurs fire and smoke along their own motion; 0 turns it off.
  • Tick render layers for fire, smoke, normals, lighting and velocity channels beside the beauty, and write all channels to an EXR to keep them.
  • Upstream roto edits are detected by themselves. reset cache on Emission forces a fresh simulation from the start frame if you ever need one.

Good to know

  • The simulation runs on the GPU when use GPU is on, and device shows which one. Without a usable GPU it runs on the CPU, more slowly.
  • Cache folder: nothing is written to disk until cache folder is set; there is no default location. Each build writes a new folder inside it and older builds are kept. Allow about 1.2 GB per 100 frames at HD with 50% sim resolution, on a fast local disk.
  • With read cache on, shading and output stay live, but emission, motion and sim settings need build / rebuild cache again; cache status says when the cache is out of date. Before the cached range the node shows nothing; after it, after last frame holds the last frame or shows nothing.
  • With read cache on, a missing cache frame plays the nearest earlier frame with a warning in the GUI; in a farm or terminal render it stops the render with an error instead.
  • Bullet Time freezes the simulation at Freeze at (ticking it uses the current frame). Before that frame it plays normally; from it on the fire holds still, costs no simulation time and keeps its motion blur. Animate Bullet Time off to let it go on: the fire continues as if it had never stopped, so it jumps to where it would be on that frame. It works live and on a read cache.
  • Cancelling a cache build keeps the previous cache; only the new, unfinished folder is removed.

Something unclear or missing? Write to [email protected].