Advertisement

Texture Coordinates

Started by July 13, 2000 01:31 PM
4 comments, last by HyprLogik 24 years, 4 months ago
Can anyone please explain more about texture coordinates from Tutorial #6? I''m not sure why only 2 coordinates are used and why only the values 0.0, 0.5, and 1.0 can be used. Thanks. |-|A[k3R$Z R \/\/|-|AT |V|Ak3 t|-|3 \/\/0R|_D g0 R0|_||\|D!!
|-|A[k3R$Z R //|-|AT |V|Ak3 t|-|3 //0R|_D g0 R0|_|||D!!
It's not true that you can only use 0.0, 0.5 and 1.0!
You can use EVERY number between 0.0 and 1.0.

ie. 0.1, 0.23423, 0.148934738957893465 or 0.24 are all good values.

There are 2 texture coordinates because texture maps only have 2 axes: S and T.

* S is the horizontal texture coordinate.
* T is the vertical texture coordinate.


(0.0).......................S......................(1.0)
...---------------------------------------
...|*****************************|
...|*****************************|
...|*****************************|
...|*****************************|
...|*****************************|
...|*****************************|
T.|***********(0.5, 0.5)***********|
...|*****************************|
...|*****************************|
...|*****************************|
...|*****************************|
...|*****************************|
...|*****************************|
...---------------------------------------
(0.1)...............................................(1.1)


Edited by - richardve on July 13, 2000 7:16:05 PM
Advertisement
I think I understand now. The way I take it thus far is as follows:

Whatever point in the texture you pick using glTexCoord2f() will be mapped to the coordinates of the next glVertex3f() used, right? Basically, the 1x1 dimension of the texture applies only to the coordinate system of the texture itself and not to that of the GL_MODELVIEW matrix, correct?

Thanks for your help.

|-|A[k3R$Z R \/\/|-|AT |V|Ak3 t|-|3 \/\/0R|_D g0 R0|_||\|D!!
|-|A[k3R$Z R //|-|AT |V|Ak3 t|-|3 //0R|_D g0 R0|_|||D!!
Yes, that''s correct!
There''s a little more info on generating texture coordinates for models on my webpage. Let me know if it was any use.

Paul Groves
pauls opengl page
paul's opengl message board
Paul Grovespauls opengl page
Anyone got any info on the different texuring methods (ie not just Planar and UV(W) but stuff like cylindrical, sphereical and cubic?)

Cheers
-DA
"You think that''s air your breathing now?"

This topic is closed to new replies.

Advertisement