Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Section
Column
width55%

The VRayHairSampler is an a utility texture that provides extra output attributes which can be used when shading hair.

Used with the Hair Next Material, this texture allows you to map color, incandescence , and transparency along the length of a hair strand, as well as . It also gives the ability to randomize such properties on a per-strand basis to create stunning hair looks.

 

UI PathTexture V-Ray > VRayHairSampler

Column
width5%

 

Column
width40%

...

Section
Column
width55%

Texture – Specifies a texture to be mapped when the Output is set to Position Across Strand.

Output – Determines how the texture is mapped. See the examples below for more information.

Distance Along Strand – Provides information about the shaded part of the hair strand. For the base of the strand, the value is 0.0, and for the tip it is 1.0. With this option, a texture can be mapped along each strand regardless of each strand's length.
Distance Along Strand Absolute – Provides information about the shaded part of the hair strand using absolute distance. This option uses the Hair Max Distance parameter to allow length-dependent mapping. For instance, when used with a gradient, this allows for all hair strands (regardless of length) to have a root color all up to the same length followed by the rest of the ramp. 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 – Allows textures to be mapped across each strand.
Random By Strand – Provides an a unique random floating point value for each strand in the hair system, which allows shading each strand with a random color, sampled from a texture.

Hair Max Distance – Sets the max strand length when using Distance Along Strand Absolute. Typically, this value should be equal to the longest strand of hair. This option is mappable, allowing different parts in a hair system to have different max lengths.

Column
width5%

 

Column
width40%

...

The V-Ray Hair Sampler is set up by connecting an output from VRayHairSampler to a 2D-driven texture; most commonly a rampRamp. This example shows how the VRayHairSampler's Random By Strand attribute to control controls the V channel of a ramp connected to a VRayHairNextMtl V-Ray Hair Next Material's Diffuse Color parameter.

 

Section
Column
width5%

 

Column
width45%

The ramp is driven by the Random By Strand parameter.
The ramp is connected to the VRayHairNextMtlV-Ray Hair Next Material's Diffuse Color.
Multiple colors are set with no interpolation Step Interpolation.

Column
width5%

 

Column
width45%

Resulting render

...

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 VRayHairNextMtlV-Ray Hair Next Material's Diffuse Color parameter. Note that the full ramp is mapped along each strand regardless of the strand's length.

...

Section
Column
width5%

 

Column
width45%

The ramp is driven by the Distance Along Strand parameter.
The ramp is connected to the VRayHairNextMtlV-Ray Hair Next Material's Diffuse Color.
Multiple colors are set with smooth interpolation Smooth Interpolation.

Column
width5%

 

Column
width45%

Resulting Render

...

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

...

Section
Column
width5%

 

Column
width45%

The ramp is driven by the Distance Along Strand Absolute parameter.
The ramp is connected to the VRayHairNextMtlV-Ray Hair Next Material's Diffuse Color.
Multiple Colors are set with smooth interpolation Smooth Interpolation.

Column
width5%

 

Column
width45%
Before after
afterLabel25cm
darktrue
beforeLabel10cm
Panel
borderStylenone

Panel
borderStylenone

...

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 VRayHairNextMtlV-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.

...

Section
Column
width5%

 

Column
width45%

The ramp is driven by the Position Across Strand parameter.
The ramp is connected to the VRayHairNextMtlV-Ray Hair Next Material's Transparency.
Grayscale map is set with Linear interpolation Interpolation.

Column
width5%

 

Column
width45%
Before after
afterLabelwith
beforeLabelwithout
Panel
borderStylenone

Panel
borderStylenone

...