Changing object material to Master material while keeping the texture / color data?

I am trying to do something related to architecture. We have a master material that has some nice material functions to change the visibility, wetness, etc.

I was wondering what would be the right direction of what I am trying to do? Basically, I try to automate the system where all materials that are placed in objects change to our custom material along with the color and textures of the original material. Kinda similar to Twinmotion.

Is this possible without Engine modifications?