[UE4] Setting up team colours for a set of effects


So there is this problem whereby I would like to set up a set of vfx to have different colours based on the team they are assigned to. The plan was to make this easy and expandable. I thought that the easiest way to do so, was to let the colour changes be driven by a hueshift in all the materials so you only have to access the parameter for hueshift for all the materials. I’m now just stuck on setting this up. I’m just now starting to get into blueprint a bit more, so forgive me if my way of thinking sound silly.

I wanted to leave material instances/ colour parameters per colour related node in all the FX out of the question since it would probably be quite a hassle to set up (unless there is no other way ofcourse :p)

What I tried:

  • Pick and choose a parameter collection within the material. But that would still leave me out of the option to access all of the materials globally since I still needed to change that switch parameter on an actor level.
  • Setting up a “colour profile” with a parameter collection. But that would lead to the same problem as option one.

Thanks in advance!


You’re on the right lines with BP it just isn’t as much of a hassle as you think :slight_smile:

Here’s what i would do - set up all your particles to have a Dynamic Parameter called Hueshift or something. Set the Parameter Distribution to be Particle Parameter. Now whenever you Spawn a Team Actor you assign a Hueshift Parameter value based on the Team and then pass that to the Particle by way of the Dynamic Parameter and that will propagate to the material.

Doing it with lots of Material Instances would be possible but, like you say, quite a hassle - if you use the Dynamic Parameter in Cascade to do it then it’s just a case of setting the value each time a PFX is spawned.

Hope that helps

PS if you wanted more colour control you could use your ‘Hueshift’ value to control the V channel of a packed Gradient map - so you get a full colour spectrum remap rather than just a hueshift.


Thanks you so much for the quick reply :smile: . I’m going to give that a go! Also really handy tip for the gradientmapping. Sadly I didn’t use gradient mapping in this case. But definitely will do so more often in the future :p.


Yes! That did it :D! The only extra thing I needed to was reference the particle parameter (in this case it was hueshift) in the BP. Then break that parameter so I can grab the float value and name from it. Then feed this into all the corresponding “set float parameter nodes” for all the FX in question.

Thanks again for the help :smile: