Jump to content
  • Advertisement
Sign in to follow this  
Zakis

Texture applying on Obj file

This topic is 2651 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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

engine

obj reader

Thanks in advance.

And sorry for my bad english :rolleyes:

Share this post


Link to post
Share on other sites
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. Edited by Buckeye

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!