Cache Settings Rollout

tyFlow’s realtime timeline caching allows for smooth playback of a simulation in the viewport after it has been computed.

Caches are saved on a per-frame basis, and do not adhere to the simulation’s time step setting (the simulation itself will still run at whatever time step interval is chosen, but the cache will only save values once per frame). tyFlow will still interpolate the subframes of cache data if the flow’s “interpolate ticks” setting is enabled, but if you need to playback your flow with sub-frame accuracy, you should disable caching.


Cache

  • Enable Caching: controls whether realtime timeline caching is enabled or disabled.

  • Clear Cache: clears the contents of the cache and effectively resets the simulation.

Cache channels

  • [Channel name - data type]: lists the available channels to save with the cache, and their corresponding data type.

Data types and their corresponding size in bytes:
byte = 1 byte
int16 = 2 bytes
int32 = 4 bytes
float16 = 2 bytes
float32 = 4 bytes

The number in square brackets next to some data types represents the number of values that must be stored for that particular channel. For example, a position channel requires X/Y/Z values, each of which is stored as a float32 data type. So the size in bytes for a particular particle position value is 12 bytes (float32 x 3 values).

Mapping values are stored as a float32[3] x the number of mapping channels assigned to the particle.

Custom float data values are stored as a float32 x the number of custom float data channels assigned to the particle.

Custom vector data values are stored as a float32[3] x the number of custom vector data channels assigned to the particle.

Custom TM data values are stored as a float32[12] x the number of custom TM data channels assigned to the particle.

You can estimate how much RAM will be required to cache a particular flow by using the following equation:
(number of particles) x (number of frames) x (total size of all saved channels in bytes)
For example, a simulation of 1 million particles over 250 frames which caches particle positions and velocity will require approximately 7GB of RAM. This resulting value should only be considered an estimate, since caching requires some extra overhead not contained within any particular channel. The amount of overhead varies depending on the complexity of the flow and is displayed in the Cache rollout.

Caching can use a lot of RAM up very quickly, depending on the complexity of your flow. If your machine has limited RAM and you are planning on simulating many millions of particles, it is best to turn caching off and instead export the particles to disk using tyFlow’s available export options. tyFlow makes no effort to check whether RAM allocations are possible on a given system, which means that if your RAM is full and tyFlow needs more of it in order to continue a simulation, tyFlow could cause crash. This ‘fast and loose’ approach to simulating is by design, and it is up to the user to ensure their system is capable of handling the simulations they are trying to run.