Issue importing OpenVDB files generated from the OpenVDB 4.0.1 c++ library

   4003   7   2
User Avatar
Member
10 posts
Joined: Feb. 2016
Offline
I'm having trouble importing files generated from the c++ library into Houdini. Every time I try I get:

Load failure: RuntimeError: Expected to decompress 656 bytes, got -1 bytes

with some variation on the expected bytes depending on the file/model.

This happens even if I take a .vdb file generated from Houdini, write the grids without modification into a new file and attempt to reimport. The one thing different I have noticed between the original and the new file is that the metadata type “file_mem_bytes” is drastically reduced. However, using the vdb_render program that comes with the OpenVDB distribution I can see that there is absolutely no difference in the models when rendered. Is there something in the way I'm saving files that is wrong? Any help would be appreciated.

For extra clarification, I am running the checkers provided by openvdb::tools on all the grids I read and no clues were offered there. Also, I am using Houdini FX Version 16.0.557 on Windows 10.
User Avatar
Member
1743 posts
Joined: March 2012
Offline
Houdini 16.0 uses OpenVDB 3.3.0, (according to the licenses [sidefx.com] page), which most likely does not support reading VDB files saved by OpenVDB 4.0.1. Is there an option in OpenVDB 4.0.1 to save in the previous VDB format?
Writing code for fun and profit since... 2005? Wow, I'm getting old.
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
User Avatar
Member
10 posts
Joined: Feb. 2016
Offline
Ah that's probably it. I have been checking the versions when reading the files and all my files have returned 4.0, but I'm probably not understanding how the library works. I suppose my next step is to compile the Houdini tools and see if that works.

Thanks for your help.
User Avatar
Member
7709 posts
Joined: July 2005
Online
OpenVDB 3.3 is mostly the same as OpenVDB 4 except with OPENVDB_3_ABI_COMPATIBLE defined. As far as I was told, OpenVDB 3.3 should be able to load OpenVDB 4 saved .vdb files as long as no point grids exist (as that feature requires breaking file format compatibility).
User Avatar
Member
10 posts
Joined: Feb. 2016
Offline
At this point I've tried a lot of things with no success. I compiled my library with OPENVDB_3_ABI_COMPATIBLE set yet Houdini still can't open the files. Trying to build the Houdini OpenVDB 4.0.1 tools for Windows is just a nightmare, so I don't really know where to go from here. Hopefully if Houdini ever uses OpenVDB 4 my issue gets fixed. In the meantime I'll keep my eye out for any advice.
User Avatar
Member
7709 posts
Joined: July 2005
Online
Which compression are you using to write out your .vdb's ? Have you tried disabling compression?
User Avatar
Member
1 posts
Joined: May 2014
Offline
Actually, the OpenVDB file format is identical between 3.3.0 and 4.0.1 which means you can safely read and write Point Data Grids in both, it's just the ABI that's different. (However, you wouldn't be able to read Point Data Grids in 3.2.0 or earlier of course as this is a new feature to 3.3.0/4.0.0.)

I'd suggest using the libraries shipped with Houdini to build OpenVDB if you're not already. Blosc is the main one that can cause problems here as SideFX currently uses 1.5.0, but the latest available version from GitHub is 1.11.2.
User Avatar
Member
7709 posts
Joined: July 2005
Online
Thanks for the correction, Dan! Your suggestion regarding Blosc has probability for being the poster's issue, something that I never knew!
Edited by edward - April 9, 2017 00:02:17
  • Quick Links