Compress Houdini VDB and Volume cache:
I started looking for this method after having a project that has 1-2 GB of cached volume file per frame and we had to cache it over the network. Let's do some math here, to read and write 2GB over a network with a speed of 1Gbit (110 MB per second) that would be around 20 seconds per frame and let's say you wanna call it back multiple time for flipbook, render ,advection field.... that would result in huge amount of time waste. Here I will not be talking about deleting attributes which will cut down the size by a couple of MB, I will be talking here about cutting the size by half (a freaking 0.5-1 GB, I know cool isn't it).
In Houdini we deal with two types of volumes, the legacy one and VDB, so I will talk about the workflow of both.
We are lucky that houdini has a pre made node for this called Volume compress if you can use it straight forwards without any addons or with a mask volume as shown below but make sure both ways you tick the (Use 16bit option).
Why to use it with a Mask group, well in your grid most of the time you will end up with voxels that contains data like velocity (which is so expensive on the hard drive) but those voxels have no density and wont show on the final output so why to have them. This is where the mask volume come in handy, first we create a (volume blur) to expand the initial sim by an amount of voxels (in my case 2 was enough) then we feed that to the mask input of the Volume compress node and in there in the Mask Group field we choose the channel we blurred previously and we set the minimum amount of density which every voxel that has less will be ignored, be careful here it should be set to 0 to be in the safe side but in my case 0.01 was fine it saved me a couple of MB.
The other case here is exporting the volumes as VDB files (in my case I needed to import them to be used with Vray grid inside 3ds max), sadly Volume Compress doesn't work with VDB but still there is a way around this by using a Primitive node, inside the volume tab there switch to VDB and tick the last option which will allow you to choose Write 16bit floats. Yes it was that easy.
I really enjoyed writing this article and I hope you find it useful, I'm looking forwards for your feedback.
I should point out here that the core of information presented here are derived from a Japanese article written by Shohei Okazaki.