Caching simulation![]() | |
The simulation can be baked in "cache" files. To cache a simulation, just set
the attribute CacheName in the syCloth node.
(See cache). You can blend together cache files using the node syCache (see blend cache just below). You can also render cached simulations on a render farm without using any Syflex licenses (see below cache render). | |
Blend Cache![]() | |
![]() The cache node is completely independent from all the other simulation nodes. It allows to blend together cached simulations. Using this node you can:
![]() To create a cache node:
![]() ![]() Attributes of the cache node:
![]() ![]() There are four paintable attributes: - map1 - map2 - map3 - map4 This allows to select parts of the object for each cache. The painted value is multiplied by the global Blend attribute. Use the right button of the mouse to select the map you want to paint. Save/Read Mesh ![]() This items in the Syflex > Cache menu let you save/read one frame from a cached simulation from/to a mesh. You need to have a mesh selected prior to calling these functions.
If you want a simulation to end on a specific shape, you can model this shape, save it in a cache file. Then use a blend cache node to blend the simulation with this shape. | |
Cache - Render![]() | |
When the bottleneck is in the rendering, you want to render on as many machines
as possible, without being limited by the number of Syflex licenses.
This can be achieved easily by using the cache. First, use the cache to bake the simulation data in files (see the cache attribute in the cloth). Then instead of using the normal syflex plugin, the render needs to access the cache version of the plugin. This version has the same name, so you don't have to modify your scene. This plugin is not installed by default. You can find it on the CDrom at the following locations:
You cannot modify any parameters of the simulation, except the cache file name in the cloth attributes (under extra-attributes). If the cache was created on SGI, and you want to use it on a PC (or vice versa), you need to convert the data. Use the command syflex_cache: syflex_cache cache_file.1 new_cache_file.1 You may need to convert all the cache files. Use a loop command in unix:
The cache file structure is very simple, allowing you to build your own tools to edit
this data. It is a binary file, containing:- all the vertex positions first - then all the vertex velocities Each position (or velocity) consists of 3 floats values (x, y and z). Vertices are ordered in the same way as in Maya. | |
Removing Frames![]() | |
You can easily check which frames are saved. For instance if the cache name is "C:\tmp\a." (files are "C:\tmp\a.xxxx") call the mel command: syCacheGetFrames "C:\tmp\a." It returns (in a string) the saved frames, using the following format: - a frame number - or two numbers a:b meaning frames a to b You can remove frames in a cache. For instance to remove frames 5 to 10 and frame 20, call the mel command: syCacheDelFrames "C:\tmp\a." "5:10 20" To remove all the cache files: - Select the cloth - Syflex > Cache > Clear Cache | |
Format![]() | |
The cache file has a very simple format. It only contains the vertex positions
and velocities. If the cloth has n vertices, the cache file contains
n*2*(3*floats). Positions are saved first, followed by velocities.
There is no header in the file. |