Skip to content

[BUG] HDDA firstActive() bugged (and fixed) #2009

Open
@yanis-falaki

Description

@yanis-falaki

Environment

Operating System: Linux Mint 22
Commit SHA: 5ff0ed (Latest of Master)

Describe the bug

I'm writing an nvdb visualizer, with voxel values mapped to RGB values to be displayed. I'm rendering via ray marching with nanovdb::math::firstActive(), however with the current firstActive implementation voxels may be skipped when the ray is coming to the voxel at specific angles, producing artifacts as seen below.

Image

Expected behavior

There is an issue and subsequent pr that addresses this. Since it's a few years old and hasn't been merged, I decided to make a new issue to bump it near the forefront again. When the fixed code is implemented, rendering works fine as seen below.

Image

Additional context

The pr uses a delta value of 0.005f. I find 0.001f is better as sometimes the ray will skip through corners and produce artifacts as seen below.

Image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions