Simulation Cache Editor

The simulation cache is created whenever the FBX or the renderer export is enabled. It stores the positions, orientations, scales and joint orientations of the entities of a CrowdField. The simulation cache can be imported into Maya as a hierarchy of keyframed joints for each entity, edited within Maya (by editing the keyframes of the joints) and exported back to the same format.
 

Importing

The Golaem Crowd Simulation Cache Import can be accessed through:
  • Crowd menu: Import Simulation Cache
  • MEL command: importSimulationCache;

Import UI

If import is requested via Crowd menu, it will launch an import interface.
 
The simulation cache editor - Import UI
 
This user interface requests a few mandatory parameters:
The import process may be quite long and/or memory intensive, as a key is built per frame, per joint, and per entity, so it is better to only import frames and entities that will be modified. Entities which are not imported are unmodified: they are kept in the simulation. The import process is hardware-limited by memory, depending on frames number, entities number, and number of joints per entity.
 
Entities IDs are deduced from particle system index. If only a particle system is used, particle ID equals particle index. If several particle systems are used, IDs are stacked: i.e. for a firstly plugged particle system ps1, with particles indexes [0,m], and a second particle system ps2 [0,n], particle IDs will be : 0 to m for ps1, (m+1) to (m+1+n) for ps2.
 
It is useless, time consuming, and memory expensive, to import entities which do not need to be edited.
 
If no start frame is mentioned, first frame found in the cache directory is opened as first frame. If no end frame is mentioned, the first frame failing to import beyond first frame is considered as last frame +1.
 
If no entities IDs are provided, all entities found in the crowd assets association file will be imported, but it is better to make a sub-range or list of IDs to import, to save time and memory. Entities IDs can be a range of [start-end] IDs or IDs separated by coma [1,2,3], or a mix of both.
 

Editing

Once imported, joints can be edited (translated, rotated) individually, in Maya usual way. A common usage may be to remove unwanted entities for rendering: to do so, select the unwanted entity's hierarchy root joint, and translate it far away by editing its animation curves. Note that an entity cannot be taken out just by deleting associated skeleton. At export time, missing skeletons are considered as if they had not been imported. Thus they do not override original ones.
 
The simulation cache editor - Import result
 

Exporting

The Golaem Crowd Simulation Cache Export can be accessed through:
  • Crowd menu: Export Simulation Cache
  • MEL command: exportSimulationCache [outputDirectory];
It rewrites all imported entities, of imported frames, in .pdb32.gz files. If an output directory is provided, new files are created; else the input files are overwritten. Export is usually mush faster than the import process.
 
Warning: When no output directory is provided, input .pdb32.gz files are overwritten; it is advised to backup those files before exporting edited cache.