Skip to content

Tutorials · Particle Effects · Chapter 9

Bursts and prewarm

20 minutes Uses: ParticleEmitter

By the end

  • A soot puff, soot_puff, that fires once from the third chimney: One Shot, Burst 24
  • The town opening with its smoke, fog and fireflies already there: Prewarm
  • Pools sized to what each emitter holds
On this page

One puff

Every emitter so far is a stream: it makes Rate new particles every second for as long as the room is open. A cough, a gunshot or a splash happens once. A One Shot emitter fires all its particles at the same instant and then stops. The third chimney gets one, and it coughs a single puff of soot as the room opens.

  1. Select Town, press + Add node and choose Particles. Rename it soot_puff, and set its Position to 365 and 199, the third chimney’s top.
  2. Tick One Shot. Burst is already 24. Set Capacity to 24, the same.
  3. Set Lifetime to 2.3, Speed to 26, Spread to 1.4, Gravity to -14 and Drag to 0.8. Direction stays 0, -1, straight up.
  4. Set Start Color to 0.1, 0.09, 0.08, alpha 1, and End Color to 0.14, 0.12, 0.1, alpha 0: a dark brown-grey that fades.
  5. Set Start Size to 12 and End Size to 38. Set Blend to Multiply, and Texture to smoke-puff.png.
  6. Press Ctrl+S, then F5. The puff comes out of the chimney as the room opens, so look at once. Press F5 again to stop.
soot_puff selected, its Inspector narrowed with the search box to the rows that mention shot: One Shot ticked and Burst 24; in the Viewport the node sits at the third chimney’s top, with its move arrows and two small blue handles above it
One Shot
Fires the emitter once and stops, instead of streaming. It fires as its room opens, and again whenever it is restarted: with the Restart button in the Particles panel, or from a script, which chapter 13 does. Ticked, Rate is never read.
Burst
How many particles a one-shot fires at once, at least 1: 24 here. It can fire no more than the pool holds, so give Capacity the same number, or more. Any particles over Capacity are not born, and the Particles panel says so. The Burst button in the panel fires a Burst of any emitter on the spot, whether it is a one-shot or not.
Close up of the roofs and the sky over the third chimney, a sixth of a second in: a small, round, nearly black clot just above the chimney’s top, and a few yellow-green fireflies on the right
Close up, a sixth of a second after the room opens: the puffs leave the chimney together, a small dark clot.
The same close up two thirds of a second in: a broad flat dark cloud hanging in the sky above and to the left of the chimney, darker than the mountains behind it, with streaks of rain falling through the picture
Two thirds of a second in: spread out, and darker than the sky behind it.
The same close up nearly two seconds in: a large, faint, dark smudge high in the sky above the chimney, only a little darker than the mountains behind it
Nearly two seconds in: all but gone, a faint smudge.
The same close up two thirds of a second in with Blend Alpha: the same cloud as a pale grey-brown shape, lighter than the dark sky behind it, like smoke painted over it
For comparison, Blend Alpha: the same cloud painted on as a pale grey-brown, lighter than the sky, where Multiply takes light out of it.

Smoke already rising

Press F5 and watch the first moment. The chimneys have only begun to smoke, the fog has not gathered and the fireflies have not been born: the town takes a few seconds to fill. A real night has been going on for hours. Prewarm gives an emitter a head start: its particles are made as if it had already been running for some seconds before the room opens.

  1. Select chimney_a, and set Prewarm to 4. Do the same on chimney_b.
  2. Select forge_smoke, and set Prewarm to 3.
  3. Select fog, and set Prewarm to 7. Do the same on fireflies.
  4. Press Ctrl+S, then F5.
chimney_a selected, its Inspector narrowed with the search box to the rows that mention prewarm: Prewarm on a slider, at 4.0 s; in the Viewport the node sits at the first chimney’s top, with its move arrows and two small blue handles above it
Prewarm
Seconds the emitter has already been running when its pool is made, from 0 to 10. The pool is stepped that long, a sixtieth of a second at a time, before the first frame is drawn. Set it to the emitter’s Lifetime, or a little more, so its pool is already full, with the oldest particles just dying, as the room opens: 4 for the chimneys, whose smoke lives 3.5, 3 for the forge’s, and 7 for the fog and the fireflies. 0 is the default, and the emitter starts empty.
The night town on its very first frame with no Prewarm: the sky, mountains, houses and street with no smoke over the chimneys, no fog, no fireflies and no fire in the forge’s mouth, and only a tiny dark dot above the third chimney
For comparison, the first frame with no Prewarm: no smoke, no fog and no fireflies yet.
The same first frame with Prewarm: curling grey smoke already high over the first two chimneys and a plume over the forge, low fog along the street, and yellow-green fireflies by the second lamp, while the forge’s mouth is still dark
The first frame with Prewarm: smoke already rising, fog on the street and fireflies by the lamp.

The rain, the fountain’s jet, the forge’s fire and sparks and the ring at the well are missing from both pictures. They have no Prewarm: each lives a second or two, so they fill in a moment, and nobody sees them arrive. The Particles panel shows what a prewarmed pool holds.

The Particles panel with chimney_a selected, at the first step of a preview: Preview, Restart and Burst buttons, the speeds 0.1x, 0.25x and 1x with 1x lit, and under them 42 / 48 live beside a bar almost full, and Continuous, 12/s
At the first step of a preview: 42 of 48 alive, four seconds of smoke already in the pool.

A pool for each

Chapter 1 sized a pool as Rate times Lifetime, with a little to spare. The town now has eleven emitters, and each has its own number to fill:

EmitterRate × LifetimeCapacity
chimney_a, chimney_b12 × 3.5 = 4248
fountain_jet80 × 1.2 = 96112
rain120 × 1.1 = 132144
fog8 × 7 = 5664
well_ring36 × 1.2 = 4348
forge_fire40 × 0.9 = 3640
forge_sparks20 × 1.4 = 2832
forge_smoke8 × 3 = 2432
fireflies4 × 7 = 2832
soot_puffa one-shot: its Burst, 2424

Each stream’s pool has a tenth to a third to spare, and the one-shot’s has none: its pool is exactly its Burst, since it fires once and everything it makes fits.

The Particles panel with soot_puff selected: the Preview, Restart and Burst buttons, the speeds with 1x lit, and under them 24 / 24 live beside a bar filled to the end in amber, and the warning Pool full; new particles are dropped, and below, One shot, 24 particles
The one-shot two thirds of a second after it fires: 24 of 24 alive, and the panel calls its pool full.

The soot puff, the chimney smoke, the fog and the fireflies

The soot puff

FieldValue
Position365, 199
One Shotticked
Burst24, as a new node has it
Capacity24
Lifetime2.3
Speed26
Direction0, -1
Spread1.4
Gravity-14
Start Color0.1, 0.09, 0.08, alpha 1
End Color0.14, 0.12, 0.1, alpha 0
Start Size12
End Size38
BlendMultiply
Texturesmoke-puff.png
Drag0.8

The chimney smoke, complete

Fieldchimney_achimney_b
Everything from chapter 8as in its tableas in its table
Prewarm44

The ground fog

FieldValue
Everything from chapter 4as in its table
Prewarm7

The fireflies

FieldValue
Everything from chapter 8as in its table
Prewarm7

The forge’s smoke is chapter 6’s with a Prewarm of 3. Every other field is as a new Particles node has it.

Check it works