Can you change particlefx colour at runtime?

I’ve tried changing the tint of the emitters in my particle effect but it seems to not have any effect (I have no clue how the shader uses it) and there isn’t any alternative option that doesn’t involve making a completely custom particle system or hand animating the effect, which I’d rather avoid for the time being

I’d just like to know if this is possible as of now. I’m ok with it not being possible, I’d just like to check before I do anything major

Thanks in advance `:)

1 Like

How have you tried changing the tint, in the material?

If you open up particle in the editor and select the emitter in the Outline panel you can find properties for Initial and Life colors Red/Green/Blue Also you can check the Blend Mode, selecting Add will give nice saturated color results.

Here is an example where I set colors red and blue to 0 and only use green.

For the particle image itself using a white or grayscale hue might work best when taking advantage of coloring your particles with the engine. You can preview the particles with spacebar key. Also the small button next to the values allows you to key colors over time using the Curve Editor if you wanted to.

Edit: sorry about that I may have miss read , I think you can change the particle color at runtime using:

particlefx.set_constant(url,emitter,constant,value)

I did some testing myself and made a working example.

ParticleTest.zip (3.5 KB)

I notice that if the Initial/Life color values are changed in the editor before doing so in runtime then you may get some not expected results as I think these will effect the tint change. Starting with default values and changing at runtime works as expected.

5 Likes