Loading with multi-texturing of OBJ and 3DS files

Started by iamalextan, February 07, 2006, 02:32:15

Previous topic - Next topic

iamalextan

Hi guys, I'm currently working on a project that requires me to render either OBJ or 3DS files with texture according to the texture coordinates of the files.

However, I'm unable to load the textures properly (the texture coordinates are not being read in by the loader). I'm currently using the default GLApp_DemoModel.java file d/l from//www.potatoland.org.

I was wondering if any of you guys have a solution for this prob.

Thanks

djork

I think it's worth writing your own OBJ file loader to suit your own needs, as you will likely never find a perfect one out there.  The OBJ file format is very easy to parse using a few ArrayLists and string tokenizers.

napier

Hi iamalextan,

I haven't been on the forum for a week so didn't see your post.

That's my code you found, but it's out of date, and I don't think it had texture coords enabled yet.   I used an OBJ loader from this forum that you should check out.  I think it has more features implemented:

http://lwjgl.org/forum/viewtopic.php?t=917

About writing your own, one of the reasons there are no solid OBJ parsers out there is that everybody writes their own  :wink:  It was very easy to write an OBJ parser for about 50% of the obj files I found, but then I started running into the deviant obj formats that would break my loader.  Better to improve on something that already works.
penGL/Java/LWJGL demos and code: http://potatoland.org/code/gl