nerf
nerf copied to clipboard
A question about the trick of ndc_rays
Hi all experts, I am confused why the near is set to tf.cast(1., tf.float32) here.
In the NeRF paper it states the origin is shifted to the near plane, does this mean that it always assumes the near plane starts from z=-1? (Appendix C in NeRF paper: NDC ray space derivation)
# In func render()
if ndc:
# for forward facing scenes
rays_o, rays_d = ndc_rays(
H, W, focal, tf.cast(1., tf.float32), rays_o, rays_d)
Thanks in advance for the kindly answer and discussion
At some point, they scale the translation of all the poses by 1/near (they use min value of bds), which essentially moves the nearest point to a distance of 1. I think they also use bd_factor to make the nearest point at 1.33 and then use near=1, may be for better sampling.