I’m currently working on porting a few Particle Systems from Unreal 3 to Unity 5. Some of these particle systems use rather complex materials for their particles. A good example would be two textures blended together with a panner on their UVs. This creates rather realistic fire.
I replicated this in Unity, but I ran into an annoying problem. All particles share the same material for each particle. So no matter the time a particle is spawned, its UV is panned exactly the same as a particle that’s about to die, rather than having a “reset” panner so to speak.
The rate of this emitter was 10 per sec, so I figured I could work around the problem by making 10 systems, each with an own material instance of the shader. However, it did not generate desirable results.
Eventually I sacrificed my Vertex Color to pass in Lifetime information (basically setting the R-channel from 0 to 1 in Color over Lifetime) into the shader, so I could make the panner change over the lifetime of a particle and this creates exactly the effect I want (each new particle starts with the same “look”). However, as said, I’m sacrificing my Vertex Color for that and while it works, it’s quite undesirable, as I can’t animate the color anymore now.
Would anyone know how I can workaround this problem in a better way? Is there a way I can pass more information onto the Vertex for use in my shader without sacrificing my Vertex Color slot? Or is there a way to force Unity to not share the same material-instance over all particles? Or is there an alternative way for me to setup my shader and particle system, while achieving the same visual result?