How to Cache Physics Simulations in Blender

Caching physics simulations in Blender allows you to bake complex calculations—such as cloth, smoke, rigid bodies, or fluids—into memory or files on your hard drive. This process freezes the simulation data, enabling smooth, real-time viewport playback and preventing rendering glitches. This step-by-step guide explains how to configure, bake, and manage cache files for various physics systems in Blender.

Why Caching is Necessary

By default, Blender calculates physics on the fly, frame by frame. If you skip frames, play the animation backward, or have a complex scene, the viewport will lag, and the simulation will break. Caching solves this by pre-calculating the entire physics sequence and storing it as data files, allowing you to scrub through the timeline seamlessly.

Caching Cloth, Soft Body, and Particle Simulations

For most object-level physics, the cache settings are located directly within the object’s physics properties.

  1. Select the Object: Click on the object containing the physics modifier (e.g., a cloth mesh or particle emitter).
  2. Open Physics Properties: Go to the Physics Properties tab (represented by a blue icon with an orbiting circle) in the Properties Editor.
  3. Locate the Cache Panel: Scroll down and expand the Cache sub-panel.
  4. Configure Cache Settings:
    • Simulation Start/End: Define the frame range you want to bake.
    • Disk Cache: Check this box if you want to save the simulation files to your hard drive (highly recommended for complex animations).
    • Library Path/Name: Give your cache a unique name to avoid overwriting other simulation data.
  5. Bake the Simulation: Click the Bake button. Blender will progress through the timeline, writing the simulation data to disk. Once finished, the timeline will show a dark gray bar indicating the cached frames.

Caching Rigid Body Simulations

Rigid body physics (like falling bricks or shattering objects) are managed globally through the scene settings rather than individual objects.

  1. Access Scene Properties: Go to the Scene Properties tab (represented by a cone and sphere icon) in the Properties Editor.
  2. Expand Rigid Body World: Open the Rigid Body World dropdown menu and locate the Cache sub-panel.
  3. Set Frame Range: Choose the start and end frames for your simulation.
  4. Bake: Click Bake to calculate the entire rigid body simulation.

Caching Fluid and Smoke Simulations (Mantaflow)

Fluid and gas simulations in Blender use the Mantaflow system, which requires caching through the Domain object.

  1. Select the Domain: Click on the Domain object that encloses your fluid or smoke simulation.
  2. Open Physics Properties: Go to the Physics Properties tab.
  3. Choose Cache Type: Scroll down to the Cache section. Under Type, choose your preferred method:
    • Replay: Simulates in real-time as you play the viewport (good for quick tests).
    • Modular: Allows you to bake the base simulation (data) and the secondary details (noise, particles) separately.
    • Final: Bakes all elements of the simulation simultaneously.
  4. Bake Data: Set your frame range, select a file path for the cache directory, and click Bake Data (or Bake All if using the Final cache type).

Managing and Editing Cached Data

Once a simulation is baked, the settings for that physics modifier will be locked. If you need to make changes to your simulation: