PDA

View Full Version : Java Wireframe to OpenGL



Aamrun
07-16-2005, 04:53 AM
Java had a cute wireframe modeller, which modelled a cube, dino, ship and chopper. Any one have any idea what 'f' and 'fo' mean in those obj files. They are driving me nuts. I thought f stood for a face and tried GL_LINE_LOOP on a trio of vertices. It doesn't work. :(

Any help will be appreciated.

ZbuffeR
07-16-2005, 05:07 AM
a link to those files please ?

Aamrun
07-17-2005, 05:13 AM
http://www-lsi.ugr.es/~rosana/software/wannabe/escenas/samples/obj/dinosaur.obj

Any help will be appreciated.

jide
07-17-2005, 06:58 AM
Regarding to the structure of the file, the first float values are all the vertex data marked by a 'v' marker prefix. Each of them is at an incremented index (first v group is index 1, next is index 2 and so on). Next, after each 'fo' marker, you have the 3 indices of each face.

If you draw triangles with following the indices in order, you'll have your dinosaur :)

Finally, I could easily found some doc about that format: http://www.javaview.de/guide/formats/Format_Obj.html

It says that the marker 'f' is for indices, but your file seems to use 'fo'. So you'll have to take care of that difference on other files.

That must help