Android OpenGL .OBJ file loader

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.