HumanGaussian
HumanGaussian copied to clipboard
export mesh with texture map
Hi, thanks for your great works and code. I added some lines to 'animation.py' file to export mesh (.obj file) of final 3dgs output like below. However, it doesn't export texture map (.mtl file). Can I export texture map with this code, or is there any other way to export mesh with texture map?
added code:
path = "Results/name-of-this-experiment-run/A_boy_with_a_beanie_wearing_a_hoodie_and_joggers@20240625-124529"
obj_filename = 'example.obj'
mesh = gui.skel.gs.gaussians.extract_mesh(path)
vertices = mesh.v
faces = mesh.f
with open(obj_filename, 'w') as obj_file:
if mtl_filename:
obj_file.write(f"mtllib {mtl_filename}\n")
for v in vertices:
obj_file.write(f"v {v[0]} {v[1]} {v[2]}\n")
for f in faces:
obj_file.write(f"f {f[0] + 1} {f[1] + 1} {f[2] + 1}\n")
Hi, my friend, did you solve the problem? I also want to extract mesh and texture map from 3DGS, could you please share your method? Thanks!