开发者

Android OpenGL .OBJ file loader [closed]

Closed. 开发者_如何学编程This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.

Closed 8 years ago.

Improve this question

There seem to be quite a number of OBJ mesh file loaders out there that people have developed for use on the Android platform. I'm wondering if anyone has any experience with these and can offer a recommendation on which one seems to work best for them.

Here are my criteria:

  • Lightweight (small file size),
  • Optimized for speed,
  • Easy to implement,
  • Offers some sort of texture mapping support (not sure if I need this -- haven't gotten far enough in my coding to know if I need a library to do this, or if OpenGL ES will be able to do all that work I need here), and
  • Can be used in Android apps that are being sold commercially.

Here are a few of the libraries I've found.

  • Min3D
  • .obj Loader for Android
  • Random objloader found on anddev.org forum
  • Android-GL
  • LibGDX

I'm also open to hearing about others not included on this list.


You asked this a while back but I have a good solution if you are still looking.

Instead of loading an obj file, you can easily convert it into arrays for the vertices, normals and texture coordinates. There's a tool which converts obj files to c header files. You can convert the output to work with java afterwards. It shouldn't be hard.

http://www.heikobehrens.net/2009/08/27/obj2opengl/

This solution is easy, the header files wont add much space in source code than the obj files and the data will be more compact when compiled, it's very fast since you have the data there ready to render straight away, it can convert texture coordinates and you don't need to worry about using it for your commercial products.


I know this is an old question, but I have encountered some problems to find a good OBJ loader for Android.

I tried almost all the solutions proposed

  • Min3D which is quite old (last revision is from 2011)
  • Rajawali which seems to be a fork of min3D
  • Libgdx which is a game engine
  • JPCT-AE a 3d engine for android

The only one that wasn't too complicated and worked was JPCT-AE, that can be found here : http://www.jpct.net/jpct-ae/

It allows parsing OBJ files, and loads the textures from the associated MTL file without any problem. Moreover the documentation is really descriptive compared to others, and there is a forum with a lot of questions answered.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜