AcademySoftwareFoundation / AcademySoftwareFoundation/openvdb

Displacing points increases active voxel count

Open
#704 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
3.4k
Forks
774
Avg merge
3d 9h
Merged PRs (30d)
34

Description

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

```cpp
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)

Contributor guide

Open the contributing guide

Research direction

Start at the openvdb::Accessor::setValue call shown in the issue and reproduce the active-voxel count before and after translating the Coord values. Compare the resulting grid structure and memory usage, then document the cause and how origin and spacing should be represented in an OpenVDB grid.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.