nCache XML description file
 
 
 

When you create an nCache, your cache is saved to disk as a .mc (Maya cache) file and an .xml description file is generated for your cache. The XML (eXtensible Markup Language) description file contains a list of important cache attributes that Maya uses to locate the cache files for your Nucleus objects, and a list of attribute values (see extra) that identifies what object setups correspond with which cache files.

You can use the XML description file to keep track of your nCache files and their associated objects, passive objects, constraints, and scenes.

Note

The XML description file is read-only.

The nCache information contained in the XML description file is structured or organized by XML element and attribute. Each regular element (such as cacheType and Channel) or nested element (such as channel#) contains single or multiple attributes (such as Type, ChannelName, or SamplingRate) that list specific nCache or object properties.

Autodesk_Cache_File

cacheType

Specifies the format of the nCache on disk.

Type

Select one of the following Type options.

OneFile

Specifies that the nCache is contained in a single Maya cache file.

OneFilePerFrame

Specifies that the nCache is divided into multiple Maya cache files, one file per cached frame.

time

Range

Specifies the frame or time range of the nCache. For example, if a nCache contains an nCloth object’s simulation from frames 1-25, then the Range attribute would be 250-6250.

The time range is measured in time steps. Time steps are sub-frame units. Each nCache frame contains multiple time steps. The number of time steps contained in a frame is determined by your current Working Units (Time) user preference setting.

Number of time steps per frame = 6000/frame rate. For example, if your Working Units (Time) preference is set to Film (24 fps), then each of your nCache’s frames contains 250 time steps.

cacheTimePerFrame

TimePerFrame

Specifies the number of time steps in each frame for the nCache.

cacheVersion

Version

Specifies the version number of the Maya nCaching functionality that created the current XML description file and its nCache files.

extra

Specifies the following for the nCache:

  • The name of the nCache’s Maya scene file and its location on disk at the time of cache creation.
  • The version of Maya in which the nCache was created.
  • The name of the user account that created the nCache.
  • The names of the passive objects that share the same Maya® Nucleus solver as the cache’s Nucleus object. This description extra does not apply to Fluid nCaches.
  • The names of the constraints currently applied to the cache’s Nucleus object. This description extra does not apply to Fluid nCaches.
  • Text from the Notes field on the cached object’s shape node Attribute Editor tab.
  • All the Nucleus object’s nCloth, nucleus, and dynamicConstraint node attribute values at the time of cache creation. These attributes and values also appear in the Channel Box for each node.
    Note

    If you cache the simulations of multiple objects to a single cache, the XML file will list the attribute values for each cached object and all their passive objects and constraints, if applicable.

Channels

Contains all object or channel-specific cache information.

channel#

Each cached object is assigned its own channel# nested element. For example, if you select 5 nCloth objects, set File Distribution to One File or One File Per Frame, and cache their simulations, then one XML description file would be generated and it would contain the following nested elements: channel0, channel1, channel2, channel3, and channel4. However, if you set File Distribution to One File Per Geometry, then one XML description file would be generated for each of the selected objects and only one channel# nested element would appear in each .xml file.

ChannelName

Specifies the name of the object to which the cache belongs. This value is unique to each cached object.

ChannelType

Specifies the data type of the array in which the channel’s cache data is stored. Since polygon mesh data is stored as Float, only FloatVectorArray is supported for nCloth caches.

Channel Interpretation

Specifies which type of object data is driven by the channel’s cache. The type of data depends on the type of object that is nCached. For nCloth caches, only the Positions attribute value is supported. Fluid nCaches support the following attribute values: Density, Velocity, Temperature, Fuel, Color, Texture coordinates, and Falloff.

See Caching for information about cachable nParticle attributes.

SamplingType

Specifies whether or not the channel’s simulation samples are saved to disk at equally spaced intervals. Regular indicates that the samples were saved at equally spaced intervals and Irregular indicates that the samples were saved at unequally spaced intervals.

These values are used by Maya to help it search for the channel’s cache files on disk more efficiently.

Typically, the sampling type for an nCache is always Regular after creation. However, if you edit your cache in a way that changes its sampling interval, its sampling type will change to Irregular. For example, if your nCache evaluates every frame, and you append a cache to it that evaluates every 2 frames, then your cache’s sampling type would change to Irregular.

SamplingRate

Specifies the spacing of the channel’s nCache files on disk when they were first created.

SamplingRate = Evaluate every # frame(s) x Save every # evaluation (s). For example, if you set Evaluate every # frame(s) to 0.5 and Save every # evaluation(s) to 1, and your user Working Units are set to 24 fps, then one sample would be taken and saved to your nCache every 125 time steps or half-frame.

StartTime

Specifies the time in time steps for the channel’s first nCache file on disk.

EndTime

Specifies the time in time steps for the channel’s last nCache file on disk.