Announcement

Collapse
No announcement yet.

Material ID render element

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Material ID render element

    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
    CG Artist - RnD and CG Supervision at Industriromantik

  • #2
    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
    Last edited by ivaylo.ivanov; 12-03-2015, 06:03 AM.
    V-Ray/PhoenixFD for Maya developer

    Comment


    • #3
      Or you just want to disable the filtering? This option is missing for this element.
      V-Ray/PhoenixFD for Maya developer

      Comment


      • #4
        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.

        Click image for larger version

Name:	filteringControl.jpg
Views:	1
Size:	148.9 KB
ID:	855555
        Click image for larger version

Name:	rendervsmaterialid.jpg
Views:	1
Size:	263.9 KB
ID:	855554
        CG Artist - RnD and CG Supervision at Industriromantik

        Comment


        • #5
          Ok, I see.The documentation is from this page, right:

          http://docs.chaosgroup.com/display/V...ender+Elements

          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:

          Code:
          from vray.utils import *
          list=findByName("vrayRE_Material_ID*")
          for l in list:
          	l.set("filtering", 0)
          V-Ray/PhoenixFD for Maya developer

          Comment


          • #6
            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.
            Last edited by Fredrik Averpil; 13-03-2015, 07:32 AM.
            Best Regards,
            Fredrik

            Comment


            • #7
              http://docs.chaosgroup.com/display/V...ed+V-Ray+Scene
              V-Ray developer

              Comment


              • #8
                Ah, thanks.

                Code:
                ptp_code = cmds.getAttr('vraySettings.postTranslatePython')
                Best Regards,
                Fredrik

                Comment

                Working...
                X