Skip to content

Tutorials · Particle Effects · Chapter 12

Particles that make particles

25 minutes Uses: ParticleEmitter

By the end

  • splash.artifact, and every raindrop leaving a small splash where it dies
  • firework.artifact and a launcher, fireworks: a shell that rises behind the roofs and bursts into a ring of sparks that keeps its speed
  • On Death and Inherit Velocity, and what keeps a sub-emitter from running away
On this page

A splash for every drop

A particle cannot make a particle, but an emitter can make an emitter. A sub-emitter is an emitter you save as an artifact, a file, and name in another emitter’s On Death. Where one of that emitter’s particles dies, the room places a copy of the artifact, and the copy fires its burst. The artifact is the splash. The rain is what makes it.

  1. Select Town, press + Add node, and choose Particles. Rename it splash, and set its Position to 0 and 0.
  2. Tick One Shot, and set Burst to 5, Capacity to 5, Lifetime to 0.35, Speed to 45, Spread to 2.4 and Gravity to 300. Direction stays at 0, -1.
  3. Set Start Color to 0.75, 0.88, 0.95, alpha 0.8, and End Color to the same colour with alpha 0. Set Start Size to 1.5, End Size to 1, and Sort Layer to 8, the rain’s own layer. In the Sprite group, drag art/soft-dot.png onto Texture.
  4. Right-click splash in the Hierarchy and choose Save as artifact…. In the save dialog, make a folder called artifacts, open it, and save the file as splash.artifact. Delete the splash left in the scene.
  5. Select rain. In the Sub-emitter group, drag artifacts/splash.artifact from Assets onto On Death.
  6. Press Ctrl+S, and then F5. Look at the roofs, and press F5 again to stop.

To look at the artifact again, double-click artifacts/splash.artifact in Assets. It opens on its own, as a scene of one node.

splash.artifact opened on its own: the Hierarchy holds a single node, splash, and the Viewport is empty; the Inspector, narrowed with the search box, particleemitter, shows the Particle Emitter: Emitting ticked, Rate 20.00, Lifetime 0.35, Speed 45.00, Direction x 0.0 and y -1.0, Spread 2.4, Gravity 300.00, Start Color a pale blue-white, End Color the same colour fading over a chequerboard, Start Size 1.50, End Size 1.00, One Shot ticked, Burst 5, Capacity 5, Prewarm 0.00 s, Trail 0, Sort Layer Custom 8, Blend Alpha, Unshaded and Light Only unticked, and the Sprite group with Texture soft-dot.png
The splash, opened on its own: one emitter, One Shot, five particles.

A one-shot emitter fires its Burst once, when it is placed, and then has nothing left to do. Its Rate is not used.

rain selected, its Inspector narrowed with the search box, death, to the Particle Emitter rows that mention a death: End Color, a pale blue, and End Size 2.00, then the Sub-emitter group with On Death ticked and the name splash.artifa, cut off by the box; in the Viewport the rain’s Direction arrow and Spread squares stand at the top edge of the town
The rain’s On Death slot, holding splash.artifact. The box cuts its name short.
On Death
An artifact to place where each of this emitter’s particles dies, launched with the velocity the dying particle had. Empty places nothing. The artifact’s own emitter says what the copy does: splash.artifact throws five drops of water. Drag an artifact onto the slot, and click the slot to clear it.
Close up of three roofs, the fountain and the street at three seconds, with the splash on: over the first roof, beside its chimney, a small fan of a dozen or so tiny pale dots, a few white flecks hanging above the other roofs, and the fountain’s jet and its basin below
Close up, three seconds in: a small fan of dots over the roof, where a drop has landed and died.
The same close up with no On Death: the same roofs, the same flecks and the same jet, but over the first roof only a few dashes where there was a fan of dots
Close up, for comparison, no On Death: the fan is gone, and the rest is the same.

Fireworks

A firework is two emitters. A launcher throws up shells, one at a time, and each shell, where it dies, places a burst: firework.artifact, a one-shot emitter that fires its sparks in a ring.

  1. Select Town, press + Add node, and choose Particles. Rename it firework, and set its Position to 0 and 0.
  2. Tick One Shot, and set Burst to 48, Capacity to 48, Lifetime to 1.4, Speed to 90, Spread to 7, Gravity to 40 and Drag to 0.8.
  3. Set Start Color to 1, 0.9, 0.7, alpha 1, and End Color to 1, 0.6, 0.3, alpha 0. Set Start Size to 5; End Size stays at 2. Set Sort Layer to -22 and Blend to Add. In the Sprite group, drag art/soft-dot.png onto Texture.
  4. In the Inherit group, set Inherit Velocity to 0.5.
  5. Right-click firework, choose Save as artifact…, and save the file as artifacts/firework.artifact. Delete the firework left in the scene.
  6. Select Town, add another Particles node, and rename it fireworks. Set its Position to 470 and 236.
  7. Set Rate to 0.4, Lifetime to 1.3, Speed to 180, Direction to -0.08 and -1, Spread to 0.15, Gravity to 90 and Capacity to 4.
  8. Set Start Color to 1, 0.85, 0.6, alpha 1, and End Color to 1, 0.6, 0.3, alpha 0.8. Set Start Size to 3, Trail to 4, Sort Layer to -22 and Blend to Add. Drag art/soft-dot.png onto Texture.
  9. In the Sub-emitter group, drag artifacts/firework.artifact from Assets onto On Death.
  10. Press Ctrl+S, and then F5. Look at the sky over the roofs, and press F5 again to stop.
fireworks selected, its Inspector narrowed with the search box, particleemitter, to the Particle Emitter: Emitting ticked, Rate 0.40, Lifetime 1.30, Speed 180.00, Direction x -0.08 and y -1.0, Spread 0.15, Gravity 90.00, a pale orange Start Color, an orange End Color over a chequerboard, Start Size 3.00, End Size 2.00, One Shot unticked, Burst 24, Capacity 4, Prewarm 0.00 s, Trail 4, Sort Layer Custom -22, Blend Add, Unshaded and Light Only unticked, and the Sprite group with Texture soft-dot.png; in the Viewport the node’s Move arrows stand over the lamp’s side of the town, with two small blue squares above them
The launcher: one shell every two and a half seconds, up and a little to the left.

The launcher’s Rate of 0.4 is a shell every 2.5 seconds, and its Lifetime of 1.3 is how long a shell climbs before it dies and places the burst. The shell is a small soft dot with a tail of four earlier positions, Trail 4, and it rises behind the roofs: its Sort Layer of -22 is behind the houses, which are at -20, and in front of the forest and the mountains. What you see of it is a thin dotted trail climbing out of the clouds.

Close up of the dark sky at the cloud line, just before the burst: rain streaks falling, and, a little above the clouds, three or four small orange dots in a short vertical line, the shell and its trail
Close up, just under four seconds in: the shell, just before it bursts.
Close up of the sky with the burst a moment after it begins: a small tight ring of bright cream sparks, with rain streaks falling around it
Close up: the shell dies and the burst opens as a ring.

The burst is a ring because Spread 7 is a little more than a whole circle, 6.28, so the sparks leave in every direction, and because every spark leaves at the same Speed, 90. All the sparks are the same distance from the middle at any moment, so they form a circle.

Inherit Velocity
How much of its emitter’s own velocity each new particle takes, from 0 to 1. For a copy placed by On Death the emitter’s velocity is the dying particle’s: a shell still climbing when it dies gives its burst that climb. At 0 the particles ignore it, and at 1 they carry all of it, so a burst is carried along as if its shell had never stopped. 0.3 to 0.5 reads as thrown, and 0.5 is what the firework has. The splash keeps 0: a drop that lands has nothing to give.
firework.artifact opened on its own: the Hierarchy holds a single node, firework, and the Viewport is empty; the Inspector, narrowed with the search box, inherit velo, shows the Particle Emitter’s Inherit group with one row, Inherit Velo, cut off by the box, with a slider at 0.50
The firework’s Inherit Velocity: 0.5. The box cuts the name short.
Close up of the same burst half a second later: a wide ring of dim orange sparks, sagging at the bottom where they are densest, with its top and sides out among the rain
Half a second later: the ring has opened wide, and its middle has risen.
The same close up half a second later with Inherit Velocity 0: the same wide ring of dim orange sparks, but lower, its top and bottom both about sixty pixels of this picture below where they were before
For comparison, Inherit Velocity 0: the same ring, about 15 units lower, centred where the shell died.

The splash, the firework and the rain

The splashValue
Lifetime0.35
Speed45
Spread2.4
Gravity300
Start Color0.75, 0.88, 0.95, alpha 0.8
End Color0.75, 0.88, 0.95, alpha 0
Start Size1.5
End Size1
One Shotticked
Burst5
Capacity5
Sort Layer8
Texturesoft-dot.png
The fireworkValue
Lifetime1.4
Speed90
Spread7
Gravity40
Drag0.8
Start Color1, 0.9, 0.7, alpha 1
End Color1, 0.6, 0.3, alpha 0
Start Size5
One Shotticked
Burst48
Capacity48
Sort Layer-22
BlendAdd
Texturesoft-dot.png
Inherit Velocity0.5
The launcherValue
Position470, 236
Rate0.4
Lifetime1.3
Speed180
Direction-0.08, -1
Spread0.15
Gravity90
Start Color1, 0.85, 0.6, alpha 1
End Color1, 0.6, 0.3, alpha 0.8
Start Size3
Capacity4
Trail4
Sort Layer-22
BlendAdd
Texturesoft-dot.png
On Deathfirework.artifact
The rainValue
Position320, -12
Rate120
Lifetime1.1
Speed340
Direction0.12, 1
Spread0.04
Gravity200
Start Color0.7, 0.82, 0.9, alpha 0.7
End Color0.7, 0.82, 0.9, alpha 0.5
Start Size2
Capacity144
Sort Layer8
Textureraindrop.png
StretchLength Scale 1, Speed Scale 0.012
ShapeLine, Length 720
Collisionticked, Bounce 0.15, Friction 0.4
On Deathsplash.artifact

Check it works