Anounce : Material Matte Pass Creator


#25

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.


#26

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.


#27

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!


#28

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!


#29

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.


#30

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


#31

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:


#32

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…


#33

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. :thumbsup:

-Jason H.


#34

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.


#35

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


#36

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.


#37

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


#38

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?.


#39

// 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.


#40

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


#41

Thank’s for the info, I thought I was doing something wrong :slight_smile:

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.


#42

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


#43

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.


#44

Hello,
Very interested in your script, and trying it out tonight. Everything seemed fine, and it even rendered blazing fast as predicted, but I have no luck working with the .exr file itself. I am very new to .exr files so if my question is outside the scope of this thread, feel free to say so, and I’ll render it out using another file type or continue searching for info on .exr usage or perhaps make peace with CGB and ask for his help or something…

Here’s my raw render:

And here’s my Material Matte render:

Now I wasn’t expecting them to look the same, but merely expecting an .exr file with tons of layers which I would use as selection tools for my main scene, thereby isolating the shapes based on their materials for further refining in Photoshop. The technique I’m familiar with and can handle, but your script is truly a far, far, vastly quicker way of rendering alphas out for compositing instead of one by one or making separate scenes for each or all the ways I’ve been doing it before.

But in Photoshop my .exr file has only two material-objects out of all those in the scene, an “alpha” layer which correlates with the second image I posted, and then all the expected layers corresponding to all the proper materials, named properly, from my Maya scene. But all these other layers were blank, and that’s where I’m having an issue.

Any ideas what I’ve done wrong?

Meanwhile, gonna render out a .bmp pass or something and see how that goes, in comparison… And try to get a handle on how to use .exr files, hopefully! The .exr documentation is rather straightforward and kinda assumes you know what the hell you’re doing, which I do not… (grins)

Update:

Just rendered out to .bmp and had the same issue. Folder structure was beautiful! But, all my images were flat black. I don’t know what I’ve done wrong here.

Am I not able to just select all my mia_material_x shaders in Hyper, run the script, then render it out? Should I be selecting their Maya base shader instead, such the placerholder lamber/phong/blinns I have connected for Maya software rendering?