Skip to content

Tutorials · Particle Effects · Chapter 3

Gravity and drag

15 minutes Uses: ParticleEmitter

By the end

  • A fountain’s jet, fountain_jet, arcing over its basin: Gravity 260
  • chimney_a’s smoke rising slowly in a plume: Gravity -6, Drag 0.3
  • What Gravity and Drag each do to a particle’s speed, and why a particle with drag settles at one speed
On this page

A fountain

The town’s fountain is a picture of stone and a spout, with no water. Water is a stream of small bright particles thrown up and pulled back down, so it is another emitter, on a node at the spout.

  1. Select Town, press + Add node, and choose Particles. Rename it fountain_jet.
  2. Set its Position to 320 and 258, the fountain’s spout.
  3. Set Rate to 80, Speed to 150, Spread to 0.35 and Capacity to 112. Lifetime stays at 1.2, Direction at 0, -1, straight up, and End Size at 2, as a new Particles node has them. Set Start Size to 3.
  4. Set Start Color to 0.75, 0.9, 1, alpha 0.9, and End Color to 0.6, 0.78, 0.95, alpha 0.2: a pale blue that goes clearer as it falls.
  5. Set Sort Layer to 3, so that the water is drawn in front of the fountain’s stones. Chapter 4 says what it means.
  6. In the Sprite group, drag art/soft-dot.png onto Texture.
  7. Set Gravity to 260.
fountain_jet selected, its Inspector narrowed with the search box, particleemitter, to the Particle Emitter: Emitting ticked, Rate 80.00, Lifetime 1.20, Speed 150.00, Direction x 0.0 and y -1.0, Spread 0.35, Gravity 260.00, Start Color a pale blue-white and End Color a paler blue over a chequerboard, Start Size 3.00, End Size 2.00, One Shot unticked, Burst 24, Capacity 112, Prewarm 0.00 s, Trail 0, Sort Layer Custom 3, Blend Alpha, then the Sprite group with Texture soft-dot.png; in the Viewport the node’s move arrows stand on the fountain’s stones, with two small blue squares above them
The fountain’s emitter, as this chapter leaves it.

Rate times Lifetime is 96, so a Capacity of 112 has room to spare.

What pulls it down

Gravity
How hard particles are pulled down, as an acceleration: world units a second, every second. Positive pulls down and negative pushes up, which is why the default -40 sends smoke up. 260 here, so the water rises, slows, and falls back into the basin; 150 to 400 suits water at this scale, and -40 to -3 suits smoke and steam.
Close up, the fountain at Gravity 260: a narrow stem of pale blue dots rising from the spout in front of the middle house and opening into a small bush of dots near its eaves, where the jet turns and falls back
Close up: Gravity 260, a jet that rises and falls back to the fountain.
Close up, the fountain at Gravity 0: a thin, slowly widening trail of tiny pale dots rising from the spout past the middle house’s roof, the mountains and the clouds, to the top of the picture
For comparison, Gravity 0: straight out of the top of the picture; nothing pulls the water back.
Close up, the fountain at Gravity 600: a short stem of pale dots with a small crown just above the spout, and a few drops falling past the spout and down through the fountain’s stones
For comparison, Gravity 600: a low crown, and the drops fall on through the stones.

Air that holds it back

Chapter 1’s smoke shot off the top of the window because its default Gravity of -40 kept pushing it faster. Smoke does not do that. A real puff rises, slows in the air and drifts. Two numbers on chimney_a give it that.

  1. Select chimney_a. Set Gravity to -6 and Drag to 0.3.
chimney_a selected, its Inspector narrowed with the search box, drag, to one row of the Particle Emitter, under the Over Lifetime group: Drag 0.3 /s; the Viewport shows the town still
The Drag row, in the Over Lifetime group: 0.3 a second.
Drag
How fast the air takes a particle’s speed away, in a share of its speed each second. After 1 / Drag seconds a particle has lost about two thirds of its speed, so 0.3 lets smoke drift on for its whole life, and 1.5 slows it to a third in under a second. 0 is no air at all. 0.2 to 1 suits smoke and dust here, and 0.3 is what you set.
The first chimney with chapter 2’s smoke at Gravity -40: a column of soft grey puffs rising from the chimney and running off the top of the picture
For comparison, chapter 2’s smoke: Gravity -40, a column to the top of the window.
The first chimney with Gravity -6 and Drag 0.3: a short soft grey plume that rises about a third of the way up the picture, widening and fading, and ends there
Gravity -6 and Drag 0.3: a plume that rises slowly and spreads.
The first chimney with Drag 0 at Gravity -6: a taller, wispier plume that rises about halfway up the picture before it fades
For comparison, Drag 0: it climbs further, at a speed that only grows.
The first chimney with Drag 1.5: a small stubby puff stalled just above the chimney, a few puffs high, the sky above empty
For comparison, Drag 1.5: it stalls just above the chimney.

The fountain and the chimney smoke

The fountainValue
Position320, 258
Rate80
Lifetime1.2
Speed150
Direction0, -1
Spread0.35
Gravity260
Start Color0.75, 0.9, 1, alpha 0.9
End Color0.6, 0.78, 0.95, alpha 0.2
Start Size3
End Size2
Capacity112
Sort Layer3
Texturesoft-dot.png
The chimney smokeValue
Position181, 201
Rate12
Lifetime3.5
Speed18
Direction0.2, -1
Spread0.35
Gravity-6
Drag0.3
Start Color0.62, 0.65, 0.68, alpha 0.7
End Color0.45, 0.48, 0.5, alpha 0
Start Size8
End Size26
Capacity48
Texturesoft-dot.png

Check it works