Announcement

Collapse
No announcement yet.

VRay Hair Sampler - distanceAlongStrand

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

  • VRay Hair Sampler - distanceAlongStrand

    Hi guys,

    I'm trying to set up a shader using a VRayHairSampler plugged into a ramp to drive color along the length of a strand and I notice that it by default returns the % along strand distance to a 0-1 value.

    Click image for larger version

Name:	Vray_RampAlongStrandLength.PNG
Views:	1
Size:	232.7 KB
ID:	887500

    I'd like to have the ramp be a fixed distance along the strand instead of % of strand length, is there a way to return the length of each strand so I can multiply that against the % value and get the desired results?

    Thanks
    -Richard

  • #2
    I can see why you'd want that, but we don't have the option to do so at the moment. I'll add a request for this.
    Alex Yolov
    Product Manager
    V-Ray for Maya, Chaos Player
    www.chaos.com

    Comment


    • #3
      Thanks Yolov!

      Comment


      • #4
        Hello Richard,
        This new feature is almost ready. We wanted to check with you if we understood the problem correctly.
        We added a new output for the VRay Fur/Hair sampler called "Distance Along Strand Normalized". We also added a new float input parameter "Max Distance". You should set the max distance to the length value of your longest strand in scene units and the new output will then give you a number between 0 and maximum 1. The maximum depends of the current strand length. If it is a short one, the maximum will be less than 1.
        This way when you plug the new output to the ramp, it should give you what you are looking for.
        Do you think all this is handy or you prefer that the new output just yields the absolute strand length in scene units and you manually transform this value to something useful (e.g. divide by a number, etc.)?

        Click image for larger version

Name:	ramp_hair.png
Views:	1
Size:	38.9 KB
ID:	867625

        Comment


        • #5
          Hi Asparuh,

          This is very exciting, the image is exactly the effect I'm looking for

          I don't know that I have a preference between the vray fur/hair sampler doing the math for me or to do it externally. Would either option support either a per strand value or a painted texture similar to how color values are passed through to the strands?

          Thanks!
          -Richard

          Comment


          • #6
            Hi Richard,

            I assume you are referring to the Max distance value. For now the value is uniform throughout the whole hair system, but it can change per frame. Basically it is used to divide the absolute strand position. It is there for convenience for the simplest use case, but you can always leave it to its default value (1.0). Then the output will simply give you the absolute strand position and it can be used with a combination of other nodes, such as Color Math, to achieve you the desired result.
            If you have any suggestion how we can improve the Max distance parameter or you have an exact use case, please let us know.

            Regards,
            Asparuh

            Comment


            • #7
              Originally posted by asparuh.krastev View Post
              If you have any suggestion how we can improve the Max distance parameter or you have an exact use case, please let us know.
              I guess Richard just wants it mappable

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

              Comment


              • #8
                Hi Guys,

                Thanks for getting back to me so quickly Max distance as a scalar value for the entire hair shader should work great in most cases I can think of

                Mappable would give some interesting options, but I'm not sure about usefulness or that there aren't better ways to achieve them at this point.

                Looking forward to testing this when available!

                Best
                -Richard

                Comment


                • #9
                  Hi guys,

                  This feature is scheduled for the next major release.

                  Regards,
                  Asparuh

                  Comment


                  • #10
                    *excite*

                    Looking forward to this, thanks guys!
                    -Richard

                    Comment


                    • #11
                      Hey guys, just testing 3.6 and this is working great. Thanks!
                      -Richard

                      Comment

                      Working...
                      X