nerfstudio-project / nerfacc

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

Only use the rendering but not raymarching #227

Open zhongyingji opened 1 year ago

zhongyingji commented 1 year ago

Thanks for the great work! I have several questions about how to use nerfacc,

  1. I notice that estimator.sampling(...) returns t_starts of (n_samples, ). Does it mean that all rays in the batch share the same t_starts and t_ends?

  2. For vanilla NeRF, if I just use nerfacc on coarse model, how to get the t's from estimator.sampling(...) ? Is the sampled t the middle of t_starts and t_ends? Then I can use these t's for cdf sampling as fine model does.

  3. If I want to use customized ray marching, is there any problem that I directly use nerfacc.rendering(....)?

liruilong940607 commented 1 year ago

Hi for your questions:

1/ It return all samples for a batch of rays, in a concatenated tensor. See here for more details.

2/ Yeah the t being used to computed position is just (t_starts + t_ends) / 2.0. You can take a look at this file on how we use those ts

3/ no problem at all. Those two are completely disentangled.

zhongyingji commented 1 year ago

Hi, can I just use nerfacc to speed up the testing of vanilla NeRF, but do not make any modification on the training code?