I have been trying to understand how vertex textures work, but do not understand what the parameters do. Vertex Textures normally look like this:
vt 0.000000 0.000000
vt 0.010000 0.000000 vt 0.020000 0.000000 vt 0.030000 0.000000
and I first thought that they were (x, y) values for pixils on the texture image, but that wouldn't make sense with the the decimals in the vt.
vt u v w Vertex statement for both polygonal and free-form geometry.
Specifies a texture vertex and its coordinates. A 1D texture
requires only u texture coordinates, a 2D texture requires both u
and v texture coordinates, and a 3D texture requires all three
coordinates.
u is the value for the horizontal direction of the texture.
v is an optional argument.
v is the value for the vertical direction of the texture. The
default is 0.
w is an optional argument.
w is a value for the depth of the texture.The default is 0.
is the most detailed explanation of vt I could find but could not understand it.
Instead of x and y, it's called U and V. (0,0) is one corner of the image, and (1,1) is the opposite corner, regardless of the size of the texture.
In most cases 2D texture coordinates (U,V) are used
You may get values of over 1 or below 0. In most cases the texture just wraps, so (0,0) to (1,1) is the same as (1,1) to (2,2) or (-1,88) to (0,89) etc.