Closed eArmada8 closed 1 week ago
Sorry I haven't had a chance to look at this - can you confirm that you used the same version of Blender for both tests? How old was the "old stable" version of the script you used? There was a change to how normals were imported recently for Blender 4.1 compatibility that might have impacted this, though if it was a much older version of the script there could have been other changes in the interim.
@DarkStarSword - sorry, I was using this commit, which was the last one before you started the updates to support segmented vertex buffers, on Blender 3.6 LTS. I noticed this behavior with the current commit, on Blender 4.2 LTS.
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?
On import the tangent of a buffer is discarded by default in favor of recalculating on export, said calculation is done by blender API entirely.
If your game uses custom tangents and not one calculated from normals in the same algo as blender would, you might get different tangents. Hence the vert count has potential to change cause vertex uniqueness is tampered with by this process.
You could try importing the tangent with use of semantic remap to keep the original intact and reused on export time. If this results on the same vert count on export, then that was the cause of this behavior.
Closing this, thanks! I've come to the conclusion that the game I'm working with uses fancy custom tangents and this is Blender's method of dealing with them.
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!