映射节点

映射 节点通过应用平移,旋转和缩放来变换输入矢量。

../../../_images/render_shader-nodes_vector_mapping_node.png

映射着色器节点。

输入选项

节点的输入是动态的。 特别是 位置 输入仅在 纹理 矢量类型中可用。

矢量

要转换的矢量。

位置

沿每个轴的平移量。

旋转

沿每个轴的旋转量。 XYZ顺序。

缩放

沿每个轴的缩放比例。

属性

矢量类型

节点根据输入矢量的语义类型不同地应用转换。

  • 对于此矢量类型,节点执行直接转换。

    Transforming a texture coordinates is analogous to transforming a UV map. For instance, translating the texture coordinates along the positive X axis would result in the evaluated texture to move in the negative X axis, much like if one translated a UV map. Similarly, scaling the texture coordinates up would result in the evaluated texture to scale down. So transforming the texture coordinates would appear to have the opposite effect on the evaluated texture.

    The order of transformation is: Scale —> Rotate —> Translate, which means:

    • 平移使输入沿局部旋转轴移动。
    • 旋转使输入绕空间原点旋转。
    • 缩放将沿全局轴缩放输入。

    纹理

    对于此矢量类型,节点执行逆变换。

    Inverse transforming a texture coordinates would, as opposed to the Point type, transform the evaluated texture itself. For instance, translating the texture coordinates along the positive X axis would result in the evaluated texture to move in the positive X axis, as one would expected. Similarly, scaling the texture coordinates up would result in the evaluated texture to scale up, as one would expect.

    The order of transformation is: Translate —> Rotate —> Scale, which means:

    • 平移使输入沿全局轴移动。
    • 旋转使输入围绕平移矢量旋转。
    • 缩放将沿本地旋转轴缩放输入。

    矢量

    对于此向量类型,将执行 转换,但转换为零。

    法向(正常)

    对于此向量类型,节点执行变换的逆转置并规格化结果。 这种变换可确保非均匀缩放后的法线正确。 因此,在转换法线时应使用此类型。

输出选项

矢量

转换后的输入矢量。

举例

../../../_images/render_shader-nodes_vector_mapping_example.png

映射节点实例。