Plotting Simulation or Animation Data into Cache Files

You can plot the simulation or animation data of any type of geometry into a cache file that you can then use in the animation mixer or an ICE tree. If you’re plotting objects whose data is modified by an ICE tree, their ICE attributes are also cached.

 

Currently, you cannot plot hair simulations in this way.

The cache file that is created is the same type as the one created when writing to a cache file using the Cache on File node in the ICE tree. You can use the cache files you create here in the ICE tree by reading it from the Cache on File node—see Writing and Reading Cache Files in the ICE Tree for information.

You can also use the cache file in the animation mixer. Being able to use cache files in the animation mixer allows you to scale, trim, cycle (loop), blend, etc. the cache files in the same way that you can for action clips. For example, you can overlap two cache clips in time and blend between them, create cycles for looping the animation or simulation, or timewarp the cache clip and play the animation or simulation backwards.

To get the files into the animation mixer, you can select an object and load the files on it, which creates a track and clip in the mixer for the cache file.

Writing to a Cache File

To save the plotted animation or simulation in a cache file

1. Select one or more objects whose simulation or animation you want to cache.

2. Choose Tools > Plot > Write Geometry Cache from the Animate toolbar.

3. In the Caching Options property editor, select a File Name and Path for the cache file. The Path is automatically set from the defaults set up in the Simulation Preferences property editor. The current path is displayed below the Path text box.

 

You can click the Preferences button at the bottom of the property editor to open this property editor in which you can change your File Cache Path Template preferences—see Setting the Default Paths for Cache Files.

4. Select a format for the cache file: ICECache (.cache), PointCache2 (.pc2), or Custom—see Cache File Formats.

5. Set the Start and End Frame values to determine the range of frames to be cached. The Step value tells Softimage the frame step increment to use—for example, if this value is 2, every other frame is plotted.

6. On the Attributes tab, select all ICE attributes that you want to have or be calculated as part of the cache file. All required attributes are included in the cache file, whether you select them or not.

7. Select the Overwrite existing files option to overwrite any cache files that have the same path, file name, format, and frame number.

8. Click the Cache! button when you’re ready to go.

This starts the process of plotting the object’s animation or simulation and saving it in the cache file that you have specified.

When this is finished, you can load the cache file into the animation mixer, as described below.

Loading the Cache File into the Animation Mixer

Once you’ve created a cache file, you can load it into the animation mixer. You can apply the cache file to the same object for which you created the cache file, or to another object.

If you’re loading a cache file onto a different object, the number of points on this object must match the number of points that were on the object whose data was cached.

For more information on the animation mixer in general, see The Animation Mixer.

To load the cache file into the animation mixer

1. Select the object to which you want to apply the cache file. This can be the same object for which you created the cache file, or another object to which you want to apply the cache file.

2. Choose Plot > Load Geometry Cache to open a browser or open the animation mixer and go to step 5.

3. Select the cache file you want to load and click OK in the browser.

4. If the selected object is simulated, you will get this message:

Warning: You are about to load a file cache onto a geometry, but the operator stack contains simulation. Do you want to remove the simulation?

- If you select Yes, the simulation on the object is deleted—gone, daddy, gone! If this is an ICE simulation, the ICETree operator is deleted from the Simulation construction region.

- If you select No, nothing happens. If you still want to load a cache file while keeping the simulation, you can use the Cache On File node in the ICE tree (see Writing and Reading Cache Files in the ICE Tree).

5. Open the animation mixer (press Alt+0) and you can see that the cache file has a clip created for it on a FileCache track, if you loaded with the Load Geometry Cache command.

 

If you didn’t use this command or you have some files you want to load in manually, you can create a track and load the clip by doing these steps:

- Create one or more FileCache tracks in the animation mixer by choosing Track > Add File Cache Track from the mixer’s toolbar. If you want to blend between multiple cache files, you need a track for each cache file clip so that they can overlap each other at the same frames.

- Import one or more cache files (one at a time) directly onto the tracks by right-clicking on the File Cache track and choosing Insert Source or Load Source From File, then select the cache action source in the model or the cache file you’ve created.

When you do this, you may get the same warning as in step 4. Select Yes or No as you like.

 

6. Now you can use the cache clip like a regular clip in the mixer: cycle, bounce, bring in more clips and blend them with transitions, use timewarps to reverse the simulation, and so on.

 

 

Currently, you cannot create compound clips for cache files.

Normalizing the Clips

The Normalize option in the Mixer property editor is important when you’re loading cache files into the mixer—see below.

To open the Mixer property editor, select Mixer > Shape Mixer from the mixer’s toolbar, or access it from the explorer by expanding the model’s Mixer > Compounds > FileCache > CompoundContainer node and clicking the Mixer icon.

• When loading the cache file into the mixer, you can use the Normalize mode in the Mixer property editor to drive the cache file blending. If you want to overlay the clips, deselect the Normalize option (values are additive); if you want to blend the cache files per particle, select the Normalize option (values are averaged).

• If you’re caching a simulation (such as particles or deformations) and manipulate the clip, such as scaling it, you should turn off the Normalize option in the Mixer property editor. This is because at each frame, the original simulation applied to the point cloud or object changes the number of points and their index value. So, if you’re scaling the clip, the interpolation tries to normalize these values, but it can’t because they change at each frame.

See Controlling How Weight Is Mixed for more information.



Autodesk Softimage v.7.5