nerfstudio-project / nerfacc

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

code about unbounded #114

Closed cv-lab-x closed 1 year ago

cv-lab-x commented 1 year ago

Hi, thanks for your great work, i have some question about the unbounded codes.it's different with the codes in mipnerf 360. why did you use x = x / 4 + 0.5 after contract sample points to unisphere ?

contract_to_unisphere unbound scene

x[mask] = (2 - 1 / mag[mask]) * (x[mask] / mag[mask]) x = x / 4 + 0.5 # [-inf, inf] is at [0, 1]

looking forward to your reply, thanks! @liruilong940607

liruilong940607 commented 1 year ago

Maybe the cuda code is easier to understand:

https://github.com/KAIR-BAIR/nerfacc/blob/488bca66fc05b5bff5982170f204052e75ae2a67/nerfacc/cuda/csrc/include/helpers_contraction.h#L61-L79