Material best practices

Some artists have built massively deep material hierarchies - One material pretty much to do all FX

Any change now triggers a major rebuild (10k of shaders)

Are then any tips to reduce the number of combinations?

There are a few things I’ve seen cause this. One being lots of use of static switch parameters in an uber shader, which sounds like what may be happening here. The material will need to compile a version of that uber shader for each combination of switches in use. So, one static switch results in 2 materials, 2 switches leads to 4, 3 becomes 9, and so on. Exponential growth. It’s just something to be careful of, when you can be. If you’re layering materials in that network, you may need to recompile those as well.

So one tip would be to reduce the number of switches in your material to as few as makes sense.

Layered materials can also cause this. Since material layers require functions, if you’re updating those functions, that is effectively the same as updating the nodes in any material using those functions, and so you need to compile all those materials as well.

Another thing that can cause this is complex landscape material setups, since you have to compile the material for any number of combinations between the layers (what happens when grass touches sand? when grass touches snow? When show touches sand? etc.). That may wind up being a necessary evil depending on your landscape, and may not be what’s happening here, but still good to be aware of.

Hope this helps!