Jump to content
  • Advertisement
Sign in to follow this  
floatingwoods

OBJ format and texture coordinates

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

Hello,

 

I have been reading through various documentations of the OBJ (i.e. Wavefront) fileformat, and all mention for the vt tag:

vt u v [w]
Texture coordinates, in (u ,v [,w]) coordinates, these will vary between 0 and 1, w is optional and default to 0.

It says that u and v should have values between 0 and 1, which makes sense.

 

But many OBJ files contain entries like:

vt -13.7390 -7.9255 0.0000

How should I interpret those? Currently, I am simply doing a fmod so that I finally obtain values between 0 and 1. But that doesn't look correct. Applications like meshlab correctly interpret those values.

 

 

Share this post


Link to post
Share on other sites
Advertisement

Just take them as is. I don't know about the official .obj specification, but in general texture coordinates can certainly be outside 0 and 1 (that's how textures can wrap on an object).

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!