instant-ngp icon indicating copy to clipboard operation
instant-ngp copied to clipboard

Render depth from nerf perspective

Open EsbernTK opened this issue 2 years ago • 6 comments

Hi Im using the pyngp package to render out different views of my nerf scene, however i also need the depth for each of those views, how would i go about doing that in the easiest way? I have looked at the render mesh method, but it doesnt seem quite what i need. I also saw that in the .cu files there were some render modes, but i cannot find the way to activate the depth render mode in the pyngp package.

EsbernTK avatar Jun 15 '22 14:06 EsbernTK

setting render mode to depth:

testbed.render_mode = ngp.Depth

see more here: https://github.com/NVlabs/instant-ngp/discussions/600

Vincentqyw avatar Jun 16 '22 03:06 Vincentqyw

Thank you very much :D A follow up question; im using the google colab notebook that is linked to in this repository, to run the code, and i cannot find where the pyngp package files actually are compiled to in the linux environment. I know it is python 3.7 and i have looked in both /etc/python3.7, /usr/lib/python3.7 and /usr/local/lib/python3.7 but cannot find it. Knowing where the actual package is would allow me to just look up the capabilities of the library directly in the package files.

EsbernTK avatar Jun 16 '22 07:06 EsbernTK

Hi @Vincentqyw after capturing the depth, I see that the values are between 0 and 255. How do I get the maximum depth that I can use to normalize the values?

saunair avatar Sep 03 '22 03:09 saunair

Hi @Vincentqyw after capturing the depth, I see that the values are between 0 and 255. How do I get the maximum depth that I can use to normalize the values?

Excuse me. I m using the same way to get the depth image, but the image have 4 channels(may be RGB-D or RGBA ?). I wonder how you capture the 1 channels depth image.

kafei123456 avatar Sep 28 '23 00:09 kafei123456

setting render mode to depth:

testbed.render_mode = ngp.Depth

see more here: #600

Hi, i've got a 4 channel image:W×H×4 depth image after set

testbed.render_mode = ngp.Depth

How to get a 16 bit png one channel depth map?

CaptainEven avatar Oct 11 '23 06:10 CaptainEven

Hi @Vincentqyw after capturing the depth, I see that the values are between 0 and 255. How do I get the maximum depth that I can use to normalize the values?

Excuse me. I m using the same way to get the depth image, but the image have 4 channels(may be RGB-D or RGBA ?). I wonder how you capture the 1 channels depth image.

I got the same question, have you figured it out yet?

CaptainEven avatar Oct 11 '23 06:10 CaptainEven