Texture applying on Obj file

Started by
0 comments, last by Buckeye 13 years ago
Hi, I have a little problem. The fact is that I set up the OBJ file reader and I do not know how to add texture. Before i searched on the internet, but didn't find anything good...
It would be very nice if any of you help me.
Here's a code: obj reader and engine code ..

engine

obj reader

Thanks in advance.

And sorry for my bad english :rolleyes:
Advertisement
I do not know how to add texture[/quote]
Do you mean how you determine the textures to apply to the OBJ file?

If so, the OBJ file should be accompanied by a MTL (material) file which specifies materials (possibly including texture names) to apply to the data contained in the OBJ file. The material file has the same name as the OBJ file, except it has an .mtl extension instead of .obj.

Also, just a warning - your obj file reader assumes a very specific implementation of the OBJ file format (e.g., only 3 vertices per face). If you're sure you'll always be using that particular implementation, that's fine. But the OBJ file format allows several different constructions for the face data.

In any case, you may be interested in this description of the OBJ and MTL file formats.

Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly.

You don't forget how to play when you grow old; you grow old when you forget how to play.

This topic is closed to new replies.

Advertisement