*.obj problem

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Clees

*.obj problem

Post by Clees »

I have a question about textures in *.obj format.

Does the Irrlicht 3d engine load pre-defined textures in *.obj files ? Whenever I try to load the model it loads without textures. Even when I try loading textures with "setMaterialTexture". It just simply dose not work.

Thanks for any help...

BTW. Great work with Irrlicht ....
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Hi, .obj files are loaded completely without textures. The only way to assign a texture to these meshes is using setMaterialTexture, as you mentioned. Some reasons why this may not work are the following:
  • There are no texture coordinates in the model.
  • You set the wrong texture. Use setMaterialTexture(0, yourTexture)
  • The texture could not be loaded. Maybe you wrote a wrong filename? Is the pointer of to texture nonzero?
  • If your model is totally black, mabe the lighting is on, but no light is there.
I hope these were all possibilities and maybe it helps. :)
Post Reply