3d-fixes
3d-fixes copied to clipboard
Vertex buffer expansion on export
Hi,
I noticed that when I import a vertex buffer, then export it again, the size of the vertex buffer is enlarged. This might be desired behavior, I do not know, so I thought I would ask.
Looking at this mesh, for example; the original mesh has 2721 vertices, and when imported into Blender, it still has 2721 vertices. The old stable script would output a mesh with 2721 vertices, but the current commit outputs 2786 vertices. The appearance of the mesh seems to be the same.
The first triangle to show a difference is triangle 325, which is at offset 0x3CA in the index buffer. 163,168,167 has been changed to 163,168,169. Vertex 167 and 169 are almost identical, except the tangent vector is now different.
This does not happen with most meshes, but I have found more than a few. So it seems that the script is determining that some vertices need to be duplicated with differing tangent vectors? Is this desired behavior?
Thanks for looking into this!