Announcement

Collapse
No announcement yet.

RGB Mattes with blend materials

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

  • RGB Mattes with blend materials

    So I did some digging around the forums here, but was unable to find a clear answer to this...

    Multimattes allow you to create RGB mattes based on integers assigned either to the geo (objectID) or material (MaterialID). This however does not work for the sub-materials in a Blend Material. You can assign a materialID to the blend material itself as a whole, but not pass it through from the sub-materials.

    Material ID pass. As I understand it, it is not possible, programming-wise, to fix this because of the integer numbers used in a multimatte. It is however possible to pass color values. So one could make a Material ID pass where colors are input in the sub-material's material ID attribute. This does work with a Blend Material.

    The problem is that rather than being able to assign multiple sets of RGB mattes in a scene, one can only assign the color red once for the entire scene etc. Since most scenes will have several mattes, this approach of extracting primary colors for a matte (RGB) does not work. It would be possible to assign unique non-primary colors but this is less ideal since it is hard to extract these in Nuke, and hard to keep track of (we have spreadsheets that list the matte ID numbers for each asset. Integers are a lot easier to keep track of on a spreadsheet than random colors).

    RenderID pass. Another possibility is a RenderID pass. This outputs multiple colors. The problem here is that
    (1) they are not user defined which makes is problematic to set up a master comp template for the mattes since the colors will change in each shot.
    (2) while one can easily shuffle out RGB in Nuke, it is more difficult to extract other colors.

    Material Select. This brings me to the material select which outputs the beauty render of just the selected material. What we need however is not the material but rather a matte. There was some discussion of implementing this on the forums, but I am not sure if this has happened for 3.0 or not. The render element has two inputs: "material" and "materials" which is rather confusing, and I am unable to find documentation on it. Is there a way to output a matte for a material with this pass?

    TLDR: In sum, I want to be able to create user defined mattes for materials, including sub-materials passing through a blend material.

  • #2
    MultiMatte render element is the best option for defining mattes but like you've pointed out it doesn't work with sub-materials because of a limitation.

    There are several other ways to extract sub-materials masks (Material ID,Render ID and Material Select) which you've also pointed out but each of them has some limitation.
    Material ID pass is the best option according to my opinion but as you said it is not so convenient as MultiMatte element since you have to specify a unique color for each object.

    May be we have to add an option for multiple Material ID render elements (like MultiMattes) which will allow to specify which material into which Material ID element should go.
    Svetlozar Draganov | Senior Manager 3D Support | contact us
    Chaos & Enscape & Cylindo are now one!

    Comment


    • #3
      Originally posted by svetlozar.draganov View Post
      May be we have to add an option for multiple Material ID render elements (like MultiMattes) which will allow to specify which material into which Material ID element should go.
      Yes, I think that would be very useful. +1 from me!

      1. Could you please explain what the two inputs: "material" and "materials" are for on a Material Select RE?
      2. Are you aware of a good way to extract non-primary (i.e. not red, green, or blue) colors in Nuke? (I realize I may be barking up the wrong tree with that last question )

      Comment


      • #4
        Originally posted by sharktacos View Post
        Yes, I think that would be very useful. +1 from me!

        1. Could you please explain what the two inputs: "material" and "materials" are for on a Material Select RE?
        2. Are you aware of a good way to extract non-primary (i.e. not red, green, or blue) colors in Nuke? (I realize I may be barking up the wrong tree with that last question )
        1) With the "Materials" option you are able to add multiple or group of materials as sets.
        2) One approach is to use the shuffle node to extract a color
        Tashko Zashev | chaos.com
        Chaos Support Representative | contact us

        Comment


        • #5
          Originally posted by sharktacos View Post
          Yes, I think that would be very useful. +1 from me!

          1. Could you please explain what the two inputs: "material" and "materials" are for on a Material Select RE?
          2. Are you aware of a good way to extract non-primary (i.e. not red, green, or blue) colors in Nuke? (I realize I may be barking up the wrong tree with that last question )
          For your second question. Its abit of a hassle, but you can easly make a gizmo out of it so it so its easy to do the second time.
          If you make a constant, and then pick the color on the renderID for example that you want to mask. Then you make a merge difference between the render ID and the constant, that picked object should turn black in the result. You can then make a keyer to key out the black pixels (should be the only pixels being black) of that pass, and invert it.
          You can then take your coverage pass and multiply that on top, to get the "AA" into the mask. Its not a perfect AA, but often close enough.
          Take that node tree and make that into a gizmo, and you got a renderID color picker .
          If you instead pick the color with a sample point, you could have the color change depending on whats under the placed point, so you can change the renderID pass to a new version and have the mask update to the new color.

          As for the chaosgroup guys. Having a pass similar to renderID, but for materials aswell would be great! I know you can do a materialID pass, but then you manually (or by script) has to add all the materials and colors into it. Having one thats sort of automated like renderID would be crazy good.
          CG Artist - RnD and CG Supervision at Industriromantik

          Comment

          Working...
          X