Animation Cache Operator
The Animation Cache Node is designed to record and playback the cached version of your hair animation in real-time. You can export the animation of the guides or hairs to an .abc file using our Alembic Exporter and the resulting file will be automatically loaded into the Animation Cache operator.
Parameters
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 this option is on, the loaded hair data by this operator completely overwrites any input strands making this operator only output the loaded animated hair. This is useful if you want to completely capture and cache the state of your hair stack in a particular position. - Apply Amount
Determines the intensity of the effect, can be used to blend animation. - File Name
This is where you can load .abc file exported using the Alembic Exporter. This parameter also allows you to specify a new .abc file to save when using the Record functionality. There are two buttons next to the file path text box. One allows opening of an existing Alembic file, and another is to save new Alembic files if you plan to record current hair state or animation.
You can also load a sequence of files using the "#" character inside the file name. More on this below. - Time Offset
Specifies the start of animation in the scene relative to the first sample. You can use these two parameters to control the delay and playback speed of the animation. - 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 settings control which information is read from the cache Alembic file. Turning these settings on and off can reduce the read time and memory footprint of this operator in the scene.
- Import Widths
When on, strand width information will be imported from cache file - Import Texture Coordinates
When on, texture coordinates will be imported from cache file - Import Channel Data
When on, strand data will be imported from cache file - Import Strand Groups
When on, strand groups will be imported from cache file - Import Strand Ids
When on, unique strand ids will be imported from cache file
Loading a File Sequence
File name parameter can contain "#" characters to denote a sequence format, ex. MyHair.###.abc. If such characters are encountered multiple .abc files will be loaded matching the sequence numbering, ex. MyHair.01.abc, MyHair.02.abc, MyHair.03.abc, etc. Timing inside the .abc files will be used to animate the resulting hair.
On-Demand Alembic Sequence Loading
As outlined above, the File Name parameter can contain #_ characters in which case a sequence of _Alembic files can be loaded each containing individual animation frames. The loading of these files happens on demand. This means that, if for example, you have three files:- myfile.000.abc
- myfile.001.abc
- myfile.002.abc
then myfile.001.abc and myfile.002.abc will not be loaded until this modifier is evaluated on frames 1 and 2 respectively.
Such loading allows saving memory and processing power when rendering scenes containing heavy hair data sequences.
Recording
The recording section in the Attribute Editor allows you to capture one or more frames of static or animated hair and save them to an external _ Alembic.abc_ file. This state will then be used with this operator or with any other Animation Cache node which references the same .abc file.
The recording process will capture hair positions, widths, UV coordinates, strand groups, and any strand data. Current Maya animation play range will be recorded. Therefore, before recording make sure you change the animation range to match your desired recorded results.
To begin recording press the Record Active Time Range button. During recording you can press the same button again to stop the recording process at any time. Any data already recorded will be saved.
Once the recording is done the Record Active Time Range button will change to display Clear Recorded Data. Pressing this button will delete any in-memory recorded data making the operator not do any changes to the hair.
Key-framing Animation
It is possible to animate hair by recording changes to hair at individual frames. Animation operator will then linearly interpolate the frames in between to animate the hair. To record keyframed hair animation:- Change time to the desired frame
- Edit hair shape below the Animation operator (e.g. with an Edit Guides operator)
- In Animation operator, press the Record Current Frame button
Recording File Sequences
If the target Alembic file name has "#" characters in its name then a sequence of per-frame files will be produced instead of a single Alembic file. For example, if the file name specified is Animation.###.abc and there are three frames being recorded you will end up with three files: Animation.000.abc, Animation.001.abc, Animation.002.abc. The digits within the file name will reflect the frame being recorded within the scene. This sequence of files will be loaded by this operator as an animation (read above for more).
Tutorial and Sample Scene
Loading the player ...
Animation Cache Tutorial |
The sample scene include the animated dancer and a basic hair stack for you to test the Animation Cache node.