---
title: "VRayHairSampler"
canonical: "https://documentation.chaos.com/space/VC4D/116854615/VRayHairSampler"
format: markdown
---
This page provides information about the V-Ray Hair Sampler texture in Cinema 4D.

 

## **Overview**

---

 

## **Parameters**

---

 

 

## **Common Setup Examples**

---

 

### Random by Strand

 

The V-Ray Hair Sampler is set up by connecting an output from VRayHairSampler to a 2D-driven texture; most commonly a Ramp. This example shows how the VRayHairSampler's **Random By Strand** attribute controls the V channel of a ramp connected to a [V-Ray Hair Next Material](https://docs-chaos.atlassian.net/wiki/spaces/VC4D/pages/116855092)'s **Diffuse Color** parameter.

 

 

---

 

### Distance Along Strand

 

Here, the VRayHairSampler is used to create variation in the color along the length of a hair strand to give hair 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 V-Ray Hair Next Material's **Diffuse Color** parameter. Note that the full ramp is mapped along each strand regardless of the strand's length.

 

 

---

 

### Distance Along Strand Absolute

 

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 V-Ray Hair Next Material's **Diffuse Color** parameter. However, this attribute uses the **Hair Max Distance** to allow length-dependent mapping. The renders below uses 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.

 

 

---

 

### Position Across Strand

 

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 V-Ray Hair Next Material's **Transparency** parameter. Note how the hair color looks more transparent to the sides of each hair compared to the other render which did not use a ramp.