Nút Ánh Xạ (Mapping Node)

The Mapping node transforms the input vector by applying translation, rotation, and scaling.

Nút ánh xạ.

Đầu Vào (Inputs)

The inputs of the node are dynamic. In particular, the Location input is only available in the Texture and Point vector types.

Véctơ (Vector)

Mục tiêu/phụ huynh được biến hóa.

Địa Điểm (Location)

The amount of translation along each axis.

Xoay Chiều (Rotation)

The amount of rotation along each axis. XYZ order.

Tỷ Lệ (Scale)

The amount of scaling along each axis.

Tính Chất (Properties)

Kiểu Véctơ (Vector Type)

The node applies the transformation differently depending on the semantic type of the input vector.

Điểm/Chấm (Point):

For this vector type, the node performs a straightforward transformation.

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:

  • Translation moves the input along the local rotation axis.

  • Rotation rotates the input around the origin of the space.

  • Scaling scales the input along the global axis.

Texture (Chất Liệu):

For this vector type, the node performs an inverse transformation.

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:

  • Translation moves the input along the global axis.

  • Rotation rotates the input around the translation vector.

  • Scaling scales the input along the local rotation axis.

Véctơ (Vector):

For this vector type, a Point transformation is performed, but with zero translation.

Normal (Pháp Tuyến/Bình Thường):

For this vector type, the node performs the inverse transpose of the transformation and normalize the result. Such transformation ensures correct normals after non-uniform scaling. So this type should be used when transforming normals.

Đầu Ra (Outputs)

Véctơ (Vector)

The input vector after transformation.

Một Số Ví Dụ (Examples)

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

Ví dụ về phụ huynh hóa.