AcademySoftwareFoundation / openvdb

OpenVDB - Sparse volume data structure and tools
http://www.openvdb.org/
Apache License 2.0
2.71k stars 660 forks source link

add next hit HDDA to PNanoVDB #1600

Closed gaida-exe closed 1 week ago

gaida-exe commented 1 year ago

Signed-off-by: Sebastian Gaida sebastian-gaida@gmx.de

gaida-exe commented 1 year ago

This PR adds a new variant of the HDDA algorithm to PNanoVDB. Before, there was only a zero crossing function, and this would add a variant that gets the next hit above 0. Reason: The background value is often 0 and therefore the other HDDA zero crossing would never report a hit, because it checks for a sign change from start of the ray to tested voxel.

gaida-exe commented 1 year ago

Hello @kmuseth I checked NanoVDB and if there is a function that matches the current proposed function and there is. The TreeMatcher, like the proposed function, also marches with the HDDA to find the first active value and return true as well as the coordinates ijk. The difference is that the PNanoVDB function only returns if the value is greater than a given minimal value. This is essentially the same check that you are doing in NanoVDB for the Generic Grids(this is a link) In PNanoVDB we can't check for nullptr, but we can check for a value greater than 0 and also add the functionality to check for a value greater than the desired (link).

danrbailey commented 1 year ago

Hi @gaida-exe, can you push an empty commit to this MR to trigger the CI to run again? Seems like it got stuck on one of the builds so we cannot merge in it's current state, thanks.

linux-foundation-easycla[bot] commented 1 year ago

CLA Missing ID CLA Not Signed

linux-foundation-easycla[bot] commented 1 year ago

CLA Missing ID CLA Not Signed

gaida-exe commented 1 year ago

Sorry for the CLA noise.