-
Notifications
You must be signed in to change notification settings - Fork 119
Description
I want to ask for advice since I met the weird behaviors when using occupancy grid sampling with t_max.
I want to sample points with nerfacc.OccGridEstimator
when each ray has maximum distance.
So I wrote this typical sampling code:
ray_indices, t_starts, t_ends = occgrid.sampling(rays_o=rays_o, rays_d=rays_d, render_step_size=0.01, t_max=t_max)
where t_max is a torch.Tensor of shape (n_rays, 1).
However, when I ran this code, there are some points which have been sampled over the maximum distance t_max.
I noticed it since both (t_max[ray_indices] < t_ends[:, None]).sum()
and (t_max[ray_indices] < t_starts[:, None]).sum()
are over 0.
In the above case, t_max values are smaller than default far_plane enough. I think this behavior is not intended, since the docs say that if t_max is profided, the marching will stop by minimum of t_max and far_plane.
Please let me know if I'm doing something wrong.
I'm using version 0.5.2+pt113cu117.