- Home /
Multiple trails behind one particle?
Hey, just started playing with particles on Unity. I was just wondering if it's possible to have more than one trail attached to a single particle?
If I add an additive trail behind my particles it sometimes ends up being overly bright. I'd like to add an alpha blended trail behind the first trail to help it stand out, but that doesn't seem to be possible since there is only one 'trail module'. I tried adding a sub-emitter, duplicating all velocity related properties, and adding a trail to that, but it doesn't line up perfectly and the trails end up separating. The only other potential solutions I can think of with my current knowledge would be to manipulate GameObjects instead of particles and attach multiple TrailRenderer components to them (basically making my own Particle System from scratch), or maybe there is some way to add more trail modules to an existing particle system through scripting.
Answer by ifurkend · Dec 13, 2017 at 07:25 AM
If you can write c# script, just generate a random uint value within range like -1000 to 1000 for the randomSeed property of your 2 particle systems. Otherwise uncheck Auto Random Seed and give both systems the same seed value. As long as they are not given randomized force, the particle pattern of both systems will be identical.
using UnityEngine;
using System.Collections;
public class sharedParticleSystemSeed : MonoBehaviour {
public ParticleSystem[] particleSystem;
uint seed;
void OnEnable() {
seed = (uint)Random.Range((int)0,(int)10000);
for (int i = 0; i < particleSystem.Length; i++) {
particleSystem[i].randomSeed = seed;
}
}
}
Another option without duplicating particle system: If you use HDR Bloom post-processing effect, give your alpha blended ("Fade" render mode) trail an additional "emission texture" and some emissive power via the Standard Shader or Stand Particle Shader (unlit), the latter is available from 2017.3 (still beta).
Thanks, that helps. Using a second emitter with duplicated settings isn't very ideal, but I guess it's the best workaround for now. I'll probably just try to avoid using two trails when I can and ins$$anonymous$$d rely on other methods like the emissive material elements you described.