Hi, my use case here is, I have an environment with a tons of static models already in the level. I need to apply kind of an effect material that’s blended on top of the entire scene.
So my thought is: at the game begin, I get all static mesh actors, create a blend material instance, with one input being an instance of its own material and another input being the effect material. But the problem I hit is that, as far as I know the material layers only work with materials set up using material attributes. The original base materials are not set up using material attributes. So I wonder how can I achieve the goal in this case. Is there way to convert a base material to material attributes at runtime using blueprints or there’s other approach to achieve this? Hope this makes sense to everyone. Thank you in advance!
Hi there!
The best way to do this is going to be through a Material Parameter Collection. MPCs allow you to have one exposed global control that affects multiple materials, making it really good for things like player location, wind and weather effects, and also this.
Here’s a good video that breaks down what MPCs are and how to implement them (love this guy)
The only downside of this is that you’ll have to go through your master materials and manually add the lerping object to each one. Luckily, it should be pretty copy-paste.
I would also ask the question though- if you need to create a blend for the entire scene, have you considered using a postprocess material instead?