UE4 shader programming basics study notes---familiar with each node

Texture Sample: Cover the Mesh with the required texture to show the effect. The sum of diffuse reflection + highlight + environment variables on the Mesh creates the texture lighting effect in the upper left corner.

This node can only set its black and white effect 

0 is black, 1 is white

This node can adjust the two parameters R and G.

This node can adjust the three parameters of RGB 

This node can adjust four parameters of RGBA. Since Parameter is a parameter type, it can be modified externally.

The other three mentioned above can also be converted into parameters by right-clicking and generating the parameter shortcut key "s", as shown in the figure below:

 


The smaller the metallicity, the more plastic it is. The higher it is, the more metallic it is. The highest is 1. The effect of a value greater than 1 is the same as that of 1.


The third parameter is specularity, the size of specular reflection intensity.


 

The fourth parameter is roughness. The smaller the value, the smoother it looks.


Note: When Metallic has a value, Specular will be invalid, as follows: 


The fifth parameter is self-illumination (the left side means no self-illumination, the right side means self-illumination). The comparison of the effects with and without ambient lighting is as follows:

 


The sixth parameter: transparency

Looking at the picture of the first six parameters, the transparency is gray and not enabled. This is because Opaque does not support transparency adjustment. Only by changing it to Translucent can the transparency be adjusted, as shown below:


The seventh parameter: transparency mask

It can be enabled only when the Blend Mode is set to Mask, as shown below:

Render the white part and the rest as transparent color, usually used for materials such as grass and wood.


The eighth parameter, normal, adds a special bumpy effect to the plane. The effect is as follows:

Contrast textures have non-linear effects, as follows:

The wall surface is obviously more uneven and has more detailed effects.


The ninth parameter, world scene offset:

Used to make the grass blown by the wind, offset the vertices of the grass.


The twelfth parameter: subsurface

The same Param is connected to the Base Color and the subsurface effect. It is obvious that the saturation of the subsurface effect will be much higher.


Refraction:

 Only when the Blend Mode is Translucent will there be a refraction effect. The following picture is used to compare whether there is a refraction effect:

 

The near one has refraction effect, and the far one has no refraction effect. The refraction effect is mainly used for water, glass and other materials. 


Official document content:

 

 

Guess you like

Origin blog.csdn.net/qqQQqsadfj/article/details/128454833