Caching Fluids and Meshes
Caching is an essential element with simulations in general, not only with RealFlow | Cinema 4D. As a user of MoGraph or Cinema 4D's cloth and body dynamics you are certainly aware of this process.
There are a few things you should know about caching anyway:
RealFlow's file format for particles and meshes is Alembic Ogawa.
When a simulation is being cached the data is written to disk. Depending on the number of particles the cache files can become very large in size.
Cached simulations cannot be influenced anymore, e.g. through daemons or objects. If you want to do that you have to re-simulate from scratch.
It is possible to create a preview or play, stop, and resume the simulation at any frame.
Meshing can be done in a separate pass once the particle simulation has been finished.
Rendering from cached simulations is much faster, because all the simulation and mesh data is already existing.
As long as you don't specify another "Cache Folder" or change a fluid/mesh name, existing files will be overwritten when you press "Cache Simulation | Meshes" again.
For more questions and information about caching we recommend the → "Caching" page in the "Ask" section.
The Caching Process
In order to cache a particle simulation you just have to follow two simple steps (the workflow is exactly the same for meshes, but here an existing particle cache is required):
Â
Â
Change the "Cache Folder (macOS | Windows)" to your own needs before you cache the simulation.
Specify the "Cache Folder" in (the default folder is configured under Cinema 4D > Edit > Preferences... > RealFlow):
Click on "Cache Simulation" or use the menu command Cinema 4D > RealFlow > Cache Simulation.
If the scene contains fluid and mesh nodes both elements will be cached together when you hit "Cache Simulation". You can avoid this if you make the "Mesher" node inactive (disable the green check mark in Cinema 4D's "Objects" manager).
Visual Hint
When RealFlow | Cinema 4D is in cache mode ("Use Cache" is enabled) you will see a hint in the HUD and that the main logo in the viewport has changed:
Â
The Cache Files
In Cinema 4D, scene elements can have identical names and so it is possible to have to "Fluid" containers or "Mesher" with the exact same name:
To avoid overlapping or overwritten data, the simulated nodes must have unique names, especially if the cache folder is being shared with other scenes.
"Output Name" inside "Cache" group can also be used to avoid collisions.
Â
Â
Cache file names will follow this pattern:Â
name_frame.ext
Â
Extending a simulation and resume caching from the last cached frame.
If you have already cached your simulation but you want to extend it for some frames without having to recalculate your already cached frames, you can do so.
In order for the "Cache Simulation" button not to overwrite your already cached frames, you have to move the frame selector to your last cached frame and then go to each fluid's node, click on the "Create Initial State" button and activate the "Use Initial State" checkbox.
Then go to the timeline and change it so the active range of frames goes from the last cached frame till the new last frame.
You can now press the "Cache Simulation" button and it will be calculated starting from the stored "Initial State" from the last cached frame till the new last frame without having to recalculate everything again.
Â
Here you have a video showing the process in a simple scene:Â
Â