Hello,
We have always used the renderID element before to get a pickable object list (unfiltered and then combined with coverage) to get a decent quick and dirty mask of stuff in the scene that you dont have multimattes for. But we set up a way to automatically set up materialID-colors based on shader names and do the same with a materialID-pass instead. As I find you usually want a matte for your shader rather than an object anyway. And this way the materials keep their color for the next render, and not based on the order in the outliner as the renderID is (so they change color and you have to repick it in nuke).
However, I noticed in the vrayhelp it says that the materialID element is not considered for AA (which is a good thing, as you wanna get a clean pick and then add it with Coverage instead). But it seemse this is not the case? The element has a checkbox for “consider for anti aliasing”, but it doesnt matter if its checket or not, the element still comes out with AA included. This render the effect of the materialID element rather useless, as you have to manually do alot of mask eroding, and edge bluring to even get it close to what a non AAed pass with coverage would get.
Would it be possible to either have the checkbox fixed, or AA turned off for this pass? Maybe its just a bug.
Thanks in advance,
Simon
If you mean - to get the render element pass like it was done with a fixed sampler, without the DMC pattern - you can’t. The checkbox is actually working, but not very intuitive, because the AA is still related to the alpha of the fragment and I think it’s not working beyond alpha of 1.0. Maybe Vlado can tell more if you are interested. Check out the this example:
material_id.zip (25.7 KB)
Or you just want to disable the filtering? This option is missing for this element.
Yes, I wanna disable the filtering for this element. So it behaves the same as a renderID and objectID element. According to the manual filtering should always be off (without a control for it, but it seemse to be the other way around).
If it behaved like the renderID I could simply pick the exact color, then multiply the coverage element on top to get a pretty decent mask with AA. And bake this process into a node for a quick renderID picker.
However with the materialID, when you pick an exact color, your’re missing out on the AA that gets cropped away as a different color, and multiplying the coverage on top of that would do nothing. as its already black (which in turn creates a huge halo when used as a mask).
Wouldnt it make more sense to either have a filter control for this render pass, or to turn it off. So it behaves as stated in the help documents and like the render- and objectID.
Ok, I see.The documentation is from this page, right:
The comment there is actually not entirerly true. In 3ds Max, this element has 2 modes - integer and color. The color one is filtered and the integer one - not. You are right, there should be an option, will add it in Maya. If you need this ASAP, you can use this post translate script:
from vray.utils import *
list=findByName("vrayRE_Material_ID*")
for l in list:
l.set("filtering", 0)
It would be excellent to be able to disable filtering via a regular option on the node - but it’s great that there’s this workaround that we can apply right now.
I’ve forgotten/misplaced my notes on how to set the post translate script using python/MEL. What’s the syntax to do this?
- I’d like to make a menu item in our custom tools menu to add this script into the post translate text box.
Ah, thanks.
ptp_code = cmds.getAttr('vraySettings.postTranslatePython')