3DTopia / threefiner

An interface for text-guided mesh refinement.
Apache License 2.0
175 stars 9 forks source link

Problem with geometry fix #2

Closed XiongFenghhh closed 8 months ago

XiongFenghhh commented 8 months ago

Hi I try to use fix geometry generated by 3dtopia with

threefiner sd_fixgeo --mesh name.glb --prompt 'description'

But I got this pymeshlab error

pymeshlab.pmeshlab.MissingCompactnessException: Lack of Compactness

Any suggestion to fix this problem?

ashawkey commented 8 months ago

@XiongFenghhh Hi, this may suggest the coarse mesh (name.glb) is wrong or empty, could you check it?

XiongFenghhh commented 8 months ago

@XiongFenghhh Hi, this may suggest the coarse mesh (name.glb) is wrong or empty, could you check it?

截屏2024-01-25 22 18 59

hello, this is the coarse mesh. I use pymeshlab==0.2, and the complete error is:

Lack of Compactness Exception -Vertex Vector Contains deleted elements- Traceback (most recent call last): File "/root/miniconda3/envs/3dtopia/bin/threefiner", line 8, in sys.exit(main()) File "/root/miniconda3/envs/3dtopia/lib/python3.8/site-packages/threefiner/cli.py", line 10, in main gui = GUI(opt) File "/root/miniconda3/envs/3dtopia/lib/python3.8/site-packages/threefiner/gui.py", line 57, in init self.renderer = Renderer(opt, self.device).to(self.device) File "/root/miniconda3/envs/3dtopia/lib/python3.8/site-packages/threefiner/renderer/mesh_renderer.py", line 113, in init self.mesh = Mesh.load(self.opt.mesh, bound=0.9, clean=True, front_dir=self.opt.front_dir) File "/root/miniconda3/envs/3dtopia/lib/python3.8/site-packages/kiui/mesh.py", line 95, in load vertices, triangles = clean_mesh(vertices, triangles, remesh=False) File "/root/miniconda3/envs/3dtopia/lib/python3.8/site-packages/kiui/mesh_utils.py", line 156, in clean_mesh verts = m.vertex_matrix() pymeshlab.pmeshlab.MissingCompactnessException: Lack of Compactness

ashawkey commented 8 months ago

Could you use sd instead? I guess it's because for *_fixgeo, we will use the mesh geometry mode, which will do a mesh cleaning at loading the mesh. For this mesh, it's disconnected and all components may get wrongly cleaned up. If you really want to fix the geo, you could try threefiner sd --fix-geo ... instead, which will use diffmc geometry mode.

XiongFenghhh commented 8 months ago

Could you use sd instead? I guess it's because for *_fixgeo, we will use the mesh geometry mode, which will do a mesh cleaning at loading the mesh. For this mesh, it's disconnected and all components may get wrongly cleaned up. If you really want to fix the geo, you could try threefiner sd --fix-geo ... instead, which will use diffmc geometry mode.

threefiner sd --fix-geo works. Thanks.