minObjectID

My lat­est shader assigns each object in a scene a dis­tinct, ran­domly selected color, the so called Object ID. I have decided to offer this shader as a free down­load to the men­tal ray com­mu­nity.

minObjectIDminObjectID

An Object ID pass isn’t exactly pretty, but it is incred­i­bly use­ful because a com­posit­ing artist can apply effects or cor­rec­tions to indi­vid­ual objects or spe­cific areas with­out the need to ren­der sep­a­rate masks or even paint masks by hand.
My approach to this shader is some­what naïve in that it ran­domly assigns a color to each object with­out regard for adja­cent object’s col­ors or pos­si­ble rep­e­ti­tions. How­ever, the chances of the same color being picked twice by the algo­rithm are so small as to be neg­li­gi­ble for all intents and purposes.

Download

Down­load
minOb­jec­tID is a free shader for men­tal ray (Win­dows x86/​x64 and Mac OS X)

Usage

Once minOb­jec­tID is assigned to your objects just hit ren­der and you’ll have a ran­dom color on each and every object — no need to man­u­ally spec­ify object– or label IDs.

Note that this shader’s out­put is not com­pat­i­ble with Nuke’s or Fusion’s Objec­tID for­mat as it does not save to an inte­ger buffer in OpenEXR files.