Transfer particle cache from one file to another

As the title states, is it possible to transfer the particle cache of one file to another? I apologize if this is a duplicate, but I don't think I've found a relevant answer

I thought to use the blendcache folders created when saving to disk and using the External option to read from a folder, but it gives "No valid data to read!".

I'm not familiar with particle systems and cache but as far as i know, the cache is saved to the particle system container object by default. So without using the external option, you could try to append (File>Append) the blender file, and chose the emitter object.

• I just tried this and although appending an object with a cached particle system brings over the settings, it does not transfer the actual cache, whether saving to disk or not. – Tritofic Jul 24 '17 at 18:01
• I just tried with cloth cache and it worked. Are you sure? I'll try with particle right now. – Pyros Jul 25 '17 at 11:58
• So, yes, it work. Create your particle system, bake it without checking External. Save your file. Then append this object in a new blend file. I created two cache, one of them give the message "No valid data to read" but it work anyway. I have my two cache available and usable in the new blend file. – Pyros Jul 25 '17 at 12:06
• Alright, I just confirmed that this works, but without checking Disk Cache. It may cause memory usage issues in particle heavy scenes, but another solution I've found is to create and bake particle systems in both files with the same caching name, close the file that needs to be copied to, and copy/paste the files from the blendcache folder of the first file to the file that needs to be copied to. – Tritofic Jul 25 '17 at 16:08

I was investigating this recently and had to resort to reading the source code to figure this out (blender/source/blender/blenkernel/intern/pointcache.c and ptcache_filename()). I was never able to find any documentation for the various idiosyncrasies.

When you create a Disk cache the files end up being named in the pattern %s_%06d_%02d.bphys. The %s is a prefix; the %06d is a frame number; and the final %02d is the index number. For example: 537068657265_000231_00.bphys . It turns out that 537068657265 is what happens when you convert the ASCII for "Sphere" to hexadecimal.

However, if you double-click on the item in the list of caches and give it a name that will be used as the prefix on the filename instead. The fact that this defaults to blank makes it easy to overlook the fact that you can give the cache a name instead of using the hex-encoded name of the object the particle system lives on.

It is possible to use these files as an External cache, but it takes an extra step. You provide the directory containing the files as the File Path, then you have to rename the cache item in the list above it to match the prefix of the files (for example 537068657265) . If you do not rename the cache item from the default blank then it will look for files named like _000231_00.bphys (a blank prefix) and since they do not exist you get the No valid data to read! error message.

Alternately, you can rename all the files to have a blank prefix using a shell script like

for i in *.bphys; do
o=${i#537068657265} mv$i \$o
done

• While not an answer to this question, the format of the bphys files is discussed in the answers to blender.stackexchange.com/questions/15577/… – Mutant Bob Aug 5 '17 at 20:46
• Thanks, this confirms what I did with renaming the particle systems in both files to the same name and then copy/pasting the baked bphys files. It was also interesting to see how the file naming patterns worked without renaming any particle systems. – Tritofic Aug 5 '17 at 20:48