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 - thrysyuk

Pages: [1]
Support / 3d object from .obj file doesn't apply texture
« on: May 20, 2012, 01:46:43 pm »

First of all i would like to thank jPCT team for the great work they do. I'm new to jPCT and 3d modeling for android so please do not blame me for my incompetence in possibly obvious things :)
i have a problem with loading my 3d .obj file. Actually it loads just fine, but the main texture is not applied at all.
i've already read the article about correct loading of objects with textures -

Here is a code snippet how i'm loading the object with textures:
Code: [Select]
Texture texture = new Texture(BitmapHelper.convert(getResources().getDrawable(com.threed.jpct.example.R.raw.front)));
TextureManager.getInstance().addTexture("Layer 0.JPG", texture);
Texture texture1 = new Texture(BitmapHelper.convert(getResources().getDrawable(com.threed.jpct.example.R.raw.edge)));
TextureManager.getInstance().addTexture("Layer 0 Extrusion Material - Default Texture.JPG", texture1);

obj = Object3D.mergeAll(Loader.loadOBJ(getResources().openRawResource(R.raw.jbcut), getResources().openRawResource(R.raw.jbcut_conf), 20));


  • jbcut - .obj file
  • jbcut_conf - .mtl file
  • front - front texture of the 3d object. .mtl file maps the texture by name "Layer 0.JPG"
  • edge - back texture. .mtl file maps the texture by name "Layer 0 Extrusion Material - Default Texture.JPG"

texture "edge" (Layer 0 Extrusion Material - Default Texture.JPG) is applied well, but the "front" (Layer 0.JPG) is not applied.
I would really appreciate if you could give me some suggestions how to fix this. Please let me know if you need any other info (files from me to examinate the issue).

Thanks for the help beforehand.

Pages: [1]