I’m in dire need of a script that automates the process of creating Matte Passes, but I lack the programing knowledge to put something like that together. If anyone here is up for it, you’ll be doing the Maya community one giant favor.
Here is what it would entail:
[li]For each unique selected object in the scene create a new “Contribution_Map” for the current Render layer.[/li][li]Create a new Matte Passes for each selected object. Change the name of the matte pass to the name of the object with a “Matte_” in front.[/li][li]For each Matte Pass Attributes, change the data to 8-bit and channels to 1.[/li][li]Add the Matte Passes to the corresponding Contribution Map.[/li][/ol]It would be really nice if the created Contribution Maps where renamed to match the objects as well, but it’s not 100% necessary.
This would let us easily render out an EXR that has selectable channels like this in your favorite composting application. For example:
Matte_Eyes Matte_Teeth Matte_Shirt Matte_Face
As you can imagine automating this setup could literally save days of setup in complex scenes that require a large number of Matte passes.