Jump to content

  • Log In with Google      Sign In   
  • Create Account

OBJ format and texture coordinates


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 floatingwoods   Members   -  Reputation: 292

Like
0Likes
Like

Posted 13 May 2014 - 03:47 PM

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.

 

 



Sponsor:

#2 phil_t   Crossbones+   -  Reputation: 4109

Like
3Likes
Like

Posted 13 May 2014 - 04:21 PM

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



#3 floatingwoods   Members   -  Reputation: 292

Like
0Likes
Like

Posted 13 May 2014 - 05:18 PM

Thanks Phil,

 

that works indeed! (I forgot to enable the U and V repeat)






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS