Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - blenderman

#1
You rock man! Works like a charm now. Thanks for the fix. JPCT is awesome too btw.  ;D
#2
Just tried changing the code to eliminate the merges. It still has the same problem.


TextureManager.getInstance().addTexture("harl.jpg", new Texture("harl.jpg"));
TextureManager.getInstance().addTexture("asphalt.jpg", new Texture("asphalt.jpg"));
for(Object3D testing : Loader.loadOBJ("untitled.obj", "untitled.mtl", 10)){
testing.translate(0, -40, -60);
world.addObject(testing);
}


I also tried adding this on the Hello World android example (I had to resize the textures and change the material name to get it going), it has the same issues.

Thanks.
#3
Yes, here is the output from running it for a few seconds.

Java version is: 1.6.0_24
-> support for BufferedImage
Version helper for 1.5+ initialized!
-> using BufferedImage
Software renderer (OpenGL mode) initialized
Software renderer disposed
Software renderer (OpenGL mode) initialized
Loading Texture...harl.jpg
Software renderer disposed
[ Thu Mar 31 10:52:21 PDT 2011 ] - WARNING: Unsupported Texture height (768)...resizing to a height of 256 pixels!
Loading Texture...asphalt.jpg
[ Thu Mar 31 10:52:21 PDT 2011 ] - WARNING: Unsupported Texture width (640)...resizing to a width of 256 pixels!
Loading file untitled.mtl
Text file untitled.mtl loaded...311 bytes
Processing new material None_harl.jpg!
Processing new material None_asphalt.jpg!
Loading file untitled.obj
Text file untitled.obj loaded...1775 bytes
Processing object from OBJ-file: Cube.001
Object 'Cube.001_jPCT5' created using 12 polygons and 8 vertices.
Processing object from OBJ-file: Cube
Object 'Cube_jPCT6' created using 12 polygons and 8 vertices.
Adding Lightsource: 0
Worker created using 7 queues!
93
Worker thread stopped!
Worker thread stopped!
Worker thread stopped!
Worker thread stopped!
Worker thread stopped!
Worker thread stopped!
Worker thread stopped!
Software renderer disposed


I suspect this problem exists on JPCT-AE. I'm going to port my game from PC to android, so I am more interested in JPCT-AE's behavior. I'll try it out on my phone later tonight when I have time to write the code and let you know if I still have the problem.

Thanks.
#4
I'm exporting an object file from Blender into my JPCT app. The object has two materials and two objects. However, only one of the materials is applied to the object. The other material is not. I manually edited the .obj file to remove the object that was correctly having the texture applied, and the texture correctly appeared for the other material.

I'm using the  jpctCollision.java example and I changed lines 98 and added the following:


               TextureManager.getInstance().addTexture("harl.jpg", new Texture("harl.jpg"));
TextureManager.getInstance().addTexture("asphalt.jpg", new Texture("asphalt.jpg"));
Object3D testing = Object3D.mergeAll(Loader.loadOBJ("untitled.obj", "untitled.mtl", 10));
testing.translate(0, -40, -60);
world.addObject(testing);


Here are the links to the files described above:
http://dl.dropbox.com/u/9609567/untitled.obj
http://dl.dropbox.com/u/9609567/untitled.mtl
http://dl.dropbox.com/u/9609567/harl.jpg
http://dl.dropbox.com/u/9609567/asphalt.jpg

I'm hoping i'm just making some dumb error here.

Thanks.