Image generated with AI
Simulation caches: bake once, reuse in Blender and Maya
Diego Cortés
Author
The simulation looks perfect, you nudge one vertex, and it starts over from frame one. The problem is rarely the solver: it is the simulation cache. Here is where it lives, how big it gets, and how to bake it once so you never simulate twice.
This is not a tutorial on making cloth or fluids, and it has nothing to do with texture baking: it is the step after the simulation finally looks right. If you are arriving from the cloth walkthrough or from fluids in Mantaflow, here is what to do with the result.
What baking a simulation actually stores
Baking a simulation means storing the result of a calculation, not the recipe behind it. The Blender manual is blunt: while you play back, the result is cached in memory; once you bake, it is protected and you cannot touch the settings without deleting the bake. That protection is what you want before rendering: the render does not recalculate and every attempt gives you the same shot.
The practical consequence stings at first: you cannot re-simulate differently from a cache. You can play it, trim it, blend it. If you need another variation, you simulate again. There is also a range trap: Blender only computes positive frames between Start and End; if the shot is longer than the default range, the cache runs out before the action does.
Memory, disk and external caches: three different places
The in-memory cache fills up while you play back and is cleared by many changes, but not all: the manual uses a changed force field as the case that leaves a stale cache. When something looks wrong, clear it by hand.
Disk Cache writes outside the .blend, into a blendcache_[name] folder next to the file. The .blend must be saved first, and if the path is not writable or is too long, Blender writes nothing, with no warning.
The external cache is the fragile one: you read it from a path of your choosing and the name and index must match the files. With Library Overrides, only Disk Cache is allowed. Cache Step decides how often data is stored: a high value shrinks the folder, but the result may differ.
The files you will see in the folder
A named cache is stored as MyCache_xxxxxx_yy.bphys. With no name it is named after the object, using its internal number, and that is the trap: several unnamed caches on the same object collide and you can lose files. With more than one, always name them from Caches List.
Blender: the cache panel in each simulation type
Everything sits on the same general baking system, but each type has its own fine print.
Cloth and particles: the unified system
Cloth, particles and soft body share the cache and the bake. Three things cost real time: if you move the object after simulating, clear the cache or Blender keeps the old positions; the bake happens per subdivision level, so use the same level in preview and render and check modifier order, which changes the face count between viewport and render; and you cannot change Start or End without deleting the bake. The manual is clear that editing the cache does not work yet. A simple case: Cushion Simulation.
Fluids (Mantaflow): its own cache, Uni Cache and OpenVDB
Fluids use their own cache. Cache Directory uses a subfolder per data type and Offset only applies on load. The mode changes the workflow: Replay bakes while you play and needs Play Every Frame; Modular works in steps; All does it in one go with Bake All. Resumable writes more to disk so you can resume: turn it off at high resolutions.
For volumes you pick a format: Uni Cache, its own compressed format with one file per object; or OpenVDB, one file per frame holding every object, with Zip, Blosc or no compression and Full, Half or Mini precision. Liquid meshes have their own format. If your folder weighs 40 GB, the decision lives here. A case: Photoreal Ocean Simulation.
Rigid bodies: the cache lives in the scene
The rigid body cache is not on the object: it lives in Scene, Rigid Body World, Cache, with Bake, Delete Bake, Calculate to Frame, Current Cache to Bake and Update All to Frame. If you have not saved the .blend, the cache is created in memory and can be lost. And do not confuse precision with speed: Substeps Per Frame and Solver Iterations change the result, not the compute time. Example: Rigid Body Product Simulation.
Maya: nCache, baking with its own menu
In Maya the cache has a name of its own. An nCache stores the simulated state of Nucleus and of fluids and connects to the nucleus nodes, so cached and non-cached objects keep interacting. It exists so you stop recalculating during playback and render, and so you can direct or blend the simulation from the Attribute Editor or the Trax Editor.
Two formats: mcx, 64-bit, which goes past 2 GB with heavy fluids; and mcc, 32-bit, capped at 2 GB. Two warnings: nCloth caches store only the XYZ position of the vertices, not the translation, rotation or scale of the Transform; and they depend on Space Output, so switching it from Local to World throws the cache out of alignment. The full nCloth workflow lives in this post.
The seven nCache commands that matter
Create New Cache offers one file per object, one per frame or a single file. Append to Cache adds ranges: if they overlap, data is blended; if there is a gap, it is interpolated and the gap is not stored. Attach Cache demands the same topology. Merge Caches joins them, Replace Caches swaps them (not with more than one cache), Replace Cache Frame and Delete Cache Frame re-record or trim specific frames, and Delete Cache clears everything.
Evaluate and save every n frames: the slow-motion trick
Evaluate every # frame(s) decides how often the simulation is sampled and Save every # evaluation(s) decides how many samples are stored. The slow-motion recipe is to evaluate every 0.1 and save 1: the cache then holds real data and, scaled up by ten, reads as real slow motion. Without those samples it interpolates in a straight line and you can see it. On nHair, Dynamic State is not cacheable. To hear it in Spanish: Algas con nCloth.
Five rules so you stop losing work
- Save the file before baking. No saved .blend means no cache folder, and whatever is in memory leaves with the session.
- Lock the mesh before baking. A mesh or subdivision change is not recomputed on a protected bake.
- Name the cache when there is more than one on the same object, and settle the space before creating the nCache.
- Check the range. The cache only fills if you start playing before or on the start frame.
- Clean up before delivering. Delete Bake or Delete Cache so you are not shipping 30 GB to the farm or the client.
From cache to pipeline: Alembic when the solver stays behind
Alembic in Blender is a geometry cache, not a parameter cache: it freezes the result so you can open it in another application, on a farm or on a lighter machine. It does not support particles or armatures, hair exports as zero-width curves and particles as animated points. And it has no frames: it works with time and converts using the scene frame rate, which is why 120 fps inside a 30 fps scene does not stretch. Decide on Subdivisions Apply or Use Schema, Flatten Hierarchy and whether you use Render or Viewport settings. If the destination is another tool, check what I wrote about USD. A cache that travels as a deliverable: transferring a cloth simulation to an animated rig.
Troubleshooting: five symptoms and their cause
- The simulation restarts when you scrub: it is not baked, or Start and End do not cover the shot.
- The viewport and the render disagree: a different subdivision level or modifier order.
- The folder is absurdly heavy: Cache Step at 1, Full precision and no compression. Try OpenVDB with Blosc and Half; for the whole project budget, organizing the project helps too.
- It wiped my cache without me touching anything: a change, such as a force field, invalidated it.
- The cache will not load on the other machine: name or index mismatch, relative paths, or a different Space Output in Maya.
Conclusion
Baking is not a button at the end: it is a production decision. A simulation nobody stored gets paid for twice, in compute time and on the farm. If you sort out the cache from the start, the rest becomes boring, which is exactly what you want. On the platform you have Blender and Maya to watch the process on video, and the posts on cloth, fluids and ocean are still there.