nmoehrle / mvs-texturing

Algorithm to texture 3D reconstructions from multi-view stereo images
Other
974 stars 334 forks source link

texrecon duplicates / creates additional vertices #135

Closed nh2 closed 4 years ago

nh2 commented 4 years ago

There seem to be many cases where texrecon, when writing out a .ply file, makes up additional vertices, destroying connectivity information.

For example, for a mesh with

Vertices: 15001
Faces: 30000

after texrecon it has:

Vertices: 22922
Faces: 29985

This happens even when the input mesh is a nice 2-manifold.

Visual example

image

In the previous image, Blender shows how the selected edge is properly connected (its end vertices' edges are all half-yellow).

But after texrecon on that mesh, that edge is disconnected (in the .ply texrecon writes):

image


Are you aware of this issue?

Any idea what might cause it, before we dive into debugging it?

nmoehrle commented 4 years ago

I am confused texrecon writes a .obj as output and that has exactly the vertices of the input mesh, it will even keep unreferenced vertices such that the index is the same. Can it be that your conversion into a ply file creates duplicate vertices? Obj allows you to write one texture coordinate per face and vertex so a duplication of vertices is not necessary, for your ply flavor that might be different. How do you convert into a ply file?

nh2 commented 4 years ago

You are right. I have confirmed that the written obj does not have this problem. It was some post-processing on my side. Sorry for the confusion.

nmoehrle commented 4 years ago

No worries, glad I could help :-)