1

我一直在尝试了解顶点纹理的工作原理,但不了解参数的作用。顶点纹理通常如下所示:

vt 0.000000 0.000000

vt 0.010000 0.000000 vt 0.020000 0.000000 vt 0.030000 0.000000

我首先认为它们是纹理图像上像素的 (x, y) 值,但这对于 vt 中的小数点没有意义。

vt uvw 多边形和自由形式几何的顶点语句。

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. 

是我能找到但无法理解的最详细的 vt 解释。

4

1 回答 1

2

它不是 x 和 y,而是称为 U 和 V。(0,0) 是图像的一个角,(1,1) 是对角,与纹理大小无关。

在大多数情况下,使用 2D 纹理坐标 (U,V)

您可能会得到大于 1 或小于 0 的值。在大多数情况下,纹理只是包裹,因此 (0,0) 到 (1,1) 与 (1,1) 到 (2,2) 或 (-1) 相同,88) 到 (0,89) 等。

于 2012-11-02T03:43:39.497 回答