since you can't have multiple override material per renderlayer, I need to create one material that assigns different nodes depending on the ObjectID. At the moment I use a combination of 'mix' nodes with 'greater than' nodes driving the blend value. This setup assigns colors for IDs 11-13 and renders everything else black. I would rather have a switch node where I plug in an integer at the top, and having color or material inputs for each number. Does such a thing exist? (Also could I use a custom attribute instead of ObjID? ...but that should probably a seperate question...) thx
Since there is no switch node, I just created groups of the setup that I did earlier (switch shader and switch color). It's limited to 10 inputs, but that should be enough for what I'm doing...otherwise I will extend it. But a real switch node where you can set any number of inputs would be great...just sayin...
I asked an almost identical question a few days ago, and came up with my own node group. Instead of using comparisons, it uses Mix Shaders (but could easily use MixRGB nodes instead) and Subtract nodes (this works because the Mix shader clips its Fac input).
Unfortunately, extending it requires editing the node group, but it's mostly just copy/paste, so it shouldn't be too bad. (You don't have to edit the numbers in the Subtract nodes at all.)