Skip to content

Tutorials · Particle Effects · Chapter 2

Colour, size, fading

20 minutes Uses: ParticleEmitter

By the end

  • chimney_a’s smoke grey and soft, growing as it rises and fading to nothing
  • Start Color and End Color, Start Size and End Size, a Texture, and the five Blend modes
  • Why additive particles burn out to white
On this page

A colour at birth and at death

Chapter 1’s dots are the emitter’s own white, and they already thin out as they climb. A particle’s colour runs from one value at its birth to another at its death, and the emitter’s defaults fade a pale white to nothing. Smoke wants a grey of its own.

  1. Select chimney_a and click Start Color. If the button at the top left of the picker reads U8, press it so it reads F: the picker then shows each value from 0 to 1, as this tutorial gives every colour, until you close the editor.
  2. Set Start Color to 0.62, 0.65, 0.68, alpha 0.7.
  3. Set End Color to 0.45, 0.48, 0.5, alpha 0.
chimney_a selected, its Inspector narrowed with the search box, color, to four rows of the Particle Emitter: Start Color, a pale grey swatch over a chequerboard, End Color, a darker swatch over a chequerboard, and under their own groups Color Over Life and Color By Speed, each an unticked box; the Viewport shows the town still, with the node’s move arrows at the first chimney’s top
Start Color
The colour a particle is born with: three numbers from 0 to 1, red, green and blue, and an alpha, how solid it is, from 0 clear to 1 solid. 0.62, 0.65, 0.68, alpha 0.7 is a pale grey, a little see-through. Smoke here wants every channel between 0.4 and 0.7.
End Color
The colour it has as it dies. A particle’s colour runs from Start Color to End Color over its whole life: here a darker grey, 0.45, 0.48, 0.5, that is clear, alpha 0, so the smoke thins out as it climbs.
The first chimney with chapter 1’s smoke: hard white dots, solid and bright at the chimney, fading and shrinking as they climb to the top of the picture
Chapter 1’s smoke, as it was.
The same column with only the two colours changed: the dots are grey instead of white, and fainter, still hard-edged and shrinking as they climb
For comparison, only the colours changed: the same dots, grey and fainter.
The smoke at Lifetime 2: a soft grey column that stops a little over halfway up the picture, the puffs growing and fading until the last is hardly there
For comparison, Lifetime 2, so the column ends inside the picture: the last puff has faded away.
The same Lifetime 2 column with End Color’s alpha left at 0.7: the puffs stay solid as they grow, and the column stops short with a bright puff at its top, as if cut off
For comparison, the same, with End Color’s alpha left at 0.7: the last puff is still solid when it goes.

A size at birth and at death

  1. Leave Start Size at 8. Set End Size to 26.
chimney_a selected, its Inspector narrowed with the search box, size, to four rows of the Particle Emitter: Start Size 8.00, End Size 26.00, and under their own groups Size Over Life and Size By Speed, each an unticked box; the Viewport shows the town still
The size rows: Size Over Life and Size By Speed come in chapter 5.
Start Size
A particle’s width at birth, in world units; the picture is drawn square, so it is the height too. 8 is the emitter’s own default and suits the first puff out of a chimney; 4 to 12 looks right here.
End Size
Its width as it dies. A particle grows or shrinks from Start Size to End Size over its life. Smoke spreads as it rises, so it grows: 26 here, and 15 to 40 suits a puff at the end of its life. Chapter 1’s dots shrank, because the default End Size is 2.
The first chimney with End Size 8: a column of small soft dots, all the same size from the chimney to the top of the picture, growing fainter
For comparison, End Size 8: a thin column, every dot the same width all the way up.

A soft puff

Every particle so far is the engine’s own plain disc, hard-edged and flat. A particle draws a picture instead when it is given one, and the starter holds one made for smoke, soft-dot.png: a white dot that fades smoothly to nothing at its rim.

  1. In the Sprite group, drag art/soft-dot.png from Assets onto Texture.
chimney_a selected, its Inspector narrowed with the search box, texture, to the Particle Emitter’s Sprite group: Texture soft-dot.png beside a small picture button, and Texture Sheet unticked
The Texture row, with soft-dot.png on it.
Texture
The picture every particle draws. Empty draws the engine’s plain disc, hard-edged, which is what chapter 1 used. soft-dot.png is a white dot fading to clear at its rim, and it makes a puff instead of a coin. Any picture in art will do, such as a spark or a raindrop; later chapters use others.
Close up, the first chimney’s top and the start of its column with the plain disc: big, hard-edged grey circles overlapping, in a column that widens as it climbs
Close up, for comparison: the plain disc, each particle a hard-edged circle.
Close up, the same stretch of column with the soft dot: much smaller, soft-edged grey blots, apart from each other and growing fainter as they rise
Close up: the soft dot, much smaller and softer than the disc at the same size.
The first chimney with the smoke as this chapter leaves it: soft grey puffs, small and fairly bright at the chimney, growing larger and fainter as they rise, running off the top of the picture
The smoke as this chapter leaves it: grey, growing, soft, and fading as it rises.

How it meets what is behind

A particle is laid over whatever is already drawn. Blend decides how. The smoke here uses the ordinary way, and you leave it there, but four others are used in this tutorial, and the first of them, Add, is worth seeing.

  1. Leave Blend on Alpha. Press Ctrl+S.
Blend
How each particle is laid over what is behind it. Alpha paints it on by its alpha, as smoke and most things are, and is what you keep here. Add adds its light to the picture, so overlaps brighten: fire, sparks and glow. Multiply darkens what is behind by its colour: soot, in chapter 9. Screen lightens it more gently than Add, and never past white: fog, in chapter 4. Subtract takes its colour away from what is behind, which chapter 16 uses for scorching.
The smoke at Rate 40 with Blend Alpha: a thick, soft grey column, denser than before, running up from the chimney and off the top of the picture
For comparison, Rate 40, so the puffs overlap more, with Blend Alpha: a thick grey column.
The same Rate 40 with Blend Add: the whole column brighter and paler, and a bright white stretch just above the chimney where the puffs pile up
For comparison, the same with Blend Add: the column glows, and burns to white where the puffs pile up at the chimney’s mouth.

The chimney smoke

FieldValue
Position181, 201
Rate12
Lifetime3.5
Speed18
Direction0.2, -1
Spread0.35
Capacity48
Start Color0.62, 0.65, 0.68, alpha 0.7
End Color0.45, 0.48, 0.5, alpha 0
Start Size8
End Size26
Texturesoft-dot.png
BlendAlpha

Every other field is as a new Particles node has it. Chapter 3 changes Gravity and Drag.

Check it works