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