NVlabs / instant-ngp

Instant neural graphics primitives: lightning fast NeRF and more
https://nvlabs.github.io/instant-ngp
Other
15.61k stars 1.89k forks source link

How to export the 3D scene as ply or obj file for further usage. #49

Closed endlesswho closed 2 years ago

mmalex commented 2 years ago

hi! you can export to OBJ via the GUI at the moment, there is a demonstration how to do it at 1:14 in this video https://nvlabs.github.io/instant-ngp/assets/mueller2022instant.mp4 I will be adding a python binding & vertex colors support today. stretch goal to support PLY too. I will update this issue with details when it is done.

mmalex commented 2 years ago

note that the 3d export respects the 'render crop aabb' which is also configurable from the GUI, so you can select which portion of the scene to mesh & export.

endlesswho commented 2 years ago

That could be wondful! I found the save_mesh function in marching_cubes.cu, I'm running on a headless server, so I'd prefer saving the results to devices for further usage.

mmalex commented 2 years ago

ok this work is done but we will merge it tomorrow! PLY and OBJ supported, as well as returning the mesh vertices, colors and triangle indices as numpy arrays to python. thanks for your patience.

endlesswho commented 2 years ago

we will merge it tomorrow! PLY and OBJ supported, as well as returning the mesh vertices, colors and triangle indices as numpy arrays to python. tha

Unlike the rendered result from the network, the exported results seems a little bit mess in PLY or OBJ. This is caused by triangulate step? fox

feiyilicare commented 2 years ago

i have same results,not as network output

andreac commented 2 years ago

I have same results, how did you fix?

endlesswho commented 2 years ago

I have same results, how did you fix?

A larger resolution could solve. But I recommand a sdf nerf reconstruction for better visualization.

andreac commented 2 years ago

I have same results, how did you fix?

A larger resolution could solve. But I recommand a sdf nerf reconstruction for better visualization.

Ok for resolution, but how can i export sdf (and convert to ply or others) without using GUI?

endlesswho commented 2 years ago

I have same results, how did you fix?

A larger resolution could solve. But I recommand a sdf nerf reconstruction for better visualization.

Ok for resolution, but how can i export sdf (and convert to ply or others) without using GUI?

The project is for fast nerf training for novel view synthesis. In my opinion, this only support little customization due to many dependencies. For better reconstruction, you can try sdf-nerf such as NeuS.

ishandutta04 commented 1 year ago

How do we save mesh with the vertex colors using the terminal and not the GUI?

alter-sachin commented 1 year ago

NUDGE