In Niagara I have a “Skeletal Mesh Component Renderer” with animation and want to change it’s color, but can only set a Material Override that can’t have User Parameter.
Is there any way I can change the color via BP?
In Niagara I have a “Skeletal Mesh Component Renderer” with animation and want to change it’s color, but can only set a Material Override that can’t have User Parameter.
Is there any way I can change the color via BP?
Hi there @espr3ss0,
What you’re really looking for is a way to communicate a variable to each particle, which will need to be done inside the Niagara System since a blueprint can’t loop over each particle (well, there is something called Data Channels, but you don’t need that right now). I’ll walk you through how to do that, and if you want to then expose it to Blueprints, you can.
To make color changes within a Niagara System, you’ll want to use Dynamic Material Parameters. This is what allows Niagara to send information to mesh materials. you can create a variable-let’s call it MyColor. (If you want to later expose this to User Parameters you can just put your parameter in for the value).
Then, we’ll create a Dynamic Material Parameters module. Technically, it only accepts floats as inputs so we’ll need to specify R=MyColor.X, G=MyColor.Y, B=MyColor.Z
Then, you can use these input values within your skeletal mesh material.
Keep in mind, you can pass values in other than just color. The one I use the most is Normalized Particle Age to control effects over an individual particle’s lifetime. Also note, as you can see here, you can write to up to 4 indexes, AKA send up to 16 floats to your material.
I have already tried that, it works with a Static Mesh but not with the Skeletal Mesh Component Renderer.