Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In Atoms you can save your simulation on disk using Atoms caches, then it is possible to reuse these caches with the "cacheReader" behaviour module. The Atoms Cache is lightweight and fast and it can increase the performance of your scene.

With the cache reader and the agents layout tool you can edit and tweak your cache.

Exporting a cache

You can open the cache exporter GUI using the shelf button or via the Atoms Menu: Atoms > Export > Cache Exporter

You can select one or more agent groups from the list, then choose a path where your cache will be saved.
You can also If you select multiple agent groups and they will all be saved in one single cache.

There also few other options:

  • Start/End frame
  • Multithread: to be used for high number of agents
  • Compress: compress each cache file
  • Random Access Compress: compress each agent in the file. Best if you are planning to read randomly the agents keeping the benefit of compression; for instance, if you will time offset agents singularly later on.


Cache Exporter

The cache exporter will export four files per frame:

  • header: basic info such as number of agents at the current frame, number of created agents and number of deleted agents
  • frame: agent data such as agent type, position, velocity, bbox and variation
  • meta: agents metadata
  • pose: agent skeleton data

To make the caches more portable, all the agent type files are saved in a subfolder next to your cache files. The cache will also have a file with no padding containing global infos, such as start frame, end frame, agent ids, etc.

Importing a cache

To import a cache from disk, create a new agent group and then attach a cacheReader module. Form the "cachePath" attribute you can set the cache path. Rewind the scene and atoms will load the cache.