rakeshmjiyani / min3d

Automatically exported from code.google.com/p/min3d
0 stars 0 forks source link

3ds model parse error #77

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. Load model files from http://archive3d.net/?a=download&id=82b08683
2. rename texture file to meet android requirements
3. load model from examples 
IParser parser = Parser.createParser(Parser.Type.MAX_3DS, 
getResources(),             "min3d.sampleProject1:raw/house_modern_3ds", false);
......

What version of the product are you using? On what operating system?
sources from svn rev 119, ubuntu, android 3.2 

Please provide any additional information below.

04-11 13:26:40.455: E/AndroidRuntime(4209): FATAL EXCEPTION: GLThread 10
04-11 13:26:40.455: E/AndroidRuntime(4209): 
java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0
04-11 13:26:40.455: E/AndroidRuntime(4209):     at 
java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255)
04-11 13:26:40.455: E/AndroidRuntime(4209):     at 
java.util.ArrayList.get(ArrayList.java:308)
04-11 13:26:40.455: E/AndroidRuntime(4209):     at 
min3d.parser.ParseObjectData.parseObject(ParseObjectData.java:82)
04-11 13:26:40.455: E/AndroidRuntime(4209):     at 
min3d.parser.ParseObjectData.getParsedObject(ParseObjectData.java:63)
04-11 13:26:40.455: E/AndroidRuntime(4209):     at 
min3d.parser.Max3DSParser.getParsedObject(Max3DSParser.java:206)
04-11 13:26:40.455: E/AndroidRuntime(4209):     at 
min3d.sampleProject1.ExampleLoad3DSFile.initScene(ExampleLoad3DSFile.java:31)
04-11 13:26:40.455: E/AndroidRuntime(4209):     at 
min3d.core.Scene.init(Scene.java:254)
04-11 13:26:40.455: E/AndroidRuntime(4209):     at 
min3d.core.Renderer.onSurfaceCreated(Renderer.java:75)
04-11 13:26:40.455: E/AndroidRuntime(4209):     at 
android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1415)
04-11 13:26:40.455: E/AndroidRuntime(4209):     at 
android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1185)
04-11 13:26:46.495: V/SurfaceView(4209): android.opengl.GLSurfaceView@407749e0 
got app visibiltiy is changed: false
04-11 13:31:47.995: I/Process(4209): Sending signal. PID: 4209 SIG: 9

Original issue reported on code.google.com by dakis...@gmail.com on 11 Apr 2012 at 9:37

GoogleCodeExporter commented 8 years ago
Also in ObjParser you should do trim(). Export from 3d max don't work

            while ((line = buffer.readLine()) != null) {
                // remove duplicate whitespace
                // line = line.replaceAll("\\s+", " ");
                // String[] parts = line.split(" ");
                line = line.trim();!!!!!!!

Original comment by dakis...@gmail.com on 11 Apr 2012 at 9:39

GoogleCodeExporter commented 8 years ago
tnanks for framework any way

Original comment by dakis...@gmail.com on 11 Apr 2012 at 9:40

GoogleCodeExporter commented 8 years ago
Looks like a duplicate of issue 
http://code.google.com/p/min3d/issues/detail?id=74 . That one has a patch 
included (didn't tried it personally).

Original comment by enrico.g...@gmail.com on 24 Apr 2012 at 9:05

GoogleCodeExporter commented 8 years ago
Has this been resolved? Adding:

line = line.trim(); 

to my ObjParser.java hasn't fixed the issue. Where can I download the updated 
code if it has been fixed? 

Thanks.

Original comment by iiJD...@gmail.com on 28 Apr 2013 at 6:53