Announcement

Collapse
No announcement yet.

Vray "material select render element" output material ID or flat color ?

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

  • Vray "material select render element" output material ID or flat color ?

    Hi,
    I have some objets with VrayBlendMtl. In the VrayBlendMtl, i have VrayMtl "blended" with masks (like in one mesh, i have a wood material and a metal material. A mask separates all.)
    What the problem ?
    The problem is to output mask ID.

    If i use a "material select element", i haven't the alpha of the "material", and i have "one" material on the image (like the wood).
    It is impossible to use this on a production (because no alpha).
    If i create a material ID on a "sub material" of the VRayBlendMtl, it is doesn't work.

    What is the solution ?

    1) First solution : all materials ID or multimattes ID of "sub materials" of a VRayBlend can work with Multimatte element (it is the best solution !)
    or
    2) Material select can output material ID (not the best solution because we will have one mask for one element)

    There is the same problem here : http://www.chaosgroup.com/forums/vbu...ght=multimatte

    Currently, we don't know how to solve this problem.
    Thank you !
    Last edited by bigbossfr; 22-02-2012, 04:26 AM.
    www.deex.info

  • #2
    The original idea for this was to use the material ID color attributes on the sub-materials (and not the integer ID numbers) together with a Material ID render element. This seems to have some issue currently, but I should be able to fix it relatively easily.

    Best regards,
    Vlado
    I only act like I know everything, Rogers.

    Comment


    • #3
      The problem to use the material ID color attributes on the sub-materials is, if we want to output lot of masks in red/green/blue color (with mutimattes), we can not (we can output 3 sub-materials maximum with this 3 colors).
      www.deex.info

      Comment


      • #4
        Ok then. In that case, would it help to add a "mask" mode to the VRayMtlSelect element which will output a single floating-point channel with the alpha for the chosen material?

        Best regards,
        Vlado
        I only act like I know everything, Rogers.

        Comment


        • #5
          Yes, this can be a solution ! Not the best because we will have one mask for one image (and not 3 mask for 1 image), but if it works and it is more easy for you, it will be great.
          Thank you Vlado.
          www.deex.info

          Comment


          • #6
            Originally posted by bigbossfr View Post
            Yes, this can be a solution ! Not the best because we will have one mask for one image (and not 3 mask for 1 image), but if it works and it is more easy for you, it will be great.
            Thank you Vlado.
            Ok, I'm working on this now. Btw the mask channel is just a single float, so if you use multichannel .exr files, it will be pretty much the same as using three colors.

            Best regards,
            Vlado
            I only act like I know everything, Rogers.

            Comment


            • #7
              Originally posted by vlado View Post
              Ok then. In that case, would it help to add a "mask" mode to the VRayMtlSelect element which will output a single floating-point channel with the alpha for the chosen material?

              Best regards,
              Vlado
              Hi Vlado,

              Could I use a "mask" mode with VRayMtlSelect element? Is it done already? Or is it still in progress?
              It might be great if I could get the alpha for the chosen material.
              Because sometimes I need a pure RED for VRayMultiMatte element with refraction but there is a problem with that for me.

              Here is the example.
              Click image for larger version

Name:	matte.jpg
Views:	1
Size:	487.0 KB
ID:	845285
              If I make a mistake or misunderstanding, please give me an advice for that. I think I am missing something else for that.

              Thank you for all your kindness.

              Best Regards,
              Sangho Jung.

              Comment


              • #8
                It is not done yet, but we are working on it.

                Best regards,
                Vlado
                I only act like I know everything, Rogers.

                Comment


                • #9
                  Bump.....
                  I have a lot of sub material with black and white mask (wood, metal, etc etc) and i can not ouput multimatte ID.



                  The result of the multimatte ID renderElement is black.
                  And if i add color in materialID, materialID renderElement is white.

                  Is it hard to fix please ?
                  Attached Files
                  www.deex.info

                  Comment


                  • #10
                    After some research i did not find a work around.
                    What i see is :
                    1) If i add a material ID on sub materials of a VrayBlend, and set a color, all colors of material ID attribute of all sub materials are added. The conclusion is the material ID attribute of sub materials do not respect the "blend amount" attribute of VrayBlends. All are added. I don't know if it is diffucult to fix.
                    2) Multimatte ID of sub material is completely ignored.

                    The question is : what is the solution ?

                    I am completely bloked.

                    Thanks.
                    www.deex.info

                    Comment


                    • #11
                      Hi,
                      Any news about this please ?

                      Thanks.
                      www.deex.info

                      Comment


                      • #12
                        Heya,

                        if I use materialselect passes I output the blend amount input into an extraTex, takes some rendertime but is sometimes the only way to make it work in comp.

                        Since most of the time the blend amount ist just a simple color you can put 3 of them in one extra texture.

                        Hope this helps a bit.

                        Paul
                        VFX Supervisor @ www.parasol-island.com personal website www.dryzen.com latest reel http://vimeo.com/23603917

                        Comment


                        • #13
                          Hi,
                          Yes, but if you do this, you will have your blend amount on all your image....
                          And user attributes do not work into proxies.

                          But thank for the suggestion.
                          www.deex.info

                          Comment


                          • #14


                            Ok, i have create a script (8h to find the algorithm...) which create on the fly (when Vray is rendering, nothing is done on the scene) material ID (and it works with blend materials, vrayBump, multi blend....) in Python. Each material have unique color based of the name of the material, and the script know if you use the material many time (in vray blend, in vray bump, direct on the mesh, etc etc...)), you will have the same color.
                            I will include this script in my Vray Arsenal.

                            Done.
                            www.deex.info

                            Comment

                            Working...
                            X