Changing Color of Particles at Spawn

Hello,

I made a particle system using the vfx-graph and would like to change the color-gradient the particles use at spawn time. Right now, when I change the color gradient in the output graph, the color for all existing particles changes. I only want newly spawning particles to have the new color, the already existing particles should keep their color gradient until they die.
I tried putting a “Set Color over Life” block in the spawn node, but that did not work (the particles did not get rendered at all).
Can someone help me out?

Hi @woodwindblues ,

You almost had it; putting the block in Initialize was the right move, just change the Set Color over Life block to use Random instead of Over Life (as the lifetime will be 0 as the particles would have just been born, so you would always sampling the first bit of your gradient).

Thanks! I was hoping to assign the gradient for the whole lifetime of the particles at spawntime, but it makes sense that only the first color of the gradient gets assigned. I guess I’ll only use singl colors then.