Author Topic: MultiTexture on .OBJ file  (Read 117 times)

Offline srehto

  • byte
  • *
  • Posts: 1
    • View Profile
MultiTexture on .OBJ file
« on: May 18, 2017, 04:26:00 pm »
Hello,
I'm trying to apply multi texture to a .OBJ File that I have made on Blender.

The object is displaying fine on my device, but without no textures..

I followed the tutorial http://www.jpct.net/wiki/index.php?title=Loading_models to apply textures but I don't understand why it's not working...

For exemple, I have in the MTL file these lines :

Code: [Select]
newmtl Woman_casu:Shoes06:Shoes06.001
Ns 800.000000
Ka 1.000000 1.000000 1.000000
Kd 1.000000 1.000000 1.000000
Ks 0.050980 0.047059 0.047059
Ke 0.000000 0.000000 0.000000
Ni 1.000000
d 0.000000
illum 9
map_Kd shoes06_diffuse.png
map_d shoes06_diffuse.png

I'm loading the texture just before loading the object with :
Code: [Select]
Texture shoes= new Texture(mContext.getAssets().open("shoes06_diffuse_file.png"));
TextureManager.getInstance().addTexture("shoes06_diffuse.png", shoes);

But I nothing is displayed on my object..


I understand that the texture is probably declared when I load the file. But then, how can I display the texture to my object ?
I'm probably missing something, it's the first time I'm using this library.
The help of the community would be great appreciate :)

Thanks a lot for your help

PS : I also tried to apply manualy the textures with :
Code: [Select]
o3d.setTexture("shoes06_diffuse.png");
But it display the texture all around the object, not only on the limited zone..

« Last Edit: May 18, 2017, 05:56:41 pm by srehto »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: MultiTexture on .OBJ file
« Reply #1 on: May 18, 2017, 08:34:44 pm »
The names of the material and in the TextureManager have to match exactly. Just have a look at the log output to see which names are actually being used and use those instead.