idea: Script to assign different colors to all surfaces for Material ID canvas
SnowSultan
Posts: 3,773
I was experimenting with Material ID canvas renders today and noticed that most items load into a scene with black material ID settings. Does anyone who is more familiar with scripting know if it would be possible to write one that when run, would assign a slightly different color to every material zone so that it didn't take hours to set the colors for every surface manually?
Also, are Material ID renders supposed to be non-anti-aliased? That doesn't make for a very useful mask.
Thanks in advance for any thoughts.
One more thing, does anyone know how to load an Alpha canvas EXR render in Photoshop with an actual alpha channel or transparency? You're given the option to import them with either one, but neither actually seems to exist once it's loaded.

Comments
I'd thought the colours were randomised on render, if left at the default. Anyway, it's a named surface property so yes it should be scriptable to assign a value to it - the trickier part would be working out what colour to use.
A few materials seem to be assigned different colors, but the vast majority weren't. I don't know what the reasons are, haha. Yeah, I don't know anything about scripting but that does sound like it would be the problematic part.
Do you happen to know the answers to my other questions? Why the Material ID renders aren't anti-aliased and how to use an EXR alpha render? Thanks in advance.
I didn't have a lot of success loading .exr files into PS CS6 - I believe there is a third party plug-in that will do the job better.
Yes, the scripts in Oso Toon work regardless of shader.