Jump to content
  • Advertisement
Sign in to follow this  
Stoic

OBJ format and Multitexturing question

This topic is 4529 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

The OBJ file format doesn't support multitexturing, right? It only supports a single set of U,V, coords per vertex, right? I've been looking for a specific answer to this for awhile now, but most of the information I find on Google seems pretty out of date(i.e. before people could expect their file formats to support multipule textures), so I apologize if this is a newbie-ish question. Thanks! (Edit: fixed typo) [Edited by - Stoic on June 26, 2006 12:04:06 PM]

Share this post


Link to post
Share on other sites
Advertisement
cube3.obj
cube3.mtl

Well here is an OBJ file that holds a model of a cube that has two different UVsets and two different materials assigned to it.
(The material info is kept in the seperate mtl file).
At the lower part of the file, where the order of vertices for each face are being declared (line 63,65,67,70), you can see the seperate material that is being used for those faces.

I am not sure if you are refering to an older OBJ file specification but this is multi-texturing right?

Share this post


Link to post
Share on other sites
Ok after doing some google-search on this, I found out that the original OBJ file specification does not have this usemtl tags to define the use of seperate materials, but many applications (like 3dsMax, Maya, Lightwave) write these usemtl entries into the OBJ file to make things easier.

How to add usemtl to an OBJ file

Now as you understand whether you have multitexturing in your model really depends on whether your OBJ file parser does read in those usemtl tags or not.

Hope this helps

Share this post


Link to post
Share on other sites
Hmm, that's like multitexturing but not it exactly. The cube mesh uses two separate materials, but only one material per face.

What I'm looking for is multiple textures per face, like specifying a lightmap, or a normal map in addition to a typical color texture.

Here's a little more context if it's of any help:

Right now, my engine only supports OBJ Mesh loading and I want to jump to support multitexturing, so I'm starting to wonder if I need to support a new mesh format for my artists to be able to generate multitextured content. I'm a programmer, not an artist, so I'm not really familiar with the art tools (like Maya or 3DSMax).

Although, poring over the cube mesh you sent... I'm starting to wonder if I could update my OBJ parser to "hack" a multitexturing solution...?

Thanks for your help!

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!