Category Archives: Pyro

How to minimize your pyro simulation cache file size

For those just starting off with Pyro you realize really quickly that cache sizes can really quickly get out of hand. I have personally seen .bgeo.sc files that have exceeded 1.5gb per file. This can really put a damper on how detailed we are able to make our simulations, so how do we make really detailed sims and not lose all of our hard drive to a single sim. Here are a couple of tricks for H15 that I have found to get the file size down to a really manageable level.

  • Use a file node after your import_pyrofields node in the pyro_import node instead of caching from inside of the simulation or from the import_pyrofields node itself. This will allow you to use a couple of the following tricks.
  • Uncheck any fields that are not directly needed for your purposes on the import_pyrofields node. These checkboxes are found on the Import from DOPs tab, in the Fields tab. One of the biggest ones here is the vel field. If you are not using your simulation to drive any other geometry or particles, you don’t need to store the vel field. The reason for this being such a huge savings is that you are eliminating a vector, or 3 float values, from each voxel. To put this tip into perspective, in a large, detailed sim, you can easily have more than 6 million voxels. Each of these voxels stores data for each field included, which will amount to 6 million float values for each frame. If each number is a 128-bit number, that equates to roughly 96MB per field per frame. Triple that for the vector fields like vel. To run the pyro shader, you usually only need 3 fields; Density, Temperature, and Heat. So if all you are doing is making an amazing explosion, you can turn all but those off. If you are only making smoke, no fire, you only need the Density, field, so you can make those simulations incredibly detailed and still have space on your hard drive.
  • Delete any unneeded attributes from your simulation. This is a good tip in general before you cache out geometry, be it volumes, points, or primitives. Extra attributes that are stored take up space for the same reasons that the fields do. So remove them, and watch your file size plummet.
  • Convert your volume to a VDB with a Convert VDB SOP before saving. This will force Houdini to use VDBs to store and load the data, which are much more efficient at managing data than the standard voxel model that is used to simulate on. The voxels are more efficient for that, but once the calculations are done, they are no longer needed and take up quite a bit of space.
  • There is an option on the import_pyrofields node for compressing fields, I have not experimented with this in my workflow just yet, but I plan to soon, so I will update this trick if it helps as much as I hope.

These tricks are all things that I figured out while working on my Pyroman and Ink projects. In both cases the cache file sizes were exceeding 1.5gb/frame, which was untenable with the storage space limitations that I had. Utilizing these steps I was able to get them down to right around 200MB, a 1:7.5 reduction!