Simulation Cache

The Simulation Cache contains the positions, orientations, scales and joint orientations of each simulated Entity. It may also contains blendshapes, squatch and stretch scales, cloth vertices if any. The user can also choose additional PP attributes or Golaem Attributes to export. Each frame of each exported CrowdField is saved as a Golaem Simulation Cache file (.gscf file per frame + one .gscs file per simulation) in the selected output directory. A Simulation Cache Library File is also exported every time a Simulation Cache is exported.
Once exported, the cache can be reloaded for interactive replay and the entities it contains can be moved, added to kill list or imported as Maya joints and re-exported back into the simulation cache thanks to the Simulation Cache Proxy.
The Simulation Cache is also referenced in each Rendering Proxy to be passed to the procedural rendering plugin for geometry generation at render time.
Crowd Field Nodes List of all the available Crowd Fields. Only the Crowd Fields selected in this list will be exported.
Cache Name Exported cache file name.
Start Frame First frame to export. If the selected Crowd Fields are started after this frame, the export will only start at the frame at which the Crowd Fields start.
End Frame Last frame to export.
Additional Attributes Additional per particle attributes or Golaem Attribute to export in the simulation cache. Attributes can be added using the + button and removed using the - button.
Note that the PP or Golaem attributes used as shader attributes must be exported.

There is no default Golaem Attributes exported. The default exported PP attributes are:

  • particleId
  • glmEntityType
  • rgbPP
Output Directory Directory in which the Simulation Cache files will be exported. It is possible to specify one directory per Crowd Field by manually setting each directory (separated by ";").

Advanced Attributes Panel

Export Assets Association Only

If checked, only the gscs file (containing the Assets Association data) of the Simulation Cache is exported

Use Existing Simulation Cache If checked, avoids running the simulation if a simulation cache already exists, and only exports the renderer files.
Export Library Item

If checked, exports a Library File (.gscb) for the currently exported simulations.

Generate Thumbnail for the Library Item

If checked, the exported Library File (.gscb) will also contain a valid thumbnail (else it will be a grey image).

PreExport Callback MEL/Python script command called just before the Simulation Export starts. If the callback code returns an error, the export process is cancelled.
PostExport Callback MEL/Python script command called just after the Simulation Export stops or fails

Export Command

When hitting export, this window issues a glmCrowdSimulationExporter command.

Name & Numbering Convention

The Golaem Simulation Cache files follow the following name template:

cacheName.crowdFieldName.frameNumber.gscf (one per crowdfield per frame)
cacheName.crowdFieldName.gscs (one per crowdField)

The .gscs file contains the global data about the simulation and the correspondence between simulated Entities and Rendering Types. There is only one file per simulation (per CrowdField). The .gscf file contains the result of the simulation (positions, orientations, scales & postures of each Entity). It generates one Cache File per frame.

Golaem Cache Format

The Golaem Simulation Cache format is a binary format, using zip compression, in addition of quantization of positions and orientations. It is meant to reduce cache size on disk, and improve reading/writing efficiency.

If a Detach Behavior is used in the exported simulation or if a Character has some Squatch and Stretch properties, the quantization of positions will be disabled. This will result in greater frame size (usually around 50% bigger).

To handle data contained in Golaem Cache files, a low level API is available. See Golaem Simulation Cache API