Volumes are well known to take a lot of space. Thought they are certainly the simplest to optimize and easily gain disk space. We invite you to use the Pyro Post Process SOP / MS Volume Optimizer SOP node before writting out your volumes to the disk.
Blast unnecessary fields
When doing a pyro simulation for a simple smoke you won't need all the fields for the render. Removing those fields is the best way to save some disk space.
In general, here are the only fields you should be saving:
- Smoke
- density
- vel (optional)
- Fire/Explosion
- density
- temperature
- heat
- vel (optional)
In general, the velocity field should be deleted if it is not used for driving an other simulation or having motion blur on your render.
Reduce resolution
The more voxel you are saving, the more disk space you will be using. Some fields do not requiere as much details as others.
Reducing the velocity field resolution by 2+ is a good pratice, furthermore that this field is a vector field (3 times heavier than a scalar field).
Compress
The same as what JPEG compression is doing to your image, compressing a volution will group voxel with similar values together.
Masking
To use in combinaison with compressing volume. This process consist to setting a null / zero value to all voxels that will be invisible at render time.
Example: when rendering flames you do not need to save the velocity/heat/temperature where your density is almost transparent.
Use VDB
VDBs, at the difference of volumes, only save voxels where there is information. They are great for storing a smoke trail or any other drifting volumes.
Result
Here is a quick example of how each optimization described above affect the file size. This is the file size of 100 frames after processing each "steps" above.
Volume Type | Original | Blast | Compress | 16bit | Masking | Reduce | Final |
---|---|---|---|---|---|---|---|
Volume | 117mb | 50mb | 21mb | 21mb | 20mb | - | 20mb |
Volume + vel | 117mb | 117mb | 57mb | 57mb | 53mb | 24mb | 24mb |
VDB | 117mb | 49mb | - | 28mb | 27mb | - | 27mb |
VDB + vel | 117mb | 117mb | - | 64mb | 60mb | 32mb | 32mb |
Process:
Please see attached file - volume_cleanup.hip
PS:
Please consider the difference of size between Volume & VDB are minimal. In some cases, VDB will be much smaller than Volumes.