I am working on my own java 3D Game Engine, everything is working perfectly fine BUT i allways get a mistake. I've found the error, but I've absolutely no idea how to solve this. I haved used Blender for creating my OBJ Files.
Here is an excample for one obj file.
v 0.500000 -0.500000 -0.500000
vt 0.748573 0.750412
vn -1.000000 -0.000000 -0.000000
f 5/1/1 4/3/1 8/4/1
These are the most relevant informations i need for drawing my objects on the screen.
But now, when i create my OBJ Files, my faces look like this:
f 2//1 3//2 4//3
my vertices, textureCoords and normals look like excatly the same, but my parser gets a problem when reading the faces.
My Parser is quit complex and i dont think it would help to copy it in here. I just need a way for converting my files from one type to the other. Is there anyway in Blender for telling it how to save my files ?
I would be very happy if someone could help me with this.
Greetings, Finn
From wikipedia under face elements -
the missing second element is the texture index, pointing to which vt line to use. To get this data in an obj export you need to unwrap the object to create the uv's and enable include UV's when exporting.