Niagara User Param Binding

I’m trying to make Niagara randomly pick a material from the array on a mesh material override. In doing so I came to realize I don’t understand the “User Param Binding” at all. The UE4 documentation is not any help.

What is the User Param Binding supposed to do, and what kind of value does it take?
userParamBindingNiagara
Also I have not successfully been able to create a random material picker this way, so any help there is appreciated.

You can create User.MaterialInteface variable to bind it:


And then set it in blueprint:

5 Likes

This definitely helps, thank you.

This also revealed a slight glitch in my system that might have been the real cause of my problem. Regardless, this is great, thank you!

The last graph doesn’t work for me, but when I break the input link of the Object slot of Set Niagara Variable(Material) and set it directly, it works.

Does anyone know how to do this same thing with python?

I believe python is editor only? So it might not be possible

I’m trying to do this in editor. Writing a script that creates some material instances and applies a specific parent material to those instances which I was able to get working. This script is also able to duplicate a number of Niagara Systems. The part I’m having issues with is setting these newly created material instances to the Niagara Systems user parameter (Material Interface) that is applied to the Material User Param Binding. I feel like this should be possible but idk…

As far as I’m aware the user parameter system is runtime only, so you need something with runtime access like bp or c++

You could have python setup a wrapper class that has the niagara component, and a place to put your newly created material interface, then in that class, on begin play, pass the material into the component using user parameters maybe?

Thanks for your suggestions, thats a little out of scope for me. Thats a bummer about user parameters only being runtime. I didn’t know that. I don’t think the Niagara System Emitter’s material can be set directly but I could be wrong about that. Curious on why that decision was made, I’m sure it was for some important reason.