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.


Topics - blenderman

Pages: [1]
1
Bugs / Blender Object Loading But with Multiple Materials
« on: March 31, 2011, 07:29:04 am »
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:

Code: [Select]
               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.

Pages: [1]