reading vdb files created by 3.3.0 using earlier 3.x releases?

339 views
Skip to first unread message

do...@image-engine.com

unread,
Jul 18, 2017, 11:30:42 AM7/18/17
to OpenVDB Forum
Hi,

Are .vdb files created with vdb 3.3.0 readable in earlier 3.x versions of openvdb? When opening files I see the following diagnostic:  'unsupported VDB file format (expected version 223 or earlier, got version 224)' but reading metadata & rendering seems to work. 

Is it safe it ignore this warning? 

Cheers

- Don


Dan Bailey

unread,
Jul 18, 2017, 12:43:01 PM7/18/17
to OpenVDB Forum
Hi Don,

The short answer is yes, probably. The warning sounds a little more severe than it is in practice, so we should probably loosen the language a little.

For the long answer, here's a documentation page I put together here at DNeg to explain VDB file format compatibility in a little more detail (as it has been asked here quite a few times):


OpenVDB aims to be as backwards-compatible as possible so that VDB files written with a later version of OpenVDB are still readable with an earlier one. To achieve this, every VDB file has a file format version number, note that this is different to the version of OpenVDB. Here are all the file format versions currently in use:

222 (OpenVDB 1.0) - First official release of OpenVDB (roughly)

223 (OpenVDB 3.0) - Blosc Compression and Point Index Grids

224 (OpenVDB 3.3/4.0) - Point Data Grids

What this means:
  • A VDB file written out with OpenVDB 3.0 is readable with any version of OpenVDB unless blosc compression is enabled or the VDB file contains Point Index Grids (currently not writeable from Houdini). 
  • A VDB file written out with OpenVDB 4.0 is readable with version 3.0 unless the VDB file contains Point Data Grids (ie VDB Points).
Due to the order in which the file is read in, it is not possible to tell if a file contains any features that are not understood by the reader, so if the reader has a file format version that is different to the writer, it will output this harmless warning:

unsupported VDB file format (expected version 223 or earlier, got version 224) 

This is designed to alert the user to the fact that should there be an issue on reading the file, it could be down to a file incompatibility.

Historical note - Houdini 14.0 introduced Blosc compression by default to VDB files, meaning that they became smaller, but un-readable in Houdini 13.0 and earlier. SideFX introduced an environment variable (HOUDINI13_VOLUME_COMPATIBILITY) that disabled Blosc compression so that you could write out VDB files from Houdini 14.0 and still read them in 13.0.


Hope that helps,
Dan

do...@image-engine.com

unread,
Jul 18, 2017, 1:31:35 PM7/18/17
to OpenVDB Forum
Hi Dan, 

Thanks for the help & detailed explanation - I'll sleep a little easier now. 

I'll should I worry about the case where there is a points data grid in the vdb? Will the older versions of the library fail gracefully? 

Cheers
- Don



Dan Bailey

unread,
Aug 12, 2017, 10:27:46 PM8/12/17
to OpenVDB Forum
Hi Don,

Sorry I never replied to your last question here.

It depends on how the library has been integrated into the application in which you're reading the VDB as to how graceful this is handled. If you're reading a VDB file with point data grids in a version in which it isn't supported (3.1.0 for example), on read the library will throw an exception that this grid type has not been registered. If the application wraps the reading with exception handling, then you'll see a graceful error message that it doesn't know what type of VDB grid this is. In practice, we've found that sometimes this isn't the case and the exception won't be caught and will just crash the application. I would suggest that this is a bug for the vendor or developer. Of course they can always upgrade the version to 3.3.0/4.0.2 where this is no longer a problem. :)

Dan
Reply all
Reply to author
Forward
0 new messages