Multiple materials per polygon? I need a way to have multiple materials per polygon. Basically what I want is to have one "layer" of materials to create a colorID mask and another "layer" to export a mesh with the correct Texture Sets for Substance Painter (the latter creates a separate texture for each material the mesh has). In most of my cases the two don't match (I want multiple colorIDs on the same Texture Set-material) so I idealy need a way to have a single mesh, which I can dynamically change, while having two layers of materials on it, where I can disable/enable a single layer to make an export.

I thought of have a feeling that one can do it by splitting the object in blender into several objects and then writing a script that assigns a single material to each object, but It would be preferable for me to have a single object with two material layers.

Another idea I had is to use vertex groups, but they are invisible in viewport and should still be manually selected to apply materials every time before export (and I do export often). Maybe there is a modifier that can allow two cloned meshes on two different layers, both of which change whenever you change any of them, while maintaining unique materials on each layer?
Maybe this can be realised (if I understand your question correctly, that is) by utilizing Blenders ability to link materials to the object instead of the object data, as it does by default. What I'm talking about is this little dropdown here:



What that does is, it tells Blender to keep track of Material assignments by storing the assignment on the object instead of the object data (the mesh itself). The trick now is to use instances of the same object, and assign different sets of materials to those instances. You can instantiate the objects using Alt + D, and verify the presence of an instance if there is a number appearing at the mesh datablock:



Now, if you have a setup like this, which the three heads instanciated:



and you move a vertex in edit mode:



after getting back to object mode, you have this:



So you can now edit the mesh once, but export different objects with different materials at any time from it.