Search code examples
c++blenderfile-formatwavefront

Blender Wavefront Object: number of vertex in face declaration is bigger than the number of all vertices


I am trying to load a Wavefront Object into my C++ OpenGL program using my own parser. The parser works for some .obj-files, but at some files it throws an index out of range exception. After some debugging I recognized that one line in the file references a vertex with the number 10565:

f 2571/5164/4481 8298/5166/4481 10565/5167/4481
                                ^^^^^

But the file only contains 10531 vertices.

Questions:

  • How is Blender still able to import the file?
  • To which vertex refers Blender with '10565' even if it doesn't exist?

Solution

  • Solution:

    I had to remove the duplicate vertices.