Jump to content
  • Advertisement
Sign in to follow this  
black_blizzard

OpenGL texture mapping from a .3ds file

This topic is 4073 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 there. I need some help: I have this .3ds file, from which I obtained a .ply to load the polygons into my openGL application, but now I want to apply a texture and I can't figure out how to do it: I have a .bmp file with the texture in it, but how do I know the mapping between the vertices of the model and the pixels of the texture? Of course that info must be somewhere in the .3ds file, but I can't figure out where it is or how to export it. Some help, please? Thanks a lot.

Share this post


Link to post
Share on other sites
Advertisement
It's really quite complex, but the .3ds files contain material information and texture co-ordinates.

It's a case of processing the chunks of the file separately, and storing each part.

It's a bit much to pst in a forum, so look for this open source thingy, which if you can get to grips with the code, will help a lot.

// 3D Studio Model Class
// by: Matthew Fairfax

if you can't find it, I can probably e-mail it to you...

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!