Agisoft Metashape

Agisoft Metashape => Bug Reports => Topic started by: edz on July 30, 2018, 10:24:05 PM

Title: Error with tex_vertices with 1.4.3
Post by: edz on July 30, 2018, 10:24:05 PM
With version 1.4.3, there is a problem with the chunk.model.faces[].tex_vertices values. The index they contain is actually always equal to the vertices index. This should not always be the case, (it is possible that the vertex indices are different from the texture indices). One way to verify this problem is to simple check that len(chunk.model.vertices) != len(chunk.model.tex_vertices) which means that the number of values are different, so most likely the indices should also be different.
Yet, this check always returns True in 1.4.3, but it returns always False in 1.3.5.
[f.tex_vertices for f in chunk.model.faces] == [f.vertices for f in chunk.model.faces]

As an additional test, it we try to use these values (chunk.model.faces[].tex_indices) to generate a mesh in python, it is clear that the indices are wrong and the resulting UV coordinates are all over the place.

In 1.3.5, the values in chunk.model.faces[].tex_vertices are correct.
The values in chunk.mode.tex_vertices are good in both versions.

This is an important feature to be able to write the mesh in our own custom format from the python scripting.
Title: Re: Error with tex_vertices with 1.4.3
Post by: Alexey Pasumansky on July 31, 2018, 03:22:47 PM
Hello edz,

Thank you for reporting. Seems that there's indeed the problem.

We'll try to fix it in the next major update.