Change global material parameter

I can change dynamic material instance parameter in blueprint.
However, let’s say i have a thousand instances of a grass patch BP, and that wind speed or direction is a material instance parameter.
How would I change the global material’s parameter, so that it affects every grass patch ?
I imagine having a dynamic material instance for each one when the parameter is the same for every one is quite wasteful and possibly slow.

Another use case would be for changing a cubemap from day/night on all buildings in the scene, i wouldnt want to give each building a dynamic material instance, when it’s a global change. Or when it’s raining, you’d want all outdoor materials to have an additional wet layer.

Try using Material Parameter Collections. You can create them in content browser and define parameters. Then you can reference those parameters in blueprints and materials.

How would you apply the collection globally ? There isn’t much docs on Material Parameter Collections.

Look into Material Parameter Collection. You can use a general parameter for a collection in your base material and change it in run time via Blueprints.

Create a Material Parameter Collection in the content browser and set a Scalar parameter inside it, then create a Collection Parameter node in the material, for roughness lets say, and pick the collection and parameter you created. Finally you can go to the level blueprint, create a Set Scalar Parameter Value node and execute it whenever you like by using a timeline to make the transition.

For this to work properly for your situation you may want to multiply the collection parameter with material instances’ scalar value though, instead of using a single value for the mat. instance.

1 Like

This does exactly what i wanted ! I’ve marked your answer as accepted, thanks !

Is it possible to use a Material Parameter Collection per Material Instance?

I would also like to know if it is possible to use a Material Parameter Collection per Material Instance!!!

That would be done through a Material Instance parameter. Material parameters are great for modifying individual actors/materials, Material parameter Collections are great for modifying things globally.

Right is how it is in the tutorial
Left is what i see when i double click my collection. No details, can’t do anything