openvdb icon indicating copy to clipboard operation
openvdb copied to clipboard

Displacing points increases active voxel count

Open medakk opened this issue 5 years ago • 0 comments

I am initializing a OpenVDB level set from another data structure, something like:

while(...) {
    idx = GetNextIndex();
    pixel = GetNextPixel();
    coord = openvdb::Coord(idx[0], idx[1], idx[2]);
    vdbAccessor.setValue(coord, pixels);
}

The number of active voxels are 10498. If I displace all the indices by a constant amount(basically I have to translate them according to an origin), the number of active voxels becomes 12117. This translates to increase memory usage. What's causing this?

(my fundamental problem is that that original data has a concept of an "origin" and "spacing" between voxels, and I'm trying to recreate that in an OpenVDB grid)

medakk avatar Apr 21 '20 02:04 medakk