Export OpenVDB from ParaView and import it back into ParaView, the data is different, is there something wrong?

I use Paraview 5.11.1 and use the Wavelet data which is in the paraview Source, I export it to OpenVDB
format and then load the vdb file back. But I figure out that the two datasets’s cell number and point number are different. Is that right? Thanks for response.


Looks like an issue to me, could you open it: https://gitlab.kitware.com/paraview/paraview/-/issues

OK, I’ve already opened it.
Export OpenVDB from ParaView and import it back into ParaView, the data is different, is there something wrong? (#22175) · Issues · ParaView / ParaView · GitLab (kitware.com)

In general this is expected to work. The OpenVDB file format should not be considered a mesh representation format as it does not specify whether the grid should be image data, unstructured grid, point cloud, etc. Additionally, the OpenVDB format does not specify whether the field information it is storing is point data or cell data.

I’m struggling with OpenVDB import/export in ParaView as well.

Generally, you can select which data arrays to export to VDB files. For the Wavelet source as a regular grid example, I selected “point array” and that did create a valid OpenVDB file that other tools can read and render. However, exporting “cell array” instead did not produce a valid VDB file. In my understanding, it should create a similar, if not the same, VDB file representing a “fog volume” grid type.

Importing the valid VDB export I just created did not show up as a “regular grid” as I would have expected but as a “partitioned dataset collection” with one block carrying the regular grid. That seems to be a problem for some of the renderers to display correctly.

I wonder if it’s possible to convert to a simple “regular grid” again for rendering.
I tried “Extract Block” and “Pass Arrays” filter but without success.

Did you select point and cell data to export when you tried exporting the cell data? If you did, does it work correctly if you just select cell data and not point data when you export?

I selected one or the other, point array or cell array, but not both, to see what type of VDB is generated.

Turns out I missed to convert point data to cell data before exporting the “cell array” (was using the wavelet source).

After I’ve done that the VDB export now writes valid file!
If I’m not mistaken then “cell data” fits the notion of OpenVDB “volume grid” better.

Glad that this is working. Conceptually cell data fits better into OpenVDB’s voxel data model. Point data is just treated as representing the data over a voxel situated around the point instead of a voxel corresponding to a cell.