I saw this thread and was reminded of a rather longwinded reply I sent to somebody asking the same question a few months ago.
The tl:dr version: it may give you a small perf gain to share materials, but just do whatever is the easiest for your workflow and don’t try to make the material too crazy or you will bog yourself down debugging it etc. Also it doesn’t make it any faster if its a material instance dynamic versus material instance constant (meaning and instance you make by hand).
It would probably take a mathematician to find to absolute point at which adding to a master material becomes counter productive. It doesn’t take long before the permutations are in the trillions and it depends on how the flags are actually used in determining savings. In theory every instance could be unique and thus wouldn’t get any benefit from the shared master.
In general it is wise to break things up before the master material becomes too complex since as you guessed there can be a large tech-debt to understanding complex master material when artists have to wade through mostly options that do not apply to them. And once the combinations climb into the trillion, there could actually exist combinations that do not work nicely that you have a lower chance of discovering. So debugging could become a challenge and it may not be super efficient but other than that there is nothing stopping you from making a whole game using one material. Gears 1 and 2 used the same master material for maybe 50% of the assets but there were always people whod rather just use their own materials either because they wanted to, or the master material scared them.
There is no right or wrong way to break up the material. But you have to ask yourself what is the benefit of sharing the master material. If you are talking about mostly world geometry, master materials can be useful since they unify the way things are done. Ie, every ‘cracked wall’ material in your level would ideally use the same master material. Then you might want to also share the same crack system for floors and other types of stone as an example. That is the perfect use case for expanding a material’s functionality IMO…
But does it make sense to try to jam translucency FX options into the same master material? Technically the engine will let you do that now that you can override blend mode via instances. I would recommend against doing it though. Doing that wouldn’t give any savings since the translucent instances would need their own compiled shaders anyways so you likely just made the base master shader more complicated for no reason and it added to the time artists spend making the simple crack floor material.
So in general I would break up the master materials light based on what they do in the world. If you can get away with one single type for your whole environment, more power to you. But I would not let such a system add any limits to your creativity. There may be lots of neat little effects that you can only achieve by radpidly knocking out unique materials that would take too much time to smartly integrate into a huge master material.
When it comes to doing things that affect the game in multiple areas, we have started using a slightly different approach where we really on Material Functions that are designed to be used anywhere using the Material Attributes pin. So even if we use a few different base shaders for our various enemies, they all get the same material function for doing some of the FX hookups. So that is kind of a different way of breaking things up and using functions to define the common ground. Another similar cases exists with Material Parameter Collections. You can sometimes use a handful of MPC values to avoid doing constant updates to lots of MIDs.
Keep in mind that the point at which a shader goes “too far” in the options department can approach quickly, so sometimes the only way to know you went too far is when artists start complaining they don’t understand it. Hopefully you can work with the artists and gauge their tolerance for shader shenanigans before that happens.
I hope this helps.