A00897783 / min3d

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

Could be great be able to load many models #4

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Load a model (3DS or OBJ)
2. Try loading a different one
3. Error because texture "atlas" already exist.

What is the expected output? What do you see instead?
Expected output : 2 models
Instead : 1 model and 1 error

What version of the product are you using? On what operating system?
6 june version

Please provide any additional information below.

Original issue reported on code.google.com by Elviish on 27 Jun 2010 at 10:24

GoogleCodeExporter commented 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

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
Thanks for reporting this. I'm looking into this.

Original comment by ippeldv@gmail.com on 2 Sep 2010 at 12:32

GoogleCodeExporter commented 8 years ago
@egrocbost: the clone methods have been added to Object3d and Object3dContainer.

Original comment by ippeldv@gmail.com on 2 Sep 2010 at 12:32

GoogleCodeExporter commented 8 years ago
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