---
title: "VRayHairSampler"
canonical: "https://documentation.chaos.com/space/VMAYA/111740641/VRayHairSampler"
format: markdown
---
This page includes details on the Hair Sampler node used with Maya hair systems.


## **Overview**

---



## **Parameters**

---

## **Common Setup**

---

The V-Ray Hair Sampler is set up by connecting an output from VRayHairSampler to a 2D driven texture; which is most commonly a Maya ramp node. This example shows VRayHairSampler's** Random By Strand** attribute to control the V channel of a ramp connected to a VRayMtl's Diffuse Color parameter.




Here, VRayHairSampler is used to create variation in the color along the length of a fur's strand to give fur a more natural look. This is done by using the VRayHairSampler's** Distance Along Strand** attribute to control the V channel of a ramp connected to a VRayMtl's Diffuse Color parameter. Note that the full ramp is mapped along each strand regardless of the strand's length. 



This example uses the VRayHairSampler's** Distance Along Strand Absolute** attribute. Similar to the previous example, it controls the V channel of a ramp connected to a VRayMtl's Diffuse Color parameter. However, this attribute uses the **Hair Max Distance** to allow length-dependent mapping. The renders below use the same setup and ramp but with different **Hair Max Distance** values. Note that when **Hair Max Distance** is lower than the actual length of the hair strand, the gradient is repeated over the length of the hair strand.


> Macro (inline-media-image)

The ramp is driven by the** distanceAlongStrandAbsolute** parameter  
The ramp is connected to the VRayMtl's **Diffuse Color**   
Multiple Colors set with smooth interpolation




This final example uses the VRayHairSampler's **Position Across Strand** option. Unlike the previous examples, it controls the U channel of a ramp connected to a VRayMtl's Transparency parameter. Note how the hair color looks more transparent at the end of each hair compared to the other render which did not use a ramp.



---


## **Notes**

---

- When using ramps, there is a strict correlation between plugging VRayHairSampler into a vCoord and using vRamp, as well as alternatively uCoord + uRamp.