Animation Cache Operator
The Animation Cache Node lets you record and play back hair animation in real-time. You can export the animation of guides or hairs to an .abc file using our Alembic Exporter. This file is then automatically loaded into the Animation Cache operator for playback.
Animation Cache Settings
- Strand Group
This parameter works the same as in other operators, you can isolate the effect of the Animation to a particular Strand Group created in the Edit Guides Operator - Overwrite Input
When enabled, this option fully replaces the input hair with the cached animation from the Alembic file. The output will only include the loaded animated strands. This is useful for completely capturing and locking in the current hair state. - Apply Amount
Controls the strength of the animation effect.
This parameter can also be used to blend between multiple Animation Cache nodes when they are layered in the operator stack — allowing for smooth transitions between different cached animations. - File Name
Specifies the path to an .abc file or a sequence of files exported using the Alembic Exporter. This field also serves as the save path when using the Record feature.- The Open button loads an existing Alembic file.
- The Save button lets you record and save a new animation cache.
- Curves Path
Object path within the loaded alembic file pointing the specific curves to be loaded. - Time Offset
Shifts the animation start frame in the scene relative to the first sample in the Alembic file. Use this to delay the playback. - Time Scale
Specifies the amount of stretching or squeezing of animation in the scene. You can use these two parameters to control the delay and playback speed of the animation.
Component Settings
These options control which data is imported from the Alembic cache. Disabling unused components can reduce memory usage and speed up loading time.
- Import Widths
When enabled, strand width (thickness) data is read from the Alembic file and applied to the strands. - Import Texture Coordinates
When enabled, UV texture coordinates are imported from the cache and used for texturing or mapping. - Import Channel Data
When enabled, per-strand channel data (such as custom attributes) is read from the file. - Import Strand Groups
When enabled, strand group assignments saved in the cache are imported and restored. - Import Strand Ids
When enabled, each strand's unique ID is loaded from the file. This helps maintain consistent strand tracking across frames, especially when rendering on a render farm.
Loading a File Sequence
The File Name parameter supports sequence loading using the # character to represent frame numbers.
For example, entering MyHair.###.abc will load a sequence of files like:
MyHair.001.abc MyHair.002.abc MyHair.003.abc ...
The Animation Cache will use the timing information embedded in each Alembic file to play back the animation correctly.
On-Demand Alembic Sequence Loading
As described earlier, the File Name parameter can include "#" characters to specify a sequence of Alembic files. When using a sequence format (e.g., myfile.###.abc), files are loaded on demand — meaning they are only read from disk when needed. For example, given the following files:
myfile.000.abc myfile.001.abc myfile.002.abc
- myfile.000.abc is loaded when the scene is on frame 0
- myfile.001.abc is loaded only when the timeline reaches frame 1
- myfile.002.abc is loaded on frame 2
This lazy loading approach minimizes memory usage and reduces processing overhead, which is especially beneficial for complex or long hair animation sequences during rendering.
Recording Settings
The Recording section allows you to capture one or more frames of static or animated hair and save them to an external .abc Alembic file. The recorded data can then be used by this operator or any other Animation Cache node that references the same file.
What Gets Recorded
The recording process captures:
- Hair strand positions
- Strand widths
- UV coordinates
- Strand groups
- Any custom strand data (channels)
Recording an Animation Cache
Before you begin, ensure that your animation range is set correctly. By default, Use Record Time Range is enabled, which means the Animation Cache node will record the frames in your current Maya playback range. To use a custom frame range instead, simply disable this option and enter values manually into the Start Time and End Time fields.
Steps to Record:
1. Add the Animation Cache operator to your groom.- It can be placed anywhere in the operator stack, and it will capture any animation happening before it in the stack.
- For example, placing it after a Moov Hair Physics operator will record the simulation results from Moov. If it's placed before Moov, the physics simulation won’t be included in the cache.
- Placing the node after dense hair generation like Hair from Guides will record all hair strands, resulting in higher detail but increased memory usage and larger cache files.
- Placing it before dense hair (on the guides) records only the guide strands. This is faster and more memory-efficient, and still allows the guides to drive the final hair, though with slightly less visual fidelity.
- Adjust Start Time and End Time to define the range of frames to be recorded, especially if you're not using the default playback range.
- You can stop the process at any time by clicking the same button again. All animation data captured up to that point will be saved.
5. At this point you can disable the operators used for animation, if any, like Moov, Oscilator, etc. Now the Animation Cache operator is reading the animation data from the recorded cache.
6. Whenever you want to make changes to the animation, enabled the animation operators, if any, click Clear Recorded Data, make your changes and repeat the steps above to record the animation again.
You can now send the scene for rendering to another user or to a render farm, just make sure that the render farm have access to the animation cache file.
After Recording
Once recording is complete, the Record Animation button will switch to Clear Recorded Data
Clicking this will discard all in-memory recorded data and effectively disable the operator, restoring the hair to its previous state.
Key-framing Animation
You can animate hair by recording changes at specific frames. The Animation Cache operator will then interpolate the results between those frames to create smooth animation.
To record key-framed hair animation:- Move to the desired frame in the Maya timeline.
- Edit the hair below the Animation Cache operator — for example, using the Edit Guides operator or any other.
- In the Animation Cache operator, click the Record Current Frame button to save the current hair state at that frame.
Repeat this process for each keyframe. The operator will interpolate between recorded frames to produce a continuous animation.
Recording File Sequences
If the target Alembic file name contains # characters, the operator will generate a separate file for each recorded frame, rather than a single Alembic file.
For example, if the file name is specified as "Animation.###.abc", and three frames are recorded, the following files will be created:
Animation.000.abc Animation.001.abc Animation.002.abc
Each file will correspond to the timeline frame recorded and will be named accordingly. This sequence of files will be treated as an animated sequence and automatically loaded by the operator during playback. (See Loading a File Sequence above for more details.)
Optimization Tips
When recording animation caches, it's important to consider how much data you're capturing — this directly affects memory usage, cache file size, and playback performance.
Dense Hair vs. Sparse Guides
- Dense Hair Caching
Caching after the hair generation step records every hair strand and each of its strand points (vertices). This results in:- Higher visual fidelity
- Much larger cache files
- Increased memory usage
- Slower processing and playback
- Sparse Guide Caching
Caching only the guide strands (before the hair is generated) is a more efficient approach. While the guides contain fewer strand points, resulting in a less detailed hair deformation in the animation, they are still able to:- Drive the final dense hair procedurally
- Significantly reduce file size and memory usage
- Speed up recording and playback
Choosing the Right Approach
There is no one-size-fits-all method. Use dense hair caching when:- You need precise control over every strand
- High-quality motion detail is crucial
- You are prepared to work with large cache files
- You want fast recording and lightweight caches
- You're okay with procedural interpolation of the final hair
- You're optimizing for performance or iterative workflows
Balance accuracy and performance based on your project's needs.
Tutorial and Sample Scene
Animation Cache Tutorial
The sample scene include the animated dancer and a basic hair stack for you to test the Animation Cache node.