Create an interactive groom hair cache

You can save interactive groom hairs to Alembic-based cache files. Cache interactive groom hairs for saving hair animation and simulations and as a way of transferring your grooms to other meshes. Maya saves hairs, wires, and guides to the Alembic cache file as curves.

You can cache hairs at any state of the groom by selecting the corresponding node in the processing stack. For example, selecting the description node for caching saves the hair after it has been processed by all the enabled modifiers. Selecting a modifier node in the middle of the stack, saves the hair after it has been processed by the selected node and downstream nodes.

To cache wires or guides only, select the modifier's InGuide_base node.

Save the hairs to a cache file and load it into the scene

When caching hairs using the Create New Cache option, Maya also creates a cache read node and loads the cache into the scene for playback.

  1. In the Interactive Groom Editor, select the node that corresponds to state of the groom you want to cache.
  2. In the Modeling menu set, select Generate > Cache > Create New Cache > .
  3. Make sure that the settings are as desired.

    For example, the Cache time range is set to begin at the Start Frame if you are caching a hair animation or simulation.

    Important: To generate a standard Alembic cache file that can be read by third-party cache importers, you must turn on Multiple Transforms and Write Final Width in the Create Cache Options window. See XGen Caching submenu.
  4. Click Create.
    The cache gets written to disk. In addition, the following things happen:
    • A cache read node is created and added under the description node, or above the selected modifier node.
    • All of the modifiers below the cache node are temporarily disabled.
  5. (Optional) To continue modifying your groom, click this icon to disable the cache node and re-cache the hairs if necessary.

Save the hairs to a cache so it can be loaded at later time

You can use the Export Cache option to save the hairs to an Alembic cache, which you can later load in a scene. A cache read node is not created when you choose this option.

  1. In the Interactive Groom Editor, select the description node or node that corresponds to state of the groom you want to cache.
  2. In the Modeling menu set, select Generate > Cache > Export Cache > .
  3. Make sure that the settings are as desired. See XGen Cache sub-menu.

    For example, the Cache time range is set to begin at the Start Frame if you are caching a hair animation or simulation.

    Important: To generate a standard Alembic cache file that can be read by third-party cache importers, you must turn on Multiple Transforms and Write Final Width in the Cache options.
  4. Click Create.

    The cache gets written to disk.

Note: You can also save hairs to an Alembic cache file by selecting Description > Cache menu from the Interactive Groom Editor.

Add cached hairs to a description using a Spline Cache modifier

If you have an interactive groom hair cache saved to disk, you can add this cache to a description using a Spline Cache modifier.

  1. In the Interactive Groom Editor, select the description, select Add Modifier, and then select Spline Cache.

    By default, the modifier gets added to the top of the stack, under the description node. You can move it to any location between description and description_base nodes.

  2. Select the Spline Cache modifier, and in the XGen Spline Cache section of the Attribute Editor, click the browse icon, and then browse to the location of the interactive groom hair cache.

    Maya adds the cached hairs to the description. Note that the Spline Cache modifier node overrides the effects of any downstream nodes, including modifiers and the description_base node.

  3. (Optional) To sculpt or shape the hair, add modifiers above the Spline Cache in the stack. For example, add a Sculpt modifier so that you can sculpt the hairs using the interactive grooming tools.
  4. (Optional) Click this icon to disable the Spline Cache and return the groom to its previous state.

Related topics