In Atoms you can save your simulation on disk using the Atoms cache, then it is possible to reuse these caches using 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 the agent group you want to export from the list, then choose a path where your cache will be saved.
You can also 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 che cache path. Rewind the scene and atoms will load the cache.Atomsでは、Atoms Cacheを使用してシミュレーションをディスクに保存できます。その後、「CacheReader」Behaviourモジュールを使用して、これらのキャッシュを再利用することができます。 Atoms Cacheは、軽量かつ高速であり、シーンのパフォーマンスを向上させることが可能です。
Cache ReaderとAgents Layout Toolを使用すると、キャッシュを編集および調整することができます。
Exporting a cache
Cache Exporter GUIは、シェルフボタンを使用するか、Atomsメニューから開くことができます。Atoms> Export> Cache Exporter
リストからエクスポートを実行するエージェントグループを選択した後、キャッシュを保存するパスを選択できます。複数のエージェントグループを選択することも可能です。それらは、すべて単一のキャッシュに保存されます。
他にもいくつかのオプションがあります。
- 開始/終了フレーム
- Multithread:多数のエージェントに使用されます。
- Compress:各キャッシュファイルを圧縮します。
- Random Access Compress:ファイル内の各エージェントを圧縮します。ユーザーが、エージェントをランダムに読み込むことを計画している場合に最適です。例えば、後でエージェントを個別にタイムオフセットする場合などに適しています。
Cache Exporter
Cache Exporterは、フレームごとに4つのファイルをエクスポートします。
- header:現在のフレームのエージェント数、作成されたエージェントの数、削除されたエージェントの数などの基本情報
- frame:エージェントの種類、位置、速度、bbox、バリエーションなどのエージェントデータ
- meta:エージェント メタデータ
- pose:エージェント スケルトンデータ
キャッシュの移植性を高めるために、すべてのエージェントタイプファイルは、キャッシュファイルの隣のサブフォルダに保存されています。キャッシュには、開始フレーム、終了フレーム、エージェントIDなどのグローバル情報を含むパディングのないファイルもあります。
キャッシュをインポートする
ディスクからキャッシュをインポートする場合は、新しいエージェントグループを作成した後に、CacheReaderモジュールを接続します。キャッシュパスを設定する "cachePath"アトリビュートを作成します。シーンを巻き戻すと、Atomsがキャッシュを読み込みます。