How to set particle color over time parameter?

Hi there,
It’s the first time I post so I’ll try to be clear.

I have a particle system, with some emitters, one of them has a “color over life” parameter. I would to know if I set the points of the curve as parameters, I mean, for example: My particles change colors from a “cold color” to a “hot color”. There is only one parameter with the Distribution vector particle parameters. Is there a way to do that?

you to read.

Hey ,

I want to make sure I fully understand what you’re asking. Are you attempting to change your particles color from one extreme to another, for example: changing a blue flame to red? Or are you trying to do more than just that?

!

I’m sorry, I’m not that much good at explanations.
With the “Color Over Life” module we can change particle color over the lifetime, choosing some colors, example: green to blue to red, adding “points” to the “Distribution Vector Constant Curve”. But if I use the “Distribution Vector Particle Parameter” to allow me to change the colors of the “points” I get only one value to change. I would to know if there is a kind of “Distribution Vector Constant Curve Paramaters” or a way to change to different colors value outside of Cascade.
The “cold color to hot color” is just an exemple.
I hope I’m not incomprehensible with my english.

Hey ,

What you’d like to set up is the Vector Particle Parameter in Blueprints. Here is a great [tutorial][1] that will assist you with achieving the goal you’re looking for. The only difference between what you want and the tutorial is that you want the values to change via a timeline. So, once you have the parameter set up in cascade, you’d complete the rest within a blueprint.

Cheers!

A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums

Hey ,

Unfortunately, I have not heard from you in quite some time. For tracking purposes, we must close this thread at this time. However, if you have any additional questions regarding this topic, please do not hesitate to comment back on this thread.

Thank you!

Hi there,

I believe I’m trying to accomplish the same thing as the original poster and your answer doesn’t completely make sense to me so I was hoping for some clarification.

I want to essentially parameterize ColorOverLife so that I can have, just like you suggested, a blue fire or a red fire depending on blueprint conditions. I want to use a single particle system. My goal is to be able to the out value on the “over life” curve to be different shades of either blue or red.

Since you can’t feed a curve as a parameter (why? seems like a common use case) I need a way of changing the ColorOverLife at runtime. I followed the tutorial above but the dynamic param node, which each emitter can only have one of, can only use constant floats. Additionally, I see no way to access the values of the dynamic node from a blueprint. Of course you can set the type of each of the 4 “dynamic” values to be parameters, but then the problem remains…it’s not useful since I’m looking to parameterize a curve.

How could I achieve the “parameter vector curve” that I want to do on ColorOverLife? The reason I don’t simply duplicate the particle system and change the ColorOverLife is because I want the ability to add any number of different fire colors. Duplicating particle systems and swapping them in blueprint is not exactly modular or scalable, especially when there are more than just fires that I want to change color in this way.

Any help is appreciated. !

Hi ArjunTheMiella,

There are a few workaround methods that will allow you to set the colors of the color over life module. Here is an example for changing two colors (this example assumes you have some experience with cascade and blueprints):

  • In the color over life module make it so that it goes from black to white over time
  • Set up the material so that the particle color goes into a lerp node for the two colors you want (screen)

  • Next in blueprint create a Dynamic Mat based off the particle Mat and you can set those particle parameters. (screen)

  • With this setup you can change the colors via Blueprint and just change the rate of change in Cascade editor.

Here is a [video][3] showing it in action. If that isn’t what you are looking for or I misunderstood let me know in a comment!

Cheers,

Ed

Hi, I want to add something to your answer;

The particle emitter has to be active in order to get the material instance and the overridden colour.

If the “auto activate” checkbox is not checked for your emitter, you have to set the material instance after you activate the emitter.

Not sure if it is a bug of my current version (4.14.3) but I struggled a bit with this issue so if it can avoid someone losing 10 minutes too.