Sign in to follow this  

Texture applying on Obj file

Recommended Posts

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

[url=""]obj reader[/url]

Thanks in advance.

And sorry for my bad english :rolleyes:

Share this post

Link to post
Share on other sites
[quote]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 [i]sure[/i] 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 [url=""]this description[/url] of the OBJ and MTL file formats. Edited by Buckeye

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this