What is the best way importing .obj files to android app created in Blender? I want the best and the easyest variant! How about a link to a tutorial?
2 Answers
Personally I have implemented the OBJ reader long time ago in Android Native C and in that case the issue is quite more complicated than doing it in Java.
The easiest way is to open the file in text mode and parse the file following its logic.
The logic i very very simple and you can find the file format here:
http://www.martinreddy.net/gfx/3d/OBJ.spec
The writing of such a code won't take more than 2 days of an average skilled developer, i suggest you to do it your own to have a better control of your code.
In alternative, if you want it ready, you can find and adapt this Java loader:
http://www.java2s.com/Code/Java/3D/ObjectFileLoader.htm
Cheers

- 3,557
- 19
- 26
-
Well i dont have much time for writing one... How can i use the loader? – Liukas Jan 08 '12 at 23:12
-
Can you please help me? I'm on a hurry. – Liukas Jan 08 '12 at 23:25
Here is a simple .obj file reader class specifically written to work with Android. Comes as part of a complete sample program you can use to try it out.

- 2,768
- 1
- 15
- 13
-
-
There are comments in the code; read them. Also that whole app is an example of how to use it, so look at that. – Lawrence D'Oliveiro Feb 03 '12 at 01:05
-
@Lawrence D'Oliveiro where is the part where i have to link the .obj file that the app has to read it? – Qualphey Mar 03 '12 at 12:22
-
my compiler wants me to remove few @Override and when i run the ap on my phone i get the force close window – Qualphey Mar 03 '12 at 13:16
-
The app has a picker that lets you choose a .obj file to load. If you’re getting force-close, look at the exception traceback in the logcat to see where it’s crashing. – Lawrence D'Oliveiro Mar 04 '12 at 10:31