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

StackOverflow https://stackoverflow.com/questions/18641039

Pregunta

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?
¿Fue útil?

Solución 2

Solution:

I had to remove the duplicate vertices.

Otros consejos

The best answer will be in the source -

svn co "https://svn.blender.org/svnroot/bf-extensions/trunk/py/scripts/addons/io_scene_obj/"

My guess would be to ignore erroneous faces, the other option would be to locate the nearby vertex most likely to be connected to the other two vertices.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top