DMM Cache
The DMM Cache saves the DMM simulated Tet Mesh vertex positions.
When the cache is on, simulation can be played not only forward but backward as well.
The viewing technique of "scrubbing" can also be done by using the mouse to move current
time backward and forward on the time line.
Complex simulations will run faster when replayed with cache on.
DMM Cache must be enable when effects such as blurring are enabled, as it cause the Maya time
to go back and forth in time (the DMM simulator can't play backwards).
To turn the DMM cache on or off, select or unselect the "DMM Scene >> Enable DMM Cache" menu item.
Each DMM Scene node controls its own cache. The node has several attributes that affect the DMM cache.
To select the active DMM Scene node, click on the "DMM Scene >> Select Active DMM Scene Node" menu item.
The Maya Attribute Editor will display the following attributes for the DMM cache:
The Cache Pathname attribute can be either:
-
A) blank: the cache file is created in the Scenes location of the active workspace
and its name is F.S.dmm_cache where F is the scene filename and S is the DmmScene
node name.
-
B) a filename: the cache file is created in the Scenes location
of the active workspace,
and its name is the specified name with dmm_cache being its extension.
Example: myfile
-
C) a relative path without a filename: the cache file is created in
the specified sub-folder of the Scenes location of the active workspace,
and its name is as described in A.
Example: mysubfolder\
-
D) a relative path with a filename: the cache file is created in
the specified sub-folder of the Scenes location of the active workspace,
Example: mysubfolder\myfile
-
E) an absolute path without a filename: the cache file is created in
the specified folder,
and its name is as described in A.
Example: C:\myfolder\
On other platforms than Windows: /myfolder/
-
F) an absolute path with a filename: the cache file is created in
the specified folder,
and its name is the specified name with dmm_cache being its extension.
Example: C:\myfolder\myfile
On other platforms than Windows: /myfolder/myfile
Environment variables can be used, for example $TEMP\myfolder\myfile
On Windows, the default location for Scenes is My Documents\maya\projects\default\scenes
Once the cache is created, it's possible to change the behavior of the cache. If "Enable Cache Tweaks"
is selected, then the following features can be used.
Cache Settling (seconds) |
The first frame after the settling time becomes the first
frame of the simulation. So if t0 is the time that the simulation begins, and
ts is the settling time, all frames before t0+ts will become
the frame at t0+ts. So the simulation will not move until after
the settling time.
This allows the DMM plugin to not display the early frames of the simulation, where DMM Objects
usually settle in place.
|
Cache Cut-off (seconds) |
DMM objects are frozen the specified number of seconds
before the last cached frame.
|
Cache Offset (seconds) |
Moves the cache time with respect to the Maya timeline |
Notes:
-
When just turned on, the cache is empty. The animation needs to be played once to cache the DMM simulation.
Only a played frame will be cached
-
When turned off, and turned back on, the DMM cache is cleared of its data
-
When the Maya scene file is renamed and DMM cache is on, the cache file will be
renamed accordingly the next time the animation is played
-
When the cache is on, DMM objects movement are interpolated using the cached data
until the last frame in the cache is reached
-
The DMM Cache file doesn't save out the DMM states such as the internal stress of each object.
Therefore, when opening an existing Maya scene (for which the DMM simulator has created a cache
file) and extending the timeline beyond what's in the cache, DMM might create some simulation
artifacts when calculating the new frames. In this case it is recommended to reset the DMM Cache
and completely recalculate the simulation.
-
If a DMM Scene node is deleted with cache on, the cache file won't be released
until the node is really reclaimed by Maya, thus preventing a newly created
DMM Scene node with the same name to access the cache file. Set the undo queue size to 0
and then back to the original value to have Maya to reclaim the deleted nodes
(Preferences >> Settings >> Undo)
-
Because the same cache file is used for Batch Rendering, it's recommended to not modify the
DMM Cache when doing Batch Rendering.
-
When doing batch rendering, Maya creates a temporary copy of the Maya scene file. The name
of this temporary file is the same as the original one (with some numbers appended to it)
and the plugin takes advantage of that to find out the name of the cache file. But if
a file name prefix is specified in the Render Settings, then the temporary scene file is named
using that prefix. So that prevents the plugin to find the correct cache file. To avoid this,
specify the cache filename in the Cache Pathname attribute of the DMMScene node.
|
Next: Exporting and Importing DMM Animation