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 483 forks source link

Question about `get_ray_directions` #54

Closed markovka17 closed 3 years ago

markovka17 commented 3 years ago

Hi! Sorry for the newbie question, but why are the rays in the camera coordinates? I assume the rays are in the world coordinate because the origin of the coordinates is at (0, 0, 0) and the z coordinate is -1 for all pixels. https://github.com/kwea123/nerf_pl/blob/b2b2a22c1c9a9cd8696975d17667ca1b47ba3da0/datasets/ray_utils.py#L6-L8

kwea123 commented 3 years ago

No, the origin is 0,0,0 because it's in camera coordinates, camera is located at the origin. There's a reference site in the code, I think everything is pretty much explained.