Announcement

Collapse
No announcement yet.

Xgen/Vray mapping textures to shader attributes

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

  • Xgen/Vray mapping textures to shader attributes

    Hello,

    I?m trying to map ptex textures to the vrayHairMat?s attributes like transmission glossyness width/length and various other channels but I can only find instructions how to create the two custom shader parameters root_color and tip_color but want to create custom one to map to as many parameters in the hair shader as I need.

    Is there a way to do that?

    Thanks,
    Tarkan

  • #2
    Hi,
    mapping the width/length should be the same like mapping the tip and the root. Just click on the arrow next to the width/length slider and create a new map. Paint the areas that you want with some grayscale color and then save the ptex then export the descriptions to apply the changes. After that if you render you should be able to see different length for the hair based on the ptex map you just painted.
    As for the other channels from the VRayHair3Mtl they could be mapped with the VRayHairSamler node (which is needed depending on what you want to map) I'll try to create a scene with some instructions on which channels could be mapped and how. I'll post it as soon as I'm done. Let me know if you need something else.
    Ivan Shaykov
    chaos.com

    Comment


    • #3
      Hi Shaio, as far as I understood root_color and tio_color are hard coded custom shader parameters that the hair sampler understands. With other renderers you can create a user data color node and source the custom shader parameter in there but it doesn?t seem to work with vray or at least I can?t figure it out and there also doesn?t seem to be documentation for it besides the previously mentioned root and tip color.

      Thanks a lot for your help.

      Comment


      • #4
        We're currently working on a tutorial about this and will publish it soon. However take a look at the attached scene and the steps on how to map most of the channels using VRayUserColor and the VRayHairSampler.
        1. You need to setup your custom maps in the Custom Shader Parameters like you setup the root_color and the tip_color. In the example scene they're named param1 and param2.
        2. Create ptex maps for both attributes (param1 and param2) and save them
        3. Then you need to add as many VRayUserColor nodes as the number of attributes that you want to map (2 in this case) and add the same attribute names like the ones from the xGen window (param1 and param2)
        4. The only step left is to plug the VRayUserColor nodes to the VRayHairMtl or to a Ramp which is connected to a VRayHairSampler (check the screenshot for more details)

        Click image for larger version

Name:	xgen_mapping.png
Views:	739
Size:	290.3 KB
ID:	993813

        If you need more help please let me know
        Attached Files
        Ivan Shaykov
        chaos.com

        Comment


        • #5
          Amazing thank you. From which version of vray for maya is this supported?

          Comment


          • #6
            You should be able to to this with V-Ray 3.40 and up.
            Ivan Shaykov
            chaos.com

            Comment


            • #7
              Hi Shaio, I?ve tried this workflow but noticed it only works if I plug in a hair sampler to the ramp and then finally the userColor node to get any of the custom xgen maps to work. I basically can?t use the userData node by itself only to get it to work like you did in the screengrab.

              Comment


              • #8
                Which Maya and V-Ray versions do you use?
                Ivan Shaykov
                chaos.com

                Comment


                • #9
                  Hi Ivan,
                  sorry for the late answer. Haven’t been notified by email. I’m using Maya 2017 and Vray 2.6.

                  Comment


                  • #10
                    Originally posted by tamtamx View Post
                    Hi Ivan,
                    sorry for the late answer. Haven’t been notified by email. I’m using Maya 2017 and Vray 2.6.
                    I think the last 2.x for Maya was 2.40. Did you mean 3.6?
                    Alex Yolov
                    Product Manager
                    V-Ray for Maya, Chaos Player
                    www.chaos.com

                    Comment

                    Working...
                    X