Changing the color of the fur using the color attribute

Note

This tutorial is a detailed look into what goes on at the network level. An automatic way to create the same effect is to use the Paint Root Color and Paint Tip Color tools on the shelf.

There are two ways of changing the color of the fur: changing the color of the guide hairs and changing the color of the grid.

To change the color of the fur, you need to set up a Point SOP to control the color attribute, and append it to either the skin geometry or the guide geometry.

Note

Before you can change the color, you must remove the Hair Material that you added in Basic fur setup from your grid object by deleting the path in the Material field on the Material tab of the FUR object.

If this material is not removed, the fur will render with the color from the material instead of your color attribute.

Changing the color of the guides

Changing the color of the guide hairs allows you to set a color for the guide hairs that gets interpolated with the fur. This procedure is a continuation of Using Guide Hairs, which explains how to use guide hairs to interpolate fur on a surface.

  1. Insert a Point SOP node after the Copy SOP in the Fur geometry object you created in Using Guide Hairs.

  2. Change the Keep Color option in the drop-down menu to Add Color in the parameter editor for the Point SOP.

  3. Set some RBG values in the Color field.

    For example, you can use the following values to turn the fur a solid red color.

    R 1
    G 0
    B 0

    You can also use random expressions to generate a random color for each point on the line. Using the following values will generate a random color between black and red for each point on the line.

    R rand($PT + 0.352)
    G 0
    B 0

    If the line is a two point line, the color is interpolated between the root and tip of the hair, as well as between the individual guide hairs.

    Using a random expressions makes the fur appear more natural, since most fur is not one solid color. The following is a test render of randomly colored fur:

The color attribute will be picked up by the fur sop and procedural shader that you created in Basic fur setup.

Remember, the Fur SOP should only be used for visualization in the viewport. In order to render, it is highly recommended that you use a fur procedural, which will delay the generation of fur until render time. For more information on setting this up, see Basic fur setup.

Tips

  • Using a random expression will give the fur a more natural look.

  • Increasing the points on the line will result in more randomness, since each point is assigned a random color.

Changing the color of the fur from the grid

This procedure is a continuation of Basic fur setup, which explains how to create some basic fur.

  1. Insert a Point SOP somewhere between the grid and the null nodes in the Fur geometry object you created in Basic fur setup.

    You can do this by selecting the connecting wire, pressing Tab , and typing point.

  2. Change the Keep Color option in the drop-down menu to Add Color in the parameter editor for the Point SOP.

  3. Set some RBG values in the Color field.

    For example, you can use the following values to fade the grid from blue to pink.

    R $BBX
    G $BBY
    B 1

    The fur picks up the color from the grid.

    Note

    You can also use a texture map on your grid. For more information see Control the fur color using a color map.

The color attribute will be picked up by the fur sop and procedural shader that you created in Basic fur setup.

Remember, the Fur SOP should only be used for visualization in the viewport. In order to render, it is highly recommended that you use a fur procedural shader, which will delay the generation of fur until render time. For more information on setting this up, see Basic fur setup.