Skip to content

export mesh with texture map #29

Description

@DHPark98

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")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions