nerf_template icon indicating copy to clipboard operation
nerf_template copied to clipboard

[Question] about the definition of density grid in raymarching module

Open yukiumi13 opened this issue 1 year ago • 0 comments

Thank you for your consistently fancy projects. I am building another method on nerf_template and I would like to utilize density grid in renderer to perform space-skipping ray marching in Instant-NGP, which is referred as: https://github.com/ashawkey/nerf_template/blob/bf444a3d112eaaef574f99490cf6ab051b58e9f6/nerf/renderer.py#L708-L715

However, I wonder how raymarching.march_rays knows the xyz of each cell in the density grid, since density grid is a flatten tensor with the shape of [CAS, H ** 3]? Is it predefined as instant-ngp, which means the first grid is [-0.5, 1.5]^3, the second is [-1.5, 2.5]^3, etc? But it seems the grids in the project is centered around [0,0,0] as: https://github.com/ashawkey/nerf_template/blob/bf444a3d112eaaef574f99490cf6ab051b58e9f6/nerf/renderer.py#L766-L770

I would highly appreciate any replies.

yukiumi13 avatar Dec 21 '24 12:12 yukiumi13