Announcement

Collapse
No announcement yet.

Vray hair 3 mat + Texture Map

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

  • Vray hair 3 mat + Texture Map

    Hello, I am difficultly assigning a texture map for hair color. Each time I try, it will only render one color. I have tried also using uv texture maps, but the same thing happens. I am using X-gen for my hair. Any ideas on how to fix this?

    Thank you for your time.

  • #2
    Hi. Using texture maps with XGen is a bit trickier than simply assigning a material with a texture to the hair node, but once you get used to it, it's not really difficult.

    Summarised from http://docs.chaosgroup.com/display/V...essionsandmaps:

    To control the colour of hairs in V-Ray, add a custom attribute under the Custom Shader Parameters section of the Preview/Output tab of the XGen window, it has to be named "root_color" and its type has to be "color". Then, assign a V-Ray material to the description and assign a VRayHairSampler as its Diffuse Color -- you can find it under Utilities in the menu that shows up when you right-click on Diffuse Color and choose Create New Texture; alternatively you can connect a VRayHairSampler's outColor to the color attribute of your material in the Hypershade window.

    You can also add a tip_color attribute if you want to also control the tip colour.

    From then on, you can choose to control the attribute either via expressions or via a map. XGen maps are really PTex textures, so you will have to convert your texture maps to PTex format. One gotcha is that XGen's PTex baking will fail if you've assigned a VRay material to the surface on which you're generating hairs, so you have to assign a plain Maya lambert material to the object while working on XGen maps. Each PTex texture can only work on a single object, so you can't reuse them on different objects, unless their geometry is exactly the same. For information on how to do the conversion, please see https://knowledge.autodesk.com/suppo...86A91-htm.html and http://docs.chaosgroup.com/display/V...ughtexturemaps.

    If you're still having problems, don't hesitate to ask.
    V-Ray for Maya developer

    Comment


    • #3
      Thank you, the color has shown up now. But I'm just wondering, is there any way to use the vrayhairmtl 3 with texture map with xgen or is it only able to work with V-ray material?

      Comment


      • #4
        Hi all,
        Yalamdar, it also works with hair materials.

        Anyway, I want to ask, too, what'll be the procedure if I want to use the texture as the blend map between two hair materials? Am I limited only to root colour texture and tip colour texture with Hair sampler? What if I wanted the fur to have 3 colours (at root, mid and tip)? This works good when I use hairsampler and ramp, but what if I wanted 3 textures instead of ramp? Is that possible? And what if I wanted to drive the transmission or the reflection with the texture? ( For example at wet parts of fur of a body) Thanks for your answers

        render with root and tip texture
        Click image for larger version

Name:	bear_fur_wip3_small.jpg
Views:	1
Size:	159.6 KB
ID:	859405
        shading network
        Click image for larger version

Name:	shd_ntwk_2.jpg
Views:	1
Size:	114.9 KB
ID:	859406
        Attached Files
        Last edited by munchac; 30-12-2015, 11:40 AM.

        Comment


        • #5
          Thank you Munchac, I got the hair material working.

          Comment


          • #6
            is possible to do something like this?

            https://www.youtube.com/watch?v=GZ37NdhONBA

            I tried it with VRayUserColor Node but it did not work

            Thanks for your answers

            Comment


            • #7
              For now you're limited to only root_color and tip_color, which you can query with the VRayHairSampler. No other custom attributes are supported.

              However, for archives you can attach any number of custom attributes and access them with VRayUserColor/Scalar.
              V-Ray for Maya developer

              Comment


              • #8
                For the next SP, we will also export incandescence/transparency similar to root/tip_color. This will give you 2 more color channels to play with. The user colors support is kind of there, and can save some memory, but I'm not sure if we will be ready with it for this SP, or the next.
                V-Ray/PhoenixFD for Maya developer

                Comment


                • #9
                  Hi thanks for your answers, it would be nice if there was node like in arnold(as you can see in my previous post) which can be used in hypershade as a standard node on which i could apply gamma correction etc.

                  I use black and white texture as root color now, I connect it to a mask in blend material with hairsampler and now I have full controll along the strand in two hair materials which is what I wanted, but this is a little bit walkaround I think
                  I'm looking forward to next SP
                  Last edited by munchac; 08-01-2016, 01:03 PM.

                  Comment


                  • #10
                    There is a node - VRayHairSampler, You can add a gammaCorrect node between the hair sampler and the ramp/material. It works from my tests.
                    V-Ray/PhoenixFD for Maya developer

                    Comment


                    • #11
                      Hi,
                      So I've followed the tips below but still cant get a texture to render on my Xgen fur. Ive made a root_color attribute & replaced the map i made with my texture & saved it as ptex & applied my vray hair material but i just get the solid color not the texture map. I'm missing astep i think, just wondering if there is any more help available on this?

                      Thanks
                      Chris

                      Comment


                      • #12
                        There are images showing how the hyperhade should look here:

                        http://docs.chaosgroup.com/display/V...ine+Primitives
                        V-Ray/PhoenixFD for Maya developer

                        Comment


                        • #13
                          I saw that & can get it working with a Ramp OK, but I have an existing bitmap texture I want to use as my color map & dont know how to get that into the tree?

                          Comment


                          • #14
                            I think XGen works only with ptex. We read the color from XGen, so it must be working there correctly.
                            V-Ray/PhoenixFD for Maya developer

                            Comment


                            • #15
                              Hi,

                              yes correct it only reads ptex , I found this video https://www.youtube.com/watch?v=u7ijzPEtIyY which kind of shows the same issue ,but with no VRAY in his pipeline... how would I apply this to use with Vray ?

                              Many Thanks for the help !

                              Comment

                              Working...
                              X