Announcement

Collapse
No announcement yet.

materialID coverage

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

  • materialID coverage

    It would be great to have a means to a coverage pass where the final values for the render element are taken from the "material" that makes the largest contribution to that pixel.

    If possible, even better would be a "pixel coverage" element that takes into consideration both renderID and materialID.

  • #2
    I'm not sure I understand what you mean. Could you explain what is the use case for this coverage pass?
    V-Ray for Maya dev team lead

    Comment


    • #3
      Sure thing. As an alternative to multimatte render elements, where the multimatteid can be used in conjunction with materialid-coverage to refine aliasing of mattes in post.

      I have our pipeline setup so that materialids are embedded in the exr headers alongside their shader names. unaliased mattes are then created with tools ive written (nuke) matching the the materialid to the shader with respective to whatever EXR is passed in (with the shader names/id values). The coverage render element works great for separating individual objects using this method if the object does not have multiple materials that need to be separated. A materialID coverage pass could then be used in this same manner.

      Ive managed to extract a rough "material coverage" pass with a materialID render element where the vrayColorID is automatically set to the vraymultimatteid eg. [1, 1, 1], [50, 50, 50] etc. and an expression in the form of:

      alpha: (minID == mID || maxID == mID) ? ((minID-maxID == 0?) 1 : abs((materialID.red - minID) / (maxID - minID) - 0.5)*2) : 1

      where minID is the minimum multimatteID integer in the neighbouring pixels
      maxID is the maximum multimatteID integer in the neighbouring pixels
      and mID is the desired multimatteID that the compositor wishes to extract a matte from.

      Interporlating these values on and off - an element that could take care of this process would be much more accurate/cleaner.

      Sorry if this is a confusing explaination!

      Comment


      • #4
        I ended up writing a nuke/blinkscript to do the job using the multimatteid values in the materialid RE and calculating the interpolation.

        thanks.

        Comment

        Working...
        X