Exercise 9: A rocket that bursts at the top
Purpose. To make one effect fire from another: a rocket that climbs, and a burst of sparks where it ends.
Until now each emitter has worked alone. A firework is two effects, and the second happens wherever the first one has got to. No link can do that, because the rocket is not an object in the workspace. It is a particle. To fire an emitter from a particle, the emitter is put inside the particle’s template. This is nesting.
Before starting
Section titled “Before starting”- The workspace holds one new Part with Shape Ball, Size
1, 1, 1and Material Neon. Name itRocket. - The sparks emitter from Exercise 7 is in the workspace, with its link removed. To remove it, select the sparks emitter, then in the Properties panel:
- Link ▸ Link Dir. ▸
*, then Clear. - Link ▸ Link Mode, set to
Follow. - Link ▸ Link Axes ▸ Pos Y, switched on again.
- Link ▸ Link Dir. ▸
Procedure
Section titled “Procedure”Steps 1 to 4 repeat earlier exercises.
| Step | Control | Action | Result |
|---|---|---|---|
| 1 | Rocket | Select, then press Transform | The HUD and the Properties panel open. |
| 2 | Properties ▸ Motion ▸ Speed | Enter 30 | No change yet. |
| 3 | Properties ▸ Emission ▸ Lifetime | Enter 1.2 | No change yet. |
| 4 | HUD ▸ Emit button | Press | One ball climbs 36 studs and vanishes. The Emit box already reads 1. |
| 5 | Explorer | Expand Rocket | Its children show, among them RenderTemplate. |
| 6 | Explorer | Drag the sparks emitter onto RenderTemplate | The sparks emitter is now inside the RenderTemplate of Rocket. |
| 7 | The sparks emitter, inside RenderTemplate | Select | The HUD and the Properties panel show the sparks emitter. |
| 8 | HUD ▸ Emit, Delay, Duration boxes | Enter 30, 1.1 and 0 | No change yet. |
| 9 | Rocket | Select, then press Emit on the HUD | The ball climbs. After 1.1 seconds, thirty sparks burst from the ball, wherever it then is. The ball vanishes a moment later. The sparks spread and fall. |
What the steps did
Section titled “What the steps did”The RenderTemplate is what every particle is duplicated from. It is also the place to keep whatever each particle should carry. An emitter kept there is fired once for every particle the parent makes.
A nested emitter is fired by the same three numbers as any other, read from its own HUD boxes:
| Box, on the nested emitter | Meaning when nested |
|---|---|
| Emit | Particles made for each parent particle. |
| Delay | Seconds to wait after the parent particle is made. |
| Duration | Seconds of stream after the burst, at the nested emitter’s Rate. The stream ends early if the parent particle ends first. |
With Emit 0 and Duration 0 a nested emitter never fires. Its Enabled switch plays no part in nesting.
The sparks appear at the parent particle, and until the parent vanishes they are carried along with it. How closely they follow is set by the nested emitter’s own Link Mode, with the same five choices as in Exercise 7. No link needs to be picked: the parent particle is the thing followed. When the parent vanishes, sparks already in flight live out their own Lifetime from where they are.
The nested emitter is still an ordinary emitter. Select it inside the RenderTemplate to change it, exactly as before. A change shows on the next parent particle.
If the result differs
Section titled “If the result differs”| Symptom | Cause | Action |
|---|---|---|
| The ball climbs and nothing bursts | The nested Emit box reads 0, or its Delay is not below the rocket’s Lifetime. | Repeat step 8. |
| The ball climbs and nothing bursts | The sparks emitter is beside RenderTemplate, not inside it. | In the Explorer, drag it onto RenderTemplate. |
| The sparks burst at the launch point, at once | The nested Delay is 0. | Enter 1.1 in the nested emitter’s Delay box. |
| The sparks do not rise with the ball | Pos Y is still switched off from Exercise 7. | Switch Pos Y on again under Link ▸ Link Axes. |
| Sparks fly while nothing is being fired | The nested emitter’s Enabled is on. | Select it and switch Enabled off. |
Variations
Section titled “Variations”| Change | Result |
|---|---|
Nested Motion ▸ SpreadAngle 180 | The burst opens in every direction, as a firework does. |
Nested Delay 0, Emit 0, Duration 1.2, Emission ▸ Rate 40, Link ▸ Link Mode RigidLocal | A stream of sparks is left behind along the whole climb, like the tail of a rocket. |
HUD ▸ Emit 5 on Rocket, with Motion ▸ SpreadAngle 20 | Five rockets fan out, and each bursts where it ends. |
A second emitter inside the same RenderTemplate | Both fire from each rocket. Give each its own Delay. |
An emitter inside the RenderTemplate of the nested sparks | Each spark fires it in turn. Nesting can go as deep as the Particle Cap allows. |
| New in this exercise | An emitter placed inside a RenderTemplate. Emit, Delay and Duration on a nested emitter. |
| Done before | Transform (six times). Speed (Exercises 1, 4 and 5). Lifetime (Exercises 2 and 6). The Emit, Delay and Duration boxes (Exercise 3). Link Mode (Exercise 7). |
| Carried forward | Nothing. Exercise 10 uses the emitters kept from Exercises 4, 5 and 6. |