It is a sphere and came with a .bmp and .mtl file. What does .mtl stand for ?

and can you explain me the keywords with parameters : v, vt, f, vn

as i see, v stands for vertices and f is indices but it takes more arguments (105/311/107 137/300/141 129/306/130)

V-man

04-30-2012, 07:27 AM

A mesh is just a 3d object. A mesh can be a closed mesh such as in the case of a sphere or a open mesh (just take away one of the triangles on your sphere).

If you are interested in the OBJ file format, do what we all do : search the weeb.
There is this site which has specification for 1000 file formats http://www.wotsit.org/

artariel

04-30-2012, 07:35 AM

A mesh is just a 3d object. A mesh can be a closed mesh such as in the case of a sphere or a open mesh (just take away one of the triangles on your sphere).

If you are interested in the OBJ file format, do what we all do : search the weeb.
There is this site which has specification for 1000 file formats http://www.wotsit.org/

thanks for your reply. by the way i have found the meaning of keywords. now i need to successfully pass these to VBOs.

Vincent22

05-01-2012, 08:36 AM

You need passing vertices to vertex array, colors to color array and use faces indices (lines strating with "f") to create your index array to pass it to glDraw
I don't know exactly how to implement it because I'm a beginner and I draw .obj models with glBegin/End, but you have all data you need.

faces take more indices because they are respectively vertex/normal/texcoord (or vertex/texcoord/normal I don't remember) each "triple" is one vertex