kwea123 / nerf_pl

NeRF (Neural Radiance Fields) and NeRF in the Wild using pytorch-lightning
https://www.youtube.com/playlist?list=PLDV2CyUo4q-K02pNEyDr7DYpTQuka3mbV
MIT License
2.74k stars 482 forks source link

Point Sampling Issue #175

Open 2j1ejyu opened 2 years ago

2j1ejyu commented 2 years ago

This issue is for the master branch (also for nerfw and dev)

Maybe I could have missed something but it seems that for each ray, the model is sampling from the 'near' distance to 'far' distance from the camera position rather than the near/far 'surface'. I wanted to ask if it was intended since NeRF models usually sample points between near surface and far surface.

in method "get_rays" in "datasets/ray_utils.py ", rays_d is being normalized as a unit vector. This causes the model to sample points from a spherical surface rather than the plane surface(which is the near surface) for each camera. The sampling code is in "models/rendering.py -> rander_rays"