Cache on File

 
 
 

Categories

  • Data Access

Description

Reads or writes attribute information to a file. This node can be used to blend or merge file cache sequences with each other.

For more information about using this node, see Caching ICE Simulations in the ICE Tree.

Note that when caching a simulated ICE tree, only the simulated frames are written to the cache. The first frame is considered to be the initial state and is not simulated; for example, if the scene is 100 frames long, then 99 frames are written to the cache beginning with frame 2 (frame 1 is the initial state).

NoteTo change the default path, file name syntax, and file format used for the cache files, see the File Cache Path Template options in the Simulation Preferences.

Main

File Mode

Choose whether the node is reading, writing, or doing nothing.

  • Do Nothing: cache data in the tree is neither written nor read. This is useful for when you want to keep the node connected to the tree, but you don't want to write or read a cache file.

  • Write Cache: see Writing Cache Files in the ICE Tree. When you select this option, the options needed for writing cache files appear.

  • Read Cache: see Reading a Cache File in the ICE Tree. When you select this option, the Path text box appears.

If you want to drive the File Mode directly, you can use the Caching Mode parameter on the Cache Binding tab.

Path

Enter the path where the cache file is to be saved, or from where it is to be read. Click the browse () button to select a different path.

This path is automatically set according to the Default Path option that is set in the Simulation Preferences.

Tokens

Opens the help topic for Tokens and Templates so that you can see which tokens are available to add to the Path or File Name syntax. You can use any of the Universal tokens, in addition to the Caching ones.

The tokens used in the Path and File Name are automatically set according to what's used in the Simulation Preferences.

File Name

Name of the cache file to be saved. This is the syntax: [object]_[version]_[frame]

To add frame padding to the frame numbers, see the description for the [Frame] token in Tokens and Templates for more information.

If you want to drive the File Name directly, you can use the File Full Name parameter on the Cache Binding tab.

Version

Enter any string to identify this version of the cache file, such as Take1 or A, B, C, and so on. This is used in the File Name.

Format

The format of the cache file:

  • ICECache (.icecache). There is file format documentation for the ICE Cache File Format on the Softimage Wiki.

  • Custom. Enter its file extension in the text box beside this one.

The default format is set by the Cache Type in the Simulation Preferences.

See Cache File Formats for more information.

Resolved Path

Displays the path and file name to use for the cache file. This is for display purposes only.

Attribute List

A comma-separated list of attributes to cache (for example: PointPosition,PointVelocity,Color,Shape,Size,Mass). Make sure that there are no spaces between the comma and the next attribute name.

When you enter attributes here, only those attributes will be cached into the file: they are not added to the required attributes. Specifying only the attributes you want to cache can reduce the cache file size in some cases.

If you don't enter anything here, Softimage automatically makes sure that all required attributes are included. These are the attributes that are used in the object's ICE tree and in the render tree for rendering.

For more information on specifying attributes, see Setting ICE Attributes for Caching.

For a description of all attributes, see ICE Attributes.

All Simulation Samples

Allows subframes to be written to or read from the cache file if you have specified a value greater than 1 for the Subframe Sampling parameter in the Simulation Settings property editor - see ICE Simulation Subframe Sampling.

When this option is on:

  • In Write mode, all the subframes are saved in the cache file.

  • In Read mode, the subframes in the cache file are read for the object to which the cache is applied (if the cache file was written with subframes). The scaling of the subframes is done automatically so that the same simulation results are obtained as if it was a one-frame length.

    If this option is off when reading the cache file with subframes, every subframe is read as a regular frame instead of a subframe so the animation will be longer.

    If the ICETree is not simulated on the object that's reading the cache file, you don't need to use this option. To read subsamples from the cache file in this case, plug a Multiply node into the Current Frame node to multiply the frame by the number of subsamples used in the cache file.

Cache Binding

Mute

True to prevent the node from being executed.

Inputs

Normalize

True to normalize the attribute values from a file with the ones in the scene values when blending; otherwise, handle them as additive.

See Blending Cache Files for more information.

Blend

Specifies the amount of blending of this current file cache sequence. Set to 1 the attribute values are simply overwritten; set to 0.5 the values from the file cache sequence are blended with the previous ones by 50%.

See Blending Cache Files for more information.

Overlay

True to blend file cache sequences for point clouds by overlaying one file cache sequence with a second one; otherwise, use the particle's ID. When overlaying, particles are linearly removed from the first sequence and added based on the second sequence. The balance is defined by the Blend value of the node.

See Blending Cache Files for more information.

Append

Merge the particles into the existing point cloud when loading multiple file cache sequences; otherwise, blend with each other. This option works only on point clouds.

See Blending Cache Files for more information.

File Full Name

Allows you to define the cache path and file name here instead of using the Path, File Name, and Tokens parameters on the Main tab.

You can plug a node into this port, such as the String or File Path node, and define the cache file's path and file name there. This lets you keep the same cache file data as a separate source from the Cache on File node, which allows flexibility in reusing the data in different ICE trees or being able to easily change the data inside the node.

Caching Mode

Allows you to define the caching mode used instead of using the File Mode option on the Main tab.

Values are 0 (Do Nothing); 1 (Write Cache); 2 (Read Cache)

You can plug a node into this port to drive the caching mode directly, such as to switch from reading to writing cache files at different points while playing the simulation. For example, you can plug an Integer node into this port and animate its value to change the caching mode: set the Integer node value to 2 on the first frame to read a cache file that defines the initial state, then set the value to 1 on frame 30 to switch to writing a cache file.

This port also allows you to resume a simulation at any frame. For example, if there's a problem while caching a long simulation, you don't need to resimulate from the first frame: simply read the latest saved frame from the cache file, then switch to Write mode to continue caching the simulation.

Subframe Mode

Use the All Simulation Samples option on the Main tab instead to read and write subframes in cache files.

Ports

Inputs

In Name

Not supported.

Frame

Specifies the frame number to be used to resolve the file name. This is typically driven by a Current Frame node, but you could also use nodes like Frame Cycle Control compound to cycle the frames, or a Multiply or Scalar node to use any multiplier value to change the cache timing.

TipIf you want to play the cache file using the frames in the scene timeline, select the Global Time option in the Current Frame node. This option is off by default, which means that the cache file's local simulation frames are used, which are often offset from the scene's frames.

Outputs

Execute

Output port to connect to execute the node.

Out Name

Not supported.

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License