Particles: Child Effects vs Sibling Effects

Sep 10, 2011 at 1:30 AM

Hi - 

I was hoping somebody could help to explain the difference between child effects and sibling effects, and when to use one over the other?  I understand that Child Effects take place along side each other, but then how is that different from a sibling effect?

Any help is appreciated!

Thanks,

Mike

Coordinator
Sep 10, 2011 at 3:00 AM
Edited Sep 10, 2011 at 7:06 AM

Hi mike1o1,

This is a very good question. The short answer is there aren't much difference between sibling effects and child effects except for some rare scenarios.

The long answer is, used to be there's no sibling effect, you can always construct a particle system that contains multiple emitters by creating a dummy root effect (with texture set to null), and add each emitter as child effect. This works when the particle system is a continous effect, each emission of the root effect will spawn a list of child effects (Like the fireworks sample). Things become a bit complicated when you want all child effects to spawn together only once at the time the particle system is triggered (Like an explosion mixed with fire and smoke). The emission of the root effect cannot simulate that behavior, an emission of 1 would cause the root to keep spawning child effects once per second, an emission of 0 would not let the child effects to be spawned at all.

So sibling effect is introduced to handle that, you can create a fire effect and add the smoke effect as a sibling of the fire, in this case, the dummy parent container effect is not needed. You can trigger the explosion by trigger the fire, and the smoke is triggered automatically.

This really looks confusing to me too. But as I'm writing this, I came up with an idea that can eliminate sibling effects with the help of the Lifetime property. Lifetime controls how long a particle system would last, if I'm setting the emission of the root effect to be 1 and the lifetime to be something less than 1, the particle system should trigger only once. If thing worked this way, I'm going to add a ParticleEffect.CreateMerged method to merge a list of child effects without having to manually set the tricky parameters.

The only thing that seem's to be blocking this is currently if emission is set to 1, the particles won't spawn until a second later. I'm going to modify that behavior so that it will alway spawn particles on startup when emssion is not zero.

Thanks for your question, it pushed me to refine my designs on particle systems. I appreciate your feedback :-)