Using blueprints to access material instance dynamic parameters; bulk-access of parms possible?


I have a fairly nifty (for my needs) water material. Tonne of parms, all work great, but when using a blueprint to set them (I use z-position of the mesh it’s tied to and a few other vars that are dependent on position and the like) in the construction script, I seem to have to discreetly set a scalar parm, another scalar parm, etc. These can be exposed as vars in the BP to make the material instance dynamic Is there a bulk way to access the parameters in a material?

I can see where I can at least GET the set of scalar parms but not seem to assign then to exposed variable where they show up. See attached pic, New Var 1 is a array derived from the available material scalar parms. Tooltip shows that they are there, but they don’t seem to make it to anything where I can just ‘get, expose, access in editor’.

Is there a way to get at a material parameters in bulk where I don’t have to manually lay out each and every one discreetly in a blueprint? What am I missing?

In the attached pic, I can get/see the parameters when I tooltip (Target -> Scalar Parameter Values) the get but when I try to assign to a variable/expose, it’s got 0 elements in the editor (NewVar 1 is empty). I’m surely missing a step? If I can get/read the variables, how to can I create a structure to capture, expose to the user so I can write them back to the instance?

Do I need to lay everything out manually, var by var? I have a TON of things I can tweak…

I don’t know for sure, but unless everyone else is wrong as well, I don’t think there’s a way to do it. All marketplace content I’ve ever seen always has a massive stream of set commands in the BP.

You can use parameter collections if you need to setup more than one material.

UGh, I thought it might be thus. The idea being that I might go back and tweak the material/shader and it’d be nice to be able to not have to go back and discreetly add another node, etc.

It just seems ODD that I can certainly read/access the scalar parameters (in my case), and the BP’s tell me that it can be copied into a new array (green checks all the way), yet that array shows as empty…grrr. I’d almost call this a ‘bug’ in that the expected behavior is to be able to read/move data; i mean if I can read it I ought to be able to at least copy it?

I can do this type of thing with other data-parts yet on a material-instance-dynamic, no…

I’ll keep plugging away to see if I can make this work; it’d be a real time-saver for us.

As always, thanks for the feedback!