ARF-svox2 icon indicating copy to clipboard operation
ARF-svox2 copied to clipboard

how to render zdepth in cuda code?

Open zhw-github opened this issue 2 years ago • 1 comments

Hi, I saw on github that you doublet the code of the original author of plenoxels. And see you want to optimize depth. This is relevant to my research.In svox2.py file,define a volume_render_depth function? I think this code is important: *out_depth += (weight * ((t / opt.step_size) * ray.world_step);How to change this code to render zdepth? But the original author said this is the absolute length along the ray, not the z-depth as usually expected.So how should I modify this code to get zdepth!

zhw-github avatar Oct 23 '22 14:10 zhw-github

Two things:

  1. we did not optimize depth in this work.
  2. an easy way to fulfill your goal might be to first render absolute length, and then apply a scaling factor to get zdepth. The scaling factor for each ray is the reciprocal of the L2 norm of unnormalized ray direction defined here: https://github.com/Kai-46/nerfplusplus/blob/ebf2f3e75fd6c5dfc8c9d0b533800daaf17bd95f/nerf_sample_ray_split.py#L26

Kai-46 avatar Nov 08 '22 14:11 Kai-46