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, it is possible to reuse these caches with the cacheReader behaviour module or with a Atoms Cache Actor

You can also tweak your caches with the cache reader module in combination with the Layout Tool or using other behaviour modules.

Exporting a cache

You can export a cache with the "Atoms Cache Exporter".  

Before you can export a cache you have to set up a level sequence. Create one from the viewport menu.

Then open the sequence into the sequencer and drag and drop the agent groups you want to export.

For each agent group add a new track for the "Static Frame" property:

Set two or more key frames making sure their value actually match the frame number they are on. Set the interpolation of all key frames to linear or the exported simulation won't look right.

Open the Atoms Cache Exporter via the Atoms Crowd Menu: Atoms Crowd > Cache Exporter 

There are few options in the UI:

  • Level sequence
  • Export path
  • Cache Start Frame: The simulation will start exporting only from this frame in the sequencer. The "Set Start Cache Frame" button will take the start frame of the sequencer range and set on the "Cache Start Frame" field
  • Start Sim Frame: The simulation won't start until this frame in the sequencer. The "Set Start Sim Frame" button will take the start frame of the sequencer range and set on the "Start Sim Frame" field

Once all the fields are set you can click export.



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, just drag and drop the file with no padding (i.e. mycache.atoms) inside the content browser. You can then assign the new Atoms Cache Asset to Cache Reader module or to an Atoms Cache Actor.

Warning

Please note, the atoms cache exporter for Atoms Realtime does not export the meshes like the cache exporter for Atoms Crowd does. If you are planning to use these caches in Atoms Crowd supported apps, please make sure to have a valid agent type configuration with skeleton and meshes.