.obj mesh textures missing !!!!
-
- Posts: 156
- Joined: Wed Jul 21, 2004 4:29 am
- Location: Mishawaka, In
.obj mesh textures missing !!!!
ok i am having a wierd problem, my mesh which is in .obj format LOSES its textures when it loads! leaving me a black mesh lol. how do i fix it?
just manually add the texture map
works a charm here apart from the edges look kinda rough. I'm guessing none of the info held in the .mtl file is loaded.
Code: Select all
yourobj->setMaterialTexture(0,driver->getTexture("texturemap.bmp"));
.obj does suports materials (with textures) but they are not contained in the .obj file and must be in a separate .mtl file. Unfortunately Irrlicht does not load these
You do a lot of programming? Really? I try to get some in, but the debugging keeps me pretty busy.
Crucible of Stars
Crucible of Stars
an issue for Niko ?
I had the same problem some days ago.
Cound not find a working solution for that problem.
Just to add
object->setMaterialTexture(0,driver->getTexture("texture.jpg"))
is only a workaround.
But I am afraid it's not a good solution because all the texture mapping will get lost.
My hope is, Niko will add a little more support to the wave format.
Then we could use "Art of Illusion", which supports wave output.
Cound not find a working solution for that problem.
Just to add
object->setMaterialTexture(0,driver->getTexture("texture.jpg"))
is only a workaround.
But I am afraid it's not a good solution because all the texture mapping will get lost.
My hope is, Niko will add a little more support to the wave format.
Then we could use "Art of Illusion", which supports wave output.
.obj textures
A year ago I was playing with irrlicht and with an OBJ-model made with lightwave, and I had a similar problem. I remember that I fixed it, but it was more a hack, and thus I never send the fix to Niko.
Maybe some of you wants to write a patch??
As far as I remeber the OBJ-format worked like this:
you declare a list of vectors, texture coordinates, colors whatever, and you define triangles saying:
triangle should be composed by vertex 501,123,126, it should use color 127,456,343 at each vertex etc.
But OBJ also supports negative indeces for vertices etc. to count backward, i.e.
triangle -1,-2,-3
would be a triangle, which is composed of the last vertex defined, the one defined before, and the one defined before this other one... I don't know if it is clear, what I mean.
The problem with irrlicht is that it does not implement counting backwards.
If you try to correct this, good luck.
Klaus
Maybe some of you wants to write a patch??
As far as I remeber the OBJ-format worked like this:
you declare a list of vectors, texture coordinates, colors whatever, and you define triangles saying:
triangle should be composed by vertex 501,123,126, it should use color 127,456,343 at each vertex etc.
But OBJ also supports negative indeces for vertices etc. to count backward, i.e.
triangle -1,-2,-3
would be a triangle, which is composed of the last vertex defined, the one defined before, and the one defined before this other one... I don't know if it is clear, what I mean.
The problem with irrlicht is that it does not implement counting backwards.
If you try to correct this, good luck.
Klaus
-
- Posts: 156
- Joined: Wed Jul 21, 2004 4:29 am
- Location: Mishawaka, In
nevermind
thats ok im not a good enough coder for that lol, im just going to switch to .3ds format.