great job guys … cool … do you think we can have the option to output different matte colors … such as this img …
Anounce : Material Matte Pass Creator
RGB Matte passes are actually a bit harder to manage in practice because you need to develop a naming convention that takes into account all 3 objects in the Pass. What djx and I have developed instead is an easy method of organizing your Mattes based on naming conventions in your Maya scene, while still giving you the option to create custom Mattes that don’t follow the structure.
Using RGB mattes can save a very minimal amount of file space, but I’ve found it’s just not worth it when you have many Mattes to manage. It will always be harder on the compositor and requires more setup in Maya, no script can change that.
gotcha … quick question that might be pretty easy …When I render with the new script … there are a few more options … the one that im using is using a multichannel .exr to render all my mattes and each of the mattes have their own PCM … so when I bring it to Nuke … I cant figure out how to split the different channels so I can use them for color correction … Im using the “shuffle copy or Shuffle” with no luck … can anyone shed some light one this … thx. with the RGB matte I just use the expression node to get each color.
Genius! Great script! Indeed a time saver!
Thanks for creating this Christopher.
Thanks for the mods David.
Can’t wait to see current future mods on this gem!
Thanks! This is a great time saver.
We actually just finished up a production in December where we had just tons of RGB mattes…I don’t even know how long I spent just creating layers and updating a spreadsheet to keep track of it all. And now we are ramping up on the rendering side of things for a new project and this will be a huge help!
So Thanks again!
Went ahead and started testing this and everything seems to be working well.
Is there any support for objects with multiple shaders assigned to an object on face level? I gave a sphere a chunk of faces in the middle with a different shader, and each channel in the exr was the objects alpha. I have heard that the contribution maps don’t hold up quite as well when there are shaders like this so I don’t know if it is possible.
But awesome work, really is a huge time saver. Thanks to everyone involved in the creation.
Sorry. No support for face level assignments.
I’ve had so mamy problems with face-level overrides in render layers that I did not even try with pass contribution maps. I’ll look into it though.
– David
Yea, I have had a ton of issues with face level shader assignments in render layers as well. Especially within references…but that is going to take this thread off topic and theres a lot of info about this bug already.
To let you guys know, ive now used this script in two productions and it is really a huge time savor and seems really stable. We currently have an environment that is full of neon signage, all of which is getting its glows added in comp, and animated blinking and flickering in comp as well. It would have been a process of setting up a couple hundread matte passes for the shot as its a really heavy environment, but now it has become nearly a button click :bowdown:
I’m really happy to hear this is working out well. I haven’t even been able to put it into practice on anything serious yet. Soon…
Finally got some time to test this great script. Thanks a lot Chris and David.
The script is pretty robust and, even better, working with deex shader. ![]()
-Jason H.
I’m going to try this in a project but I wanted to ask you something…
Does this work with mental ray’s mix colors node as material?. My setup for trees for example (although I use that setup in many materials) is to mix the trunk and leaves materials in a mix node (separate with different UV sections) and even MAYA doesn’t recognize it as a material when asigning to objects, that’s why I’m asking.
Will your script take those shaders into account?.
Thank’s in advance.
No. It will not work as you want with multiple materials that are mixed like that, because it actually uses the SG to choose the objects, not the materials themselves.
If your leaves and trunks are seperate meshes, then you could get matte passes by using object selection instead of material selection.
David
They cannot be selected because they are mental ray proxies, so they are just a cube.
Is that hard to implement this thing?.
Thank’s in advance.
Is it hard to implement? Maybe. I’m not sure. Mentalray pass contribution maps are lists of shapeNodes. These are how the matte passes are being created by the script. I cannot think of a way to extract the information required from the proxy.
David
I’ve tried this script and found that I don’t understand it if I’m doing everything right…
In my scene, when script is applied, it creates a render layer called matte, but when I go to it and make it active, all my objects appears as wireframe in the viewport and grey in the final render…, the script doesn’t give any errors BTW…
Is this normal?.
// Error: file: C:\Documents and Settings\bastian.traunfellner\My Documents\maya\2011-x64\scripts\MaterialMatte.mel line 35: Can’t rename a read only node. //
that’s what I get!
kinda strange.
joie: yes that is normal. The Matte layer has a material override and usually all the objects will display with just wireframe (although sometimes you will see some are flat shaded).
When you render a beauty pass is created for that layer and everything will be black, unless you have default lights enabled in your render settings, in which case everything will look like a grey lambert. You can delete the masterBeauty images, but you should also find folders with your matte passes. These are created at the same time as the beauty render and cannot be created without it.
Sorath: I have no idea what the error is. Do you know what version of the script you are using? Can you open it in a text editor and tell me what is on line 35?
David
Thank’s for the info, I thought I was doing something wrong 
If this script could handle mixed mr materials would be awesome…, now I need to select the shader that is conected to the shading group as shadow material (the shader connected to the material slot is the mix_color node and the script doesn’t recognize it as a shader) and then the script is able to find the attached SG, no other way works.
I may be able to fix that. I’ll let you know if I do.
I cant do much about mixed materials into separate passes though.
David
Thanks, it will be a great adition since I use them now a lot, specialy when dealing with trees and such. I guess the mixed materials on passes is kinda impossible to do, but I think I can manage myself with an alpha of the entire tree if I must to.
