Jump to content
  • Advertisement
Sign in to follow this  
guinux

.ASE and textures

This topic is 4833 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, just a question about TVERT in .ASE files. they say on the internet the two first are UV coordinates, fine. the matter is, they are float, so what do you do next? i multiplied them by (width-1) and (height-1) of the texture but got bad results. hu... i must add that i wrote my own stuff to do the rendering, so just to make sure the error is not here :) or if you know anything to take care of about .ASE files... thank you very much guinux

Share this post


Link to post
Share on other sites
Advertisement
hello,
whats wrong with the floating format?
an uv should be a float....
where 0,0 means in the left upper corner of the texture and 1,1 is the right down coner of the texture...
if you set them to more than 1 then you get tilling...the texture get wrapped on the polygon....thats problably the resaon why you get strange result when taking the size - 1 multiplied by the u/v, because then let say its 512 it become something between 0 and 512 and 512 times wrapped around your polygon...hmm not nice...

anyway...i hope you understand that..lite confusing maybe,
short answer: just use the uv coordinates you get from the ASE on your vertex..its work nice

Share this post


Link to post
Share on other sites
ok, the error is somewhere else then... i'm trying to create a mapped cube so it'll be easier to see what's wrong.

oh by the way, you say u/v coordinates are always float in the range [0;1], but often, documentation on the .ASE file format it is also the same as regular vertices. meanwhile, vertices can be out of range... so? because i was also having problem with a projection matrix which gave out of the range value, so i was wondering if the vertices coordinates HAD to be in [-1;1] to have the same range of values after the projection matrix...

Share this post


Link to post
Share on other sites
The uv coordinates are always float, but they don't have to be in the range 0 to 1....but they usually are...if you increase your uv coordinates beyond 1 then you get a tiling "effect".
the uv coordinates could also be negative. There is actually no "out of range" for uv coordinates(unless you get out of range of a float) you just get tiled result if you go over 1.

Quote:
oh by the way, you say u/v coordinates are always float in the range [0;1], but often, documentation on the .ASE file format it is also the same as regular vertices. meanwhile, vertices can be out of range... so? because i was also having problem with a projection matrix which gave out of the range value, so i was wondering if the vertices coordinates HAD to be in [-1;1] to have the same range of values after the projection matrix...


can't say that i fully understod what you mean here...anyway...the value of uv coordinates isn't always, and i would say almost never, the same as the value of you vertices coordinates...for exampel, let say that you got a vertices position at (0,0,0) and one at (0,255,0) and then take your uv as (0,255) then you tile your texture 255 times in the v direction.

I'm not sure if it was that what you meant..

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!