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

How to obtain 3D object with Materials using code and not GUI

Open ishandutta04 opened this issue 2 years ago • 3 comments

Hi, is there a way to obtain both the .obj file along with the .mtl file for material or texture using code or commands and by not using the GUI? The current method which I use to save the mesh is as follows:

python ./scripts/run.py --mode nerf --scene ./data/nerf/fox/ --save_snapshot saved/fox.msgpack --save_mesh saved/fox.obj --gui --train --n_steps 10000

This only saves the .obj file but to create accurate 3D object, I need the materials and textures as well. how to obtain them?

ishandutta04 avatar Jul 26 '22 11:07 ishandutta04

I need the same as you. The .obj file is so poor quantity. If there any ways to obtain a better .obj file?

dodgaga avatar Jul 27 '22 08:07 dodgaga

Exactly as above!

MultiTrickFox avatar Aug 05 '22 14:08 MultiTrickFox

@ishandutta04 As a workaround, I suggest using Meshlab- you'd probably use a filter like Texture>Transfer Vertex Color to Texture. Then save it out- this will create mtl file and an image of the texture

I think the underlying problem is with the meshing method used (Marching Cubes) Not the answer- but same issue here- https://github.com/NVlabs/instant-ngp/issues/868

Andrew

barney2074 avatar Aug 09 '22 05:08 barney2074

@barney2074 while using filter like Texture>Transfer Vertex Color to Texture it shows image

sumanttyagi avatar Jan 11 '23 06:01 sumanttyagi