© Square Enix © Goodbye Kansas


Table of Contents

This page includes details on the V-Ray Hair Sampler texture used with Houdini hair systems.


Overview


The V-Ray TexHairSampler is a utility node that provides extra output attributes which can be used when shading hair.

This node allows you to map color, incandescence, and transparency along the length of a hair strand, as well as the ability to randomize such properties on a per-strand basis to create stunning hair looks.


Node


The TexHairSapmler node contains the unique input and outputs listed below.

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.

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 Strand Max Distance is lower than the actual length of the hair strand, the gradient is repeated over the length of the hair strand.

hair_color – Provides information about the diffuse color along the hair strand.

hair_incandescence – Provides information about the incandescence color along the hair strand.

hair_transparency – Provides information about the transparency along the hair strand.

random_by_strand – Provides a unique random floating point value for each strand in the hair system, which can be used with a ramp texture for example to blend between two colors.

position_across_strand – Allows textures to be mapped across each strand.



Parameters


Strand Max Distance –Sets the max strand length. Typically, this value should be equal to the longest strand of hair. 



Usage Examples



Random by Strand


The V-Ray Hair Sampler is set up by connecting an output from the V-Ray Hair Sampler to a 2D driven texture; most commonly a ramp. In this example, V-Ray Hair Sampler's Random By Strand attribute controls the gradient position of a V-Ray Gradient Ramp connected to a V-Ray Hair's diffuse color parameter.



The ramp is driven by the Random By Strand parameter.


Resulting render




Distance Along Strand


Here, V-Ray Hair Sampler 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 V-Ray Hair Sampler's Distance Along Strand attribute to control gradient position of the ramp connected to a V-Ray Hair's diffuse color parameter. Note that the full ramp is mapped along each strand regardless of the strand's length.



The ramp is driven by the Distance Along Strand parameter.


Resulting render