Excerpted from and compiled from the Unreal official tutorial: https://learn.unrealengine.com/course/2449699
Project file download in the course:
Link: https://pan.baidu.com/s/1o7m3pR7BvaCYAmlx57B9HQ Extraction code: uenb
-
There are many material expressions that can be used as nodes when creating materials, but there are only seven commonly used ones: Texture Sample, Constant, Constant3Vector, TextureCoordinate, Panner ), multiplication (Multiply) and interpolation (Lerp).
-
For more material expressions, please refer to the official website documentation: Material Expressions
1. Texture Sample
Carrying the texture that needs to be drawn, the portal: UE4 material (1): texture Textures
Second, the constant (Constant)
A float type value that can represent a grayscale color
Three, constant 3 vector (Constant3Vector)
A vector composed of 3 floats, which can represent a color
Four, texture coordinates (TextureCoordinate)
The coordinate input of texture sampling can control the scaling of texture
5. Panner
Controls the translation of the texture when sampling
Six, multiplication (Multiply)
Multiply values, but must be of the same type
For example, float * float, float3vector * float3vector (three floats are multiplied one by one to get a new float3vector)
-
1. The texture is multiplied by a color, and the texture can be dyed to that color
-
2. The texture is multiplied by a constant to change the brightness of the texture
7. Interpolation (Lerp)
Linear interpolation, mixing A and B in different proportions
Output = Alpha * A + (1 - Alpha) * B
-
1. When Alpha is 0, fully sample A rock texture
-
2. When Alpha is 1, fully sample B grass texture
-
3. When Alpha is 0.5, half of the AB textures are sampled for mixing, including rocks and grass
For more material expressions, please refer to the official website documentation: Material Expressions