"static" particle system?

I am trying to create a field of stars using the particles system.
The issue is that I once they are generated I don’t want them to disappear or generate at other places.
To solve that I simply give them a very long life time and then the same particles stay at the same place for a very long time.
The issue is that now I cannot practically use the “color over lifetime” to make the stars shimmer.

Is there a way to solve this with the particle system?

The only idea I can think of for this is to use a custom shader, which uses the current time to make them shimmer (plus a random animation offset per particle, so they don’t all shimmer at the same time).

This requires knowing how to write your own shaders, or having access to someone who does… :slight_smile:

What shader are you using currently?
And Unity version?

1 Like

Unity 5.5
I know how to write shaders in OpenGL and DirectX(I come from native development) but I need to learn the tutorial on how to edit shaders on unity first.
Well thanks for the idea.

Ah, great!

Then I recommend taking a shader from this page and modifying it: Unity - Manual: Particle System vertex streams and Standard Shader support

If you add the random number stream, you’ll get 3 per particle random number to work with. Maybe try something like sin(_Time.x + random.x) * sin(_Time.y + random.y) to give you something cool to multiply the particle alpha with :slight_smile:

Good luck!