Stretching Hair Segments

 
 
 

Although hair segments are normally fixed in length, you can temporarily change their behavior in "stretchy" mode to allow them to change length. When you style or animate hair in stretchy mode, the hair strands behave more like curves than an IK chain with fixed segment lengths.

   

Guide hairs with tips selected and translated in one direction.

Guide hairs with tips selected and translated in same direction in stretchy mode.

In stretchy mode, you can style hair using various deformations or transformations. Then when you resample the hairs, each hair segment is approximated in a uniform way over the length of the hair strands to smooth out the shape. After you resample, you can apply dynamics to the hair to animate it (see the following section, Styling Hair in Stretchy Mode).

NoteIf you apply dynamics on hair before you resample it, the "stretched" segments of the hair will return to their closest constrained position (that is, IK will be solved for the hair strands).

Stretchy mode allows each hair segment to change length in response to how an animated deformation (such as a lattice or envelope) changes the shape of the hair. Animating hair in stretchy mode can alleviate the problem of hair sometimes getting kinked when being deformed (see Animating Hair with Deformations in Stretchy Mode).

Styling Hair in Stretchy Mode

You can style hair in stretchy mode using any deformation or transformation. Combined with proportional modeling or the Brush tool, using stretchy mode for styling can be a great way to style hair in an organic fashion. As well, it's a quick way to change the hair length.

After the style is the way you want it, you need to resample the hair so that the hair segments are uniform again. You can then turn off stretchy mode and apply dynamics to animate the hair.

To style hair in stretchy mode

  1. Select the hair points or tips you want to style.

  2. Do one of the following to activate stretchy mode:

    • Click the Stretchy button at the bottom of the Hair toolbar.

      or

    • In the Hair property editor, select Allow Stretching of Hair Segments in the Hair Generation section. This activates the Stretchy button.

  3. Style the hair using any of the deform operators or transformations.

    Notice that the hair strands act as if they are linear curves, with no IK behavior.

  4. After the hair is styled, resample the hair by choosing Length Resample Stretched Hairs.

    This resamples the guide hairs, approximating the shape as much as possible so that the 15 hair segments are evenly distributed along the length of the guide hair. This allows for better deformation for animation and accurate dynamics simulation.

    Resampling works based on selection, so only the selected strands that you have styled in stretchy mode are resampled.

       

    Hair points translated in stretchy mode before resampling.

    Hair after resampling.

  5. To deactivate stretchy mode, click the Stretchy button again or click the Fix button beside it. When you click Fix, the hair is also automatically resampled.

Animating Hair with Deformations in Stretchy Mode

When you animate hair with a deformation operator (such as an envelope or lattice), the deformation can cause the hair to get kinked because it tries to compress the hair but can't because the hair segments are fixed in length. When the hair is animated in stretchy mode, however, it allows the hair segments to stretch and compress without kinking.

   

Hair deformed by lattice.

Hair deformed by lattice in stretchy mode.

When you activate stretchy mode, the deformation operators receive a <stretchy> flag to indicate that they are to run in this mode. This is displayed in the hair's operator stack in the explorer, as shown on the left.

TipKeep stretchy mode active for the deformation operator so that the hair deforms properly when animated.

To animate hair in stretchy mode for new deformations

  1. Click the Stretchy button at the bottom of the Hair toolbar.

  2. Apply a deformation (such as a lattice or envelope) to the hair.

    When the deformation is animated, the hair stretches and compresses to accommodate the deformation.

To toggle stretchy mode for existing deformations

If the deformation is already applied to the hair:

  1. Select the deformation operator in the explorer.

  2. Click the Stretchy button. This toggles the state of the deformation operator between stretchy and non-stretchy modes.