Advertisement Jump to content
Sign in to follow this  

OBJ file and texture coordinates

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



I have been working on light-weight implementation of custom OBJ file loader :-)

I am attempting to load Sibenik Cathedral from to be specific.

I have noticed that some texture coordinates in the OBJ file are negative (that is outside the range [0, 1]), such as


vt -0.764533 0.452165 0.000000
vt -0.767727 0.428138 0.000000
vt -0.783781 0.555808 0.000000
vt -0.764533 0.547835 0.000000


How do you interpret the negative values here?


Thank you!

Share this post

Link to post
Share on other sites

You can leave those as is, provided you have texture coordinates wrapping mode set to GL_REPEAT / D3DTADDRESS_WRAP / D3D11_TEXTURE_ADDRESS_WRAP.


It's quite often that designer uses small texture to cover large areas. It doesn't really matter if texture coordinates is above 1.0 or below 0.0, as long as it's not too big to hit devices' limits.

Share this post

Link to post
Share on other sites

Texture space is positive/negative complete space where 0.0 coordinate is top-left/bottom-left pixel center in texture.


But of course textures till, and thus texture cooridnate of 1.0,10.0 is ten textures away to right, and 1.0,-10.0 is ten textures left.


That is the way by which texture coordiantes can till repeating textures. Interval 0.0-1.0 contains the entire texture.

Share this post

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

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!