Exercise 4: A flame that grows and fades
Purpose. To make a particle change during its life: grow, fade, and shift colour.
Every value entered so far has stayed the same from the moment a particle was made until it vanished. A flame does not work that way. Each puff starts small and bright, swells, darkens, and thins out to nothing. A value that changes over a particle’s life is drawn as a graph.
Before starting
Section titled “Before starting”- The workspace holds one new Part with Shape Ball, Size
1, 1, 1and Material Neon. Set these in Studio’s own Properties window. - Auto-emit from Exercise 3 is off.
Procedure
Section titled “Procedure”Steps 1 to 4 repeat what Exercises 1 and 2 taught. The new work starts at step 5.
| Step | Control | Action | Result |
|---|---|---|---|
| 1 | The Part | Select, then press Transform | The Part turns invisible. The HUD and the Properties panel open. |
| 2 | Properties ▸ Motion ▸ Speed | Enter 6 | No change yet. Nothing is being emitted. |
| 3 | Properties ▸ Motion ▸ SpreadAngle | Enter 10 | No change yet. |
| 4 | Properties ▸ Emission ▸ Enabled | Switch on | Ten balls a second rise in a narrow column and vanish after one second, all the same size and colour. |
| 5 | Properties ▸ Appearance ▸ Transparency ▸ ⋯ | Press | The graph editor opens, titled Graph - Transparency. It shows a level line at 0 with a keypoint at each end. |
| 6 | Graph editor ▸ right-hand keypoint | Drag up to 1 | The line now climbs from 0 to 1. In the viewport each ball fades as it rises. |
| 7 | Graph editor ▸ Apply | Press | The editor closes. The Transparency box reads <NumberSequence>. |
| 8 | Properties ▸ Appearance ▸ Size ▸ X, Y, Z | Click each until all three are lit | The box beside them reads 1. |
| 9 | Properties ▸ Appearance ▸ Size ▸ ⋯ | Press | The graph editor opens, titled Graph - Size (X+Y+Z), with a level line at 1. |
| 10 | Graph editor ▸ left-hand keypoint | Double-click, enter 0.4 for Value | The line starts at 0.4. Each ball is made small. |
| 11 | Graph editor ▸ right-hand keypoint | Double-click, enter 2.5 for Value | The line climbs from 0.4 to 2.5. Each ball swells as it rises. |
| 12 | Graph editor ▸ Env box | Enter 0.2 | A band appears around the line. Some balls now run larger than the line and some smaller. |
| 13 | Graph editor ▸ Apply | Press | The editor closes. |
| 14 | Properties ▸ Appearance ▸ Color ▸ ⋯ | Press | The colour editor opens, titled Color - Color. It shows a bar of one colour with a marker under each end. |
| 15 | Colour editor ▸ left-hand marker | Click to select, click again, enter Red 255, Green 240, Blue 170, press OK | The left end of the bar is pale yellow. |
| 16 | Colour editor ▸ right-hand marker | Click to select, click again, enter Red 120, Green 20, Blue 0, press OK | The bar runs from pale yellow to dark red. |
| 17 | Colour editor ▸ the bar, at its middle | Click | A third marker appears there, already selected. |
| 18 | Colour editor ▸ the new marker | Click, enter Red 255, Green 120, Blue 0, press OK | The bar runs yellow, orange, dark red. |
| 19 | Colour editor ▸ Apply | Press | The editor closes. Each ball starts small and pale yellow, swells through orange, and fades out dark red. |
| 20 | Properties ▸ Emission ▸ Enabled | Switch off | The flame stops. |
What the graphs did
Section titled “What the graphs did”A graph is read from left to right. The left edge is the moment a particle is made. The right edge is the moment it vanishes. The height of the line at any point is the value the particle has at that age.
The left-to-right scale is a share of the particle’s life, from 0 to 1. It is not measured in seconds. The same graph therefore fits a particle that lasts half a second and one that lasts ten. The long-lived particle plays the same shape more slowly. See The 0 to 1 scale.
Transparency runs from 0, fully visible, to 1, invisible.
Size is measured in studs. It is the particle’s actual size, not a multiple of the Part’s size. Transform set the three Size graphs to the size the Part had, which is why they read 1 here. The X, Y and Z buttons choose which of the three graphs the box and the ⋯ button act on. With all three lit, one graph is written to all three, and the ball stays round.
Env gives a graph a random spread. Each particle is made a little above or below the line and stays on that side for its whole life. With a spread of 0.2, one ball may run from 0.6 to 2.7 and the next from 0.3 to 2.4. A colour graph has no spread.
Between keypoints a graph runs in a straight line. The graph editor can also bend the line smoothly. That control and the others, among them presets and copy and paste, are described in The graph editor.
If the result differs
Section titled “If the result differs”| Symptom | Cause | Action |
|---|---|---|
| ⋯ on the Size row does nothing | None of X, Y, Z is lit. | Repeat step 8. |
| The ball stretches into an egg | Only one or two of the Size buttons were lit at step 9. | Light all three and repeat steps 9 to 13. |
| The end keypoints will not move sideways | The first and last keypoints are fixed at the start and end of life. They move up and down only. | Drag up or down. |
| The colour picker does not open at step 15 | The marker was clicked once. The first click selects it. | Click the selected marker again. |
| The drawn graph is gone and the box shows a number | A number was typed into the box. | Press Ctrl+Z, or draw the graph again. |
Variations
Section titled “Variations”| Change | Result |
|---|---|
| Click the middle of the Transparency graph and drag the new keypoint down to 0 | Balls stay solid for the first half of their life and fade in the second. |
Speed 4, 8 | Each ball takes one speed of its own between 4 and 8. Two numbers in a graph’s box give a level line with a random spread. |
Lifetime 0.8, 1.6 | Longer-lived balls rise higher and play the same graphs more slowly. |
| Size with only Y lit, a line from 1 to 4 | Balls stretch upward into streaks. |
| Colour editor ▸ Invert | The gradient is reversed: dark red first, pale yellow last. |
| New in this exercise | Graphs. The graph editor: keypoints, Env, Apply. The X, Y and Z buttons. The colour editor. |
| Done before | Transform (Exercise 1). Speed (Exercise 1). SpreadAngle (Exercise 2). Enabled (Exercises 1 and 2). |
| Carried forward | Keep this emitter. Exercise 10 uses it again. |