Author Topic: [c++]Opengl - obj file to vertex3f converter?  (Read 4999 times)

0 Members and 1 Guest are viewing this topic.

Offline Sabour

  • ZX 81
  • *
  • Posts: 4
  • Karma: 0
    • View Profile
[c++]Opengl - obj file to vertex3f converter?
« on: December 15, 2009 »
i have an *.obj file,how i can convert it into array?i don't want to use obj loader as for challenge wise :D.I have tried using Stripe ( http://www.cs.sunysb.edu/~stripe/ ) to convert polygon into triangle strips,but the line are just to long to convert it by hand adding glvertex3f,quads,vertices, i tried to make macro on ultraedit to automated this but no luck so far lol,attached below the model of a foot lol,
foot.obj is original
foot.objf is striped (v = vertex?,vt=vertices?,q=quads?)
Stripe.exe
viewobj.exe

Offline zawran

  • Sponsor
  • Pentium
  • *******
  • Posts: 909
  • Karma: 67
    • View Profile
Re: [c++]Opengl - obj file to vertex3f converter?
« Reply #1 on: December 15, 2009 »
Not sure if its useful, but I did an .obj loader in blitzmax, which might provide some ideas for you to make your own converter.

http://www.dbfinteractive.com/forum/index.php/topic,3990.0.html

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2757
  • Karma: 493
    • View Profile
    • https://www.rbraz.com/
Re: [c++]Opengl - obj file to vertex3f converter?
« Reply #2 on: December 16, 2009 »
That is one scary foot  :)

I've converted it to C using anim8or, now you can simply build your loader around it.
Challenge Trophies Won: