Announcement

Collapse
No announcement yet.

Vray SwitchMTL and Cryptomatte

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

  • Vray SwitchMTL and Cryptomatte

    Hi together,

    we have a issue when combining Vray SwitchMTL and Cryptomattes (NodeMaterialName)
    we like to switch our Productrendering from the Buggy State Sets to a Setup with Vray SwitchMTL, so far so good it is working fine when we want to change eg. from black to a white color setup.
    our setup is based on a postprodution nuke setup which is based on cryptomattes. so after the new setup with the vrayswitchMTL the crypto mattes changes (of course we understand that, it ueses the materials that are applied)
    but all submaterials are gone and we found no way of accessing them over crypromatte.

    is there any workarround or might be a feature of the VraySwitchMTL...."passthrough cryptomattes" possible?

    many thanks,
    jens


  • #2
    If I understood correctly, you have i.e. a Multi/Sub-object node plugged in the VRaySwitchMtl and in the Cryptomatte, you wish to see the sub materials as if the Multi/Sub-object is applied to the object?
    Aleksandar Hadzhiev | chaos.com
    Chaos Support Representative | contact us

    Comment


    • #3
      hi alex,
      that material which is rendered is correct but the cryptomatte show onyl the swicthed materials in the scene and not the submaterials, i think because it reconize only the apllied material and this is the switchMTL.

      bye,
      jens

      Comment


      • #4
        It shows the sub-materials on my end. I'm attaching a sample scene, where two objects use the same VRaySwitchMtl, where the Switch is driven by a UserScalar node. It might be something specific in your case. Do simplify your scene and attach it here so that we can take a look. Which V-Ray version do you have installed by the way?
        Attached Files
        Aleksandar Hadzhiev | chaos.com
        Chaos Support Representative | contact us

        Comment


        • #5
          Hi Aleks,

          yes your setup is working because of the user scalar that get its values from defining in the objectsproperties itself (eg. switchcolor=1) than the switchmaterial uses the material below. but in our case we cant write in any object properties and we need to be flexible so switching material for eg. more color versions, have to be done in the material itself.

          please have a look into the simple scene from you changed to our case.

          many thanks jens

          Attached Files

          Comment


          • #6
            Okay, so it's basically my first suggestion. Sorry to say, currently, it's not possible for Cryptomatte to show the Multi/Sub-object sub materials like that. However, I've logged an issue (internal bug-tracker id: VMAX-13231) about it for developer investigation. I've written a little script that might help you out - it replaces all VRaySwitchMtls with the appropriate nested material based on the switch value. Test it out and see if it can be used as a workaround.
            Last edited by hermit.crab; 18-04-2023, 02:43 AM.
            Aleksandar Hadzhiev | chaos.com
            Chaos Support Representative | contact us

            Comment

            Working...
            X