nerfstudio-project / nerfacc

A General NeRF Acceleration Toolbox in PyTorch.
https://www.nerfacc.com/
Other
1.38k stars 113 forks source link

Coordinate system used in nerfacc #272

Closed DJNing closed 9 months ago

DJNing commented 9 months ago

Hi, is there any documentation that explains the coordinate system used in nerfacc? Is it following OpenGL or others?

hangg7 commented 9 months ago

Hi! nerfacc as a library just look at how to make your sampling and rendering fast, without have any assumption how you unproject rays. But I guess you are asking about the examples that we include here, in that case it follows OpenCV camera for mipnerf360 and OpenGL for synthetic.

Take a look here https://github.com/nerfstudio-project/nerfacc/blob/e6647a003f37a7141d0d8b8ec63770ee1c59b724/examples/datasets/nerf_360_v2.py#L332-L338

DJNing commented 9 months ago

Hi,

Thanks for your prompt reply. However, since the sampling method in each estimator takes in rays_o and rays_d. It should follow a specific coordinate system, which is very reasonable, right? And that's something I am more interested in. Could you give me some hints on this?

hangg7 commented 9 months ago

Sure! Both rays_o and rays_d should be in the world coordinate, agnostic to which camera convention that you use. To understand how to convert from OpenCV or OpenGL camera frame to world frame, look at the code reference I posted before.

DJNing commented 9 months ago

OK, thanks