UE4-terrain material layer creation and use

1. Select the terrain in the mode, enter the creation terrain interface, support yourself to set the size of the terrain and import the height map. The terrain generated by importing the heightmap has a default size. You can reset the terrain size through attributes such as segment size in the left panel, and the overall trend of the heightmap will not change. After setting, click Create, and the system will automatically create terrain.

2. Create a material and use the Landscapelayerblend node to create a layer node.

3. Select the layer node, add layer data in the details panel, and set parameter values.

4. Compile and save the material. Create a material instance, the engine mode enters the selection mode, select the terrain, and apply the material instance to the terrain

 5. Re-enter the terrain mode, select drawing, there are three layers in the target layer on the left, the layers at this time cannot be used, and layer information needs to be created. There is a + sign to the right of each layer, select the plus sign to create the layer information and choose a folder to save it. (Which layer information is created first, the color of the terrain will be consistent with it)

 

 6. To draw a layer, first select a layer to be drawn, and then set the brush properties to draw on the terrain.

Draw toolbar parameters:

Drawing: Cover the terrain according to the set size strength, size, attenuation radius, and layers.

Smooth: It is most used at the junction of the front and back layers, so that there is a transition effect between the two layers.

Flat: In this mode, the brush color has nothing to do with the selected layer color, and the brush color is related to the color you pick up when you click on the ground for the first time. The terrain is divided into area blocks. If the setting is appropriate, the area block will be filled with flat mode without affecting other area blocks.

Noise: The fill effect is a noise effect.

The following tool strength, brush mode, brush radius, attenuation mode, attenuation strength, you can set the viewing effect by yourself, all related to the drawing effect.

Example:

Leveling operation:

Randomly draw an area in red, adjust to flat mode, first click on the green area and drag the mouse to change the area blocks that do not need to be filled with red to green as a whole, and be sure to eliminate all the red in the entire square.

At this time, because the brush is a circle, the cut off part of the red area is not regular. At this time, click the red area and drag the mouse to fill it, and you will see the effect.

1. Start drawing:

2. Click on the green area, then drag the mouse to enter the target position, and cover the unnecessary red area blocks: remove the two middle areas and the surrounding irregular areas

 3. Click the red area, drag the mouse to draw, the flat area will be limited, and will not expand to the non-red area

Guess you like

Origin blog.csdn.net/lei_7103/article/details/123848018