I have been experimenting with loading in OBJ files into memory using tinyobj. I have also been learning and analysing the OBJ file format specification. I have some code which loads the BMW car model here. The code loads in the model, but removes any duplicate vertices as it reads them from the tinyobj output array.
I counted the number of duplicate vertices contained in the OBJ file, and out of the 1 155 486 vertices read from file, 83% of them were duplicates.
I am not sure if I am misunderstanding something or not, but isn't this unnecessary and extremely inefficient storage-wise, given the fact that each face in the OBJ format uses an index into the array of vertices to define itself? Why duplicate so much of this data instead of having each vertex be unique with faces that use it using the same index?
I used a different OBJ file from a different source and got a similar result (78% duplicates), so I don't think this is an issue with the source (or could it be?).
For context, I am removing duplicates as they do in Vulkan tutorial 27 as I am passing them to the GPU using the vertex and index buffer method.
Maybe I am misunderstanding a fundamental aspect of 3d model storage, but if someone could explain this that would be great.