Nesting
A nested emitter is an emitter kept inside another emitter’s RenderTemplate. It fires once for every particle the parent makes, at that particle. Its own Emit, Delay and Duration say what it fires. Exercise 9 builds one for the first time.
What it makes possible:
- A fireball that lights the walls it passes. A Light emitter with Emit
1, nested in the fireball. The light ends with the fireball. - Smoke puffs left along a rocket’s path. A nested Part emitter with Link Mode
RigidLocal, a Duration equal to the rocket’s Lifetime, and a Rate. - Sparks that stay on a spinning prop. A nested emitter with Link Mode
Weld. - A second stage that goes off late. A nested emitter with a Delay shorter than the parent’s Lifetime.
- Embers that outlive the fireball. A nested Part emitter with a longer Lifetime than its parent. The embers carry on from where the fireball ended.
- A model rig whose exhausts come from the right places. Emitters nested under the sub-parts of a Model emitter.
- A trail on every shard. A stock Trail under an Attachment in the shard’s
RenderTemplate, with Duration0.
What counts as nested
Section titled “What counts as nested”| Arrangement | Nested | What fires it |
|---|---|---|
An emitter anywhere inside another emitter’s RenderTemplate | Yes. It fires once for each parent particle. | Its own Emit, Delay and Duration. |
A stock ParticleEmitter or Trail inside a RenderTemplate | It is carried by each particle and fired with it. | Its own Emit, Delay and Duration. See Stock ParticleEmitters, Trails and Beams. |
A stock Beam, a plain light or any other plain instance inside a RenderTemplate | It is duplicated with each particle, as it stands. | Nothing. |
An emitter that is a child of another emitter, outside its RenderTemplate | No. It is a separate emitter that is kept there. Emitting the parent does not fire it. | Its own Emit button, or being selected together with the parent. |
| A Folder, Model, Part or Attachment that is not transformed and holds several emitters | No. It is a container. Selecting it and pressing Emit fires everything inside together. | Each emitter’s own values. |
The RenderTemplate entry of the Why Dictionary says what the template is.
Which emitter types nest
Section titled “Which emitter types nest”| Emitter types | |
|---|---|
| Fire the emitters nested in them | Part, Attachment, Model, Lightning, Rocks and Rope, in Emit mode and in Animate mode. |
| Do not fire nested emitters | Beam, Light, Highlight, Sound, Trail emitter, Camera Shake and Distortion. |
| Can be nested | Any emitter type. |
A Lightning, Rocks or Rope parent fires its nested emitters once for each bolt, burst or rope. It does not fire them once for each segment or chunk.
A Camera Shake or Distortion emitter nested in a Part or Model emitter takes the parent particle as its origin.
Building a nested emitter
Section titled “Building a nested emitter”What Transform keeps in the template
Section titled “What Transform keeps in the template”| Parent | The RenderTemplate keeps |
|---|---|
| A Part | Meshes, Decals, Textures, a SurfaceAppearance, Attachments with everything inside them, and children that are already emitters. Every other direct child is left out. |
| An Attachment | Its children. |
| A Model | The whole Model, children included. |
A stock ParticleEmitter, Trail or Beam, or a plain light, placed straight in a Part is not kept. Put it under an Attachment.
Transform switches off the stock ParticleEmitters and Trails inside the new template. Each particle fires its own.
The original children stay where they were, outside the RenderTemplate. An emitter left there is a separate emitter.
Child first
Section titled “Child first”| Step | Control | Action | Result |
|---|---|---|---|
| 1 | Explorer | Drag the child onto the future parent | The child is inside the parent. For a Part parent, it may also sit under one of the Part’s Attachments. |
| 2 | The child | Select, then press Transform | The child is an emitter. |
| 3 | HUD ▸ Emit box | Enter 1 or more | The child has a burst to fire. A Duration above 0 serves as well. |
| 4 | The parent | Select, then press Transform | The parent’s RenderTemplate holds a copy of the child emitter. That copy is the nested emitter. |
The original child is still in the parent, outside the RenderTemplate. It is a separate emitter and may be deleted.
Parent first
Section titled “Parent first”| Step | Control | Action | Result |
|---|---|---|---|
| 1 | The parent | Select, then press Transform | The parent is an emitter with a RenderTemplate. |
| 2 | Explorer | Expand the parent. Drag an emitter onto RenderTemplate. | The emitter is inside the RenderTemplate. It is now nested. |
| 3 | The nested emitter ▸ HUD ▸ Emit box | Select it, then enter 1 or more | The nested emitter has a burst to fire. A Duration above 0 serves as well. |
To edit a nested emitter, select it inside the RenderTemplate. It opens in the Properties panel like any emitter. Pressing Emit with it selected fires it alone, at the place of the template.
When a nested emitter fires
Section titled “When a nested emitter fires”Each parent particle fires each of its nested emitters, by the nested emitter’s own HUD boxes. Emission and the HUD describes the boxes.
| On the nested emitter | Effect when nested |
|---|---|
| Emit box | That many particles for each parent particle. |
| Delay box | Seconds counted from the moment the parent particle is made. If the parent particle is gone before the Delay ends, the nested emitter does not fire for it. |
| Duration box | After the burst, the nested emitter emits at its own Rate for that many seconds. The stream ends early if the parent particle’s Lifetime ends first. A Rate of 0 gives nothing. |
| Enabled | Plays no part in nesting. |
Emission ▸ Mode Animate | The nested emitter animates its own template and follows the newest parent particle. It fires even with an Emit count of 0. |
Every new emitter starts with an Emit count of 1. An emitter transformed inside a RenderTemplate therefore fires one particle for each parent particle, until its count is changed.
Each parent particle runs its nested emitters by itself. Many parent particles can be in flight at once, each with its own Delay and its own stream.
Within one parent particle, nested Attachment emitters fire first. A nested Beam emitter or Trail emitter can then use the Attachments they made.
A nested emitter in Animate mode has one animation at a time. With several parent particles alive, only the newest one has it.
Where nested particles appear
Section titled “Where nested particles appear”A nested particle appears at its parent particle. The parent particle takes the place of a link. The nested emitter’s Link Dir. row is not used. Its Link Mode and Link Axes rows are.
| Link Mode of the nested emitter | Where a nested particle appears | While it flies |
|---|---|---|
Follow | At the parent particle, with the nested emitter’s own rotation. | It is carried with the parent particle’s position. It does not turn with the parent. |
Pivot | At the parent particle, turned by the parent’s rotation. | As Follow: position only. |
Weld | At the parent particle, with its position and rotation. | It moves and turns with the parent. |
WeldWithoutRotation | As Weld. | Its offset turns with the parent. Its own rotation does not. This applies to Part and Model emitters. |
RigidLocal | As Weld. | It uses the parent’s place at the moment the nested particle was made. Later movement of the parent is ignored, so nested particles are left behind along the parent’s path. |
Link Mode starts at Follow. Link describes the modes and the axes in full.
Where the nested emitter sits in the template matters only inside a Model:
| The nested emitter sits | Its particles appear |
|---|---|
| Straight in the template of a Part or Attachment emitter | At the parent particle. Its own position in the template is not used as an offset. |
| Straight under the root of a Model emitter’s template | At the parent particle, in the same way. |
| Under a sub-part of a Model emitter’s template, or under an Attachment of that sub-part | At that sub-part, and they follow that sub-part. |
The nested emitter’s own Spawn rows apply on top of this, as on any emitter.
A switched-off axis in Link Axes holds that axis at the parent’s place at the moment the nested particle was made.
Nested particles are managed by the plugin. Use Emit Into only if you need them somewhere specific.
A parent Model’s Scale
Section titled “A parent Model’s Scale”A Model emitter passes its Scale to the emitters nested in it. The Model’s three switches decide what is scaled: Scale Texture, Scale Motion and Scale Rotation. Model describes them.
- Scales multiply down the chain, at any depth. A Model nested in a Model passes on both scales.
- A Part or Attachment emitter between two levels passes its parent Model’s scale on unchanged.
- Each parent particle scales its own nested particles. Two Model particles at different points of their Scale graph give nested particles of different sizes.
- With Scale Motion on, a nested particle’s Position spread uses the Model’s scale at the moment the particle is made. Its movement uses the Model’s current scale.
When the parent particle ends
Section titled “When the parent particle ends”A parent particle ends when its Lifetime is over, when it is killed, or when its emitter is stopped. A Linger begins after that end.
| Nested thing | What happens |
|---|---|
| A nested emitter still waiting on its Delay | It does not fire. |
| A Duration stream | It stops making new particles. |
| Particles of a nested Part or Model emitter, already in flight | They live out their own Lifetime. They stop following and carry on from where the parent was last. With RigidLocal nothing changes for them. |
| Particles of a nested Light or Sound emitter | They end with the parent, unless the nested emitter has Emit Into set. |
While the parent particle is in its Linger, nested particles in flight keep following it until it is removed. The streams and the waiting Delays have already stopped.
Animate-mode parents
Section titled “Animate-mode parents”A Part, Attachment or Model emitter in Animate mode animates its own RenderTemplate. Its nested emitters fire at the start of the cycle and follow the template.
- With Loop on, the nested emitters fire again at the start of every cycle.
- A stream started in an earlier cycle is not stopped by the restart. It runs out by its own Duration, or when the animation is stopped.
- A nested Duration longer than the parent’s cycle therefore overlaps the stream of the next cycle.
- Lightning, Rocks and Rope emitters in Animate mode also fire their nested emitters again at each cycle.
- Stopping the animation ends the waiting Delays and the streams, as under When the parent particle ends.
Stock ParticleEmitters, Trails and Beams
Section titled “Stock ParticleEmitters, Trails and Beams”A stock ParticleEmitter or Trail inside a RenderTemplate is fired by each particle. Three attributes on it say how: EmitCount, EmitDelay and EmitDuration. The HUD’s Emit, Delay and Duration boxes write them when the stock instance is selected.
In the RenderTemplate | On each particle |
|---|---|
| A stock ParticleEmitter | After EmitDelay it emits EmitCount particles at once. With EmitDuration above 0 it is also switched on for that many seconds. A missing EmitCount counts as 1. With EmitCount 0 and EmitDuration 0, nothing happens. |
A stock Trail in a Part emitter, with EmitDuration above 0 | Switched on when the particle appears. Switched off again after EmitDelay plus EmitDuration. |
A stock Trail in a Part emitter, with EmitDuration 0 | Switched on for the particle’s whole life. |
A stock Trail in a Part emitter, with no EmitDuration attribute | Stays off. |
A stock Trail in a Model or Attachment emitter, with EmitDuration above 0 | Switched on after EmitDelay, for that many seconds. |
| A stock Beam | Duplicated as it stands. No attribute switches it. Its Attachments inside the template are replaced by the particle’s own. |
A Trail’s EmitDuration may hold two numbers, as 0.2, 0.6. Each particle picks a value between them.
A stock ParticleEmitter or Trail kept under a nested emitter belongs to that nested emitter, not to the outer parent.
Editing stock ParticleEmitters, Trails and Beams describes the rows of each.
Limits
Section titled “Limits”- Nesting has no depth limit. A nested emitter can hold a nested emitter of its own.
- Counts multiply. A parent that emits 10, each firing a nested burst of 30, makes 300 nested particles. A third level of 5 makes 1500 more.
- Every nested particle counts toward the Particle Cap, which is set in Settings. A parent particle refused by the cap does not fire its nested emitters. The Output window reports it.
- Each parent particle with a nested Duration runs its own stream until the parent ends.
- A nested emitter in Animate mode has one animation, however many parent particles are alive.
- Nesting does not use up the Chain of an event. A nested particle has the depth of its parent particle. See Events.
- Advanced ▸ Pool is safe to use with nested emitters.