Using Dynamic Material Parameters with Decal Component Renderers in Niagara

Is there a way to control paramaters of material instances which are used by Decal Component renderers?
Im trying to set the opacity in the material from the emitter (or even the Actor, which has the Niagara System as a Component). I also need to be able to do it for each particle individually, which I’m trying to use the NormalizedExecIndex for.
Or is there another way to do this? I cant seem to set the decals opactiy directly without using the isVisble flag, which would make fading impossible.

Any help is appreciated! :slight_smile:

You will need to use a dynamic material instance. The documentation mentions them a bit here
There is a blueprint function you can call on the decal component to generate a dynamic material instance.

I noticed a similar issue with this, where it works fine with normal Material Instances.

What you can also do if you wanted to avoid any blueprint code is scroll down to the Attribute Bindings and essentially all your Parameters are exposed there and you can just bind them yourself to variables you make up in Niagara - you can just put them in a Set Param module and build any floats/curves etc that you want.

It means you also aren’t limited to 16 indexes of control that Dynamic Params offer

2 Likes

Hey,
Had to face the same issue when I first tried to use the decal renderer. I found a very simple explanation for this issue.
Take a look inside the “Binding” section of your renderer !

If you look at a sprite, mesh, or ribbon renderer, you will find those variable binding inside the “Binding” section of the renderer :


(the one above is coming from the sprite renderer)

Then if you look inside the decal renderer, the variables related to dynamic material parameter are missing :
image
In conclusion, the decal renderer and the dynamic material parameter node in materials are simply not connected at all when using a decal renderer.
You can also see that other parameter binding are missing, like the “Material Random” that should be linked to the “ParticleRandom” node in some materials.

I had to ask for some help modifying the engine at work to make those “missing” parameters work. :smiling_face_with_tear:

Just want to say you can only use User/System/Emitter variables when it comes to direct material parameter binding.

Dynamic material parameters are meant to animate some values based on the particle life (or any other data available in particle stage).
With material binding in you renderer, you can only animate those parameter with the emitter life (or any other data available in emitter stage).
It can be very very usefull in some cases. Like changing a value on a material instance without creating a duplicated version of this material inside your content browser. Or like animating particle material with the emitter looped age.

1 Like