Announcement

Collapse
No announcement yet.

Material ID - not a default?

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

  • Material ID - not a default?

    What's the reasoning that Material ID needs to be added as an attribute separately when making new materials? I was wondering why a lot of materials on the ID channel were rendering black and just recently realized that it is not a default material property. That doesn't seem like a good thing to me.
    Matthew Valero, ASAI

  • #2
    Hi,

    There is now a better way to generate random colors based on material assignments - with the Material Random Color element.
    The material ID attribute is actually a shading effect that slows down the rendering calculations (a little bit but still).
    That's why we implemented this new element in V-Ray Core that does a similar thing without any shader modifications.
    It is similar to Cryptomatte but outputs an 8bit image, works in interactive and on GPU.

    Hope that helps,
    Konstantin

    Comment


    • #3
      I have found that this also produces black for some materials though.Here is a render I did last week. Random Color did not create ID for 3 of the materials in this example.
      Attached Files
      Matthew Valero, ASAI

      Comment


      • #4
        Now, that is strange.
        Can you share the scene for investigation on our side?
        Vrscene also works...
        Last edited by konstantin_chaos; 30-04-2020, 02:52 AM.

        Comment


        • #5
          Thank you for the scene Matthew.
          I found the issue and it's not gonna be very trivial to fix.

          The Random color does not work for meshes that have the front and back faces painted with a different materials.
          One of the materials can also be inherited from the Group / Component - it's still a problem.

          To find such situations in the scene you can use the Scene Interaction Tool.
          The following 2 examples will cause issues:
          Click image for larger version

Name:	materialAssignment01.jpg
Views:	333
Size:	81.0 KB
ID:	1068691

          You can sort of work around that by making sure that both front and back faces use the same material.
          Note that a default material assigned to the back will not cause the problem - it's handled differently by V-Ray.

          It also seems that the problem is not there on GPU - the GPU handles this situation just fine.

          I'll log this but it'll require a change of V-Ray Core to be resolved.

          Thank you for reporting it.

          Regards,
          konstantin

          Comment


          • #6
            I understand. Thanks for looking into it.
            Matthew Valero, ASAI

            Comment


            • #7
              Hi Matthew,

              The issue we discussed here is now fixed.
              You can read more about this latest update here:
              https://forums.chaosgroup.com/forum/...-now-available

              This particular fix was challenging but I think we got it right this time around.
              Let me know if you find anything else.

              Regards,
              Konstantin

              Comment


              • #8
                That's great news. I also see the material colorize bug squashed, I experienced this on many occasions but I never got to the cause of it.
                Matthew Valero, ASAI

                Comment

                Working...
                X