Material having another material as a parameter

In the last few days I have been making a system in which you can paint over things, like in Splatoon or Portal 2’s gels.

I have created a system in which I can paint a model by editing a TextureSampleParameter2D according to my needs in c++

This is the material blueprint:


Once you play a bit and paint the mesh via normal gameplay, #2, the TextureSampleParamter2D is updated according to the gameplay.

My problem is that I want almost every mesh in the game to have the same thing, only with #1 being whatever it was before, but I don’t want to create a new material for every single mesh.

What I’ve thought to do is to add a component to things I want to be paintable that at PostInitializeComponents() or its component equivalent, it replaces the current material with my master material, which is like the one above, but only instead of 1, there is a material parameter that is set to be the old material that was applied to the mesh. That should in theory save me from a lot of work making a new material for every single mesh.

As much as I’ve searched I couldn’t find a solution, and maybe me thinking its even possible like this shows how much I really don’t know.

Is there a way to do this the way I want, maybe using .usf or something? Thank you very much :slight_smile: