idea: Script to assign different colors to all surfaces for Material ID canvas

SnowSultanSnowSultan Posts: 3,773
edited June 2018 in The Commons

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.

Post edited by SnowSultan on

Comments

  • Richard HaseltineRichard Haseltine Posts: 107,953

    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.

  • SnowSultanSnowSultan Posts: 3,773

    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.

  • AlmightyQUESTAlmightyQUEST Posts: 2,006
    edited June 2018
    I think the script that comes with Oso Toon Shader does what you are asking, it assigns random colors for material ID to surfaces or by object. I am not sure if it will work regardless of which shader you are using, I can try it later, but I think it is the same idea if what you are asking for.
    Post edited by AlmightyQUEST on
  • Richard HaseltineRichard Haseltine Posts: 107,953

    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.

  • Oso3DOso3D Posts: 15,085

    Yes, the scripts in Oso Toon work regardless of shader.

     

Sign In or Register to comment.