nerfacc icon indicating copy to clipboard operation
nerfacc copied to clipboard

What is the main difference between 'render_image_with_occgrid' vs 'render_image_with_occgrid_test'?

Open umyta opened this issue 1 year ago • 1 comments

Hi, I noticed that a new function 'render_image_with_occgrid_test' is provided in the examples recently. May I ask what is the main difference between the two functions? Is there any problem with using 'render_image_with_occgrid' for evaluation?

umyta avatar Jun 06 '23 20:06 umyta

Not a problem at all. We recently update the code from render_image_with_occgrid to render_image_with_occgrid_test for faster rendering (see https://github.com/KAIR-BAIR/nerfacc/pull/217) but it is totally compatible to just use render_image_with_occgrid.

High levelly, the difference is how the for-loop (parallelization) is done in these two functions:

  • render_image_with_occgrid loops over all rays. For every ray you march to the end and draw samples for network query.
  • render_image_with_occgrid_test loops over marching steps. For all rays you march certain amount of steps and draw samples for network query.

The second one allows for early termination for some rays which brings speedup to the rendering.

liruilong940607 avatar Jun 06 '23 21:06 liruilong940607