Closed arterms closed 1 year ago
Hi thanks for doing this fix.
It does not seem correct to me as clamping t_traverse to far plane would not terminate marching. As a result there would be many zero length segments returned in intervals.vals
I think it should be just break the loop once t_traverse exceed the far plane
Have you printed out the returned intervals?
Yes, I have checked this PR by printing out the returned intervals. It doesn't produce degenerated samples with intervals of zero length. Moreover I have added a test named test_traverse_grids_with_near_far_planes
to verify that no points are sampled behind far_planes. As for me, with this fix the function works as expected. If I clearly understand the code, the loop of marching will be terminated as the sampled point exceeds the t_traversal
value (clamped to far plane value).
Actually I revisited the code and I agree it would not create degenerated samples because of this line. Yeah now I agree this is the right fix. I’ll merge it then. Thanks for the contribution!!
There is a formatting test failure. You can fix it by running:
pip install .[dev]
black docs/ nerfacc/ scripts/ examples/ tests/ --exclude examples/pycolmap --line-length 80
Just fixed the formatting
This PR fixes wrong points sampling behind the far_plane, as described in #201