Closed GoogleCodeExporter closed 8 years ago
I have similar problem. How I can load same model twice? It seems like parser
only can load one model from a obj file...
There are no clone function for Object3dContaniner.
Original comment by egrocb...@gmail.com
on 20 Jul 2010 at 2:15
First, the framework is excellent thank you very much for creating this.
I am having this issue and was disappointed when I tried loading a terrain .obj
and a character model .md2 (both created with blender 2.49). They work
separately. It breaks when I run parser.getParsedAnimationObject() or
parser.getParsedObject() on a second parser.
Using Jun 20 version of min3d, android 2.2 emulator.
08-08 01:02:58.044: ERROR/AndroidRuntime(283): FATAL EXCEPTION: GLThread 8
08-08 01:02:58.044: ERROR/AndroidRuntime(283): java.lang.Error: Texture id
"atlas" already exists.
08-08 01:02:58.044: ERROR/AndroidRuntime(283): at
min3d.core.TextureManager.addTextureId(TextureManager.java:58)
08-08 01:02:58.044: ERROR/AndroidRuntime(283): at
min3d.parser.MD2Parser.getParsedAnimationObject(MD2Parser.java:37)
08-08 01:02:58.044: ERROR/AndroidRuntime(283): at
com.newrealteens.client.core.World.initScene(World.java:41)
08-08 01:02:58.044: ERROR/AndroidRuntime(283): at
min3d.core.Scene.init(Scene.java:196)
08-08 01:02:58.044: ERROR/AndroidRuntime(283): at
min3d.core.Renderer.onSurfaceCreated(Renderer.java:76)
08-08 01:02:58.044: ERROR/AndroidRuntime(283): at
android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1317)
08-08 01:02:58.044: ERROR/AndroidRuntime(283): at
android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1116)
It appears that the textureId is hardcoded to "atlas" in the Jun 20 version. I
went through and added a textureId parameter to the "getParsedObject" method
and a few other subsequent methods and was able to load two .obj files as well
as a .obj file .md2 files. I'm sure this a bad idea, but for what im doing it
works.
So now I have my terrain and my little character (with animations) running
around the game world. So far so good, thanks for all the work you've done so
far.
Arthur
Original comment by ArturoTh...@gmail.com
on 8 Aug 2010 at 5:25
Thanks for reporting this. I'm looking into this.
Original comment by ippeldv@gmail.com
on 2 Sep 2010 at 12:32
@egrocbost: the clone methods have been added to Object3d and Object3dContainer.
Original comment by ippeldv@gmail.com
on 2 Sep 2010 at 12:32
This issue is fixed. I removed the hard-coded references to "atlas". This id is
now generated dynamically.
Original comment by ippeldv@gmail.com
on 2 Sep 2010 at 1:20
Original issue reported on code.google.com by
Elviish
on 27 Jun 2010 at 10:24