【UE】Texture Coordinate material node

Table of contents

1. Introduction

2. Introduction to properties

(1) Parameter: U tiling

(2) Parameter: V tiling

(3) Parameter: Unmirror U

(4) Parameter: Unmirror V

3. Node composition principle

4. Primary operations

Example 1: Control the number of tiling in U and V directions through parameters

Example 2: Control the displacement distance in U and V directions through parameters


1. Introduction

        In Unreal Engine, the Texture Coordinate node is the node used to generate or pass texture coordinates in the Material Editor. Texture coordinates determine how the texture is mapped on the model surface. You can use the "Texture Coordinate" node to control texture repetition, rotation, translation and other operations, as well as create various material effects.

This node can be created through the shortcut key "U+left mouse button"

The properties contained in this node are as follows

2. Introduction to properties

Please check "Live Nodes" and "All Nodes Preview" first

When the parameters "U Tiling" and "V Tiling" are set to 1, you can preview the texture output as follows:

(1) Parameter: U tiling

In the "Texture Coordinate" node in Unreal Engine, there is an attribute called "UTiling" (U tiling), which is used to control the number of times the texture is repeated in the U-axis direction. This property affects how the texture is tiled on the surface of the model.

By adjusting the value of the "UTiling" property, you can achieve the following effects:

  • A value of 1: The texture does not repeat in the U-axis direction and maintains the original size.
  • Value greater than 1: The texture is repeated multiple times in the U-axis direction to achieve a tiling effect of the texture. The larger the value, the more repetitions.
  • Value less than 1: The texture shrinks in the U-axis direction, producing a tiling and shrinking effect.

When we set "U Tile" to 2, the effect is as follows. Copied twice horizontally

(2) Parameter: V tiling

In the "Texture Coordinate" node in Unreal Engine, in addition to the "UTiling" (U tile) attribute, there is also an attribute called "VTiling" (V tile), which is used to control the texture in The number of repetitions in the V-axis direction. Similar to "UTiling", the "VTiling" property affects how the texture is tiled on the surface of the model.

By adjusting the value of the "VTiling" property, you can achieve the following effects:

  • A value of 1: the texture does not repeat in the direction of the V axis, and keeps the original size.
  • Value greater than 1: The texture repeats multiple times in the direction of the V axis to achieve the tile effect of the texture. The larger the value, the more repetitions.
  • Values ​​less than 1: The texture shrinks in the direction of the V axis, producing the effect of shrinking while tiling.

 When we set "V Tiling" to 2, the effect is as follows. Copied twice vertically

(3) Parameter: Unmirror U

  When we check "Release Mirroring U", the effect is as follows

If you set "U tile" to 2, you can restore the original graphics

 

(4) Parameter: Unmirror V

When we check "Release mirror V", the effect is as follows

3. Node composition principle

The "Texture Coordinate" node is a node in the Unreal Engine Material Editor that generates texture coordinates on the surface of a model. Texture coordinates determine how the texture is mapped on the surface of the model, and thus how the texture fits the model. The "Texture Coordinate" node allows you to perform various manipulations on texture coordinates in materials to achieve different effects.

As shown in the figure below, it is usually represented by R in the U direction and G in the V direction

When the two parts are superimposed:

 

4. Primary operations

Example 1: Control the number of tiles in the U and V directions through parameters

First obtain the R and G channels in the "Texture Coordinate" node through the "Mask" node, respectively, which are two one-dimensional values

Then use the "Multiply" node to multiply the parameter value set by the user with the output result of the previous step

Then combine the adjusted U and V through the "Append" node to become a two-dimensional vector.

At this point, you can control the UV of the texture through parameters. Here, both parameters are first set to 1.

Change parameter "V" to 2:

Example 2: Control the displacement distance in U and V directions through parameters

Reference video link

206UV basics and data applications_bilibili_bilibili

Guess you like

Origin blog.csdn.net/ChaoChao66666/article/details/132583607