Landscape Expressions

LandscapeLayerBlend

The LandscapeLayerBlend node enables you to blend together multiple Textures or Material networks so that they can be used as Landscape layers. The LandscapeLayerBlend uses an array to store information about the Landscape layers. To add layers to this array clicking the plus sign icon that you see next to the entry: "0 elements".

Landscape_Add_To_Array.png

When you add multiple layers to the LandscapeLayerBlend node, you get something that looks like the following image.

LandscapeLayerBlend Node

You can set the properties of the LandscapeLayerBlend node in the Details panel of the Material Editor.

Number Property Description
1: Layers The list of layers the node contains. You can add layers by clicking the plus icon (Plus Sign).
2: Layer Name The unique name that you give the layer. The Layer Name corresponds to the layer name used in Paint mode in the Landscape tool window.
3: Blend Type Either LB_AlphaBlend, LB_HeightBlend, or LB_WeightBlend. These are described later on this page.
4: Preview Weight This is used as the weight value for the layer to preview the blending in the Material Editor.
5: Const Layer Input This is for supplying a numeric value as a color to use in case you do not want to use a texture. This is mainly used for debugging a layer if there is an issue with it.
6: Const Height Input This is for supplying a numeric value as a height in case you do not want to use a texture.
7: Additional Layers These are what additional layers look like when they are collapsed.

Landscape_LayerBlend_Node.png

The following table details the Layer Blend node's inputs and outputs.

Number Item Description
1: Layer LayerName Each layer adds an input for the layer to blend together. These inputs will not be available until layers are added in the Details panel.
2: Height LayerName This is where you supply a height map to blend with. Please note that this input will only be visible on layers that have their Blend Type property set to LB_HeightBlend.
3: Unlabeled Output The result of the layers blended together.

When using certain combinations of layer blend modes you could end up with black spots all over your Landscape where different layers meet. This problem is especially prevalent when using the LB_HeightBlend mode for multiple Landscape layers. LB_HeightBlend works by modulating the blend factor, or weight, for the layer using the specified height value. When you have multiple layers painted on an area and they all are set to LB_HeightBlend, it is possible that all the layers painted in a particular area will simultaneously have a 0 height value, so the desired blend factor for each layer becomes 0. Because there is no implicit or explicit ordering, the result will be black spots because no layers will have any contribution to that area. The situation is worse when you are blending a Normal map, because it results in a Normal value of (0,0,0) which is not valid and will cause rendering problems with the lighting. The solution to this problem is to use LB_AlphaBlend for one of the layers like in the following example. LB_HeightBlend Problem

In the left image, all layers are LB_HeightBlend, causing some areas to be black. On the right, the red "1" layer has been changed to use LB_AlphaBlend, which solves the problem.

Below is an example of the properties of the Landscape Layer Blend node for a number of layers all being blended together. Make sure to note how the Soil layer has its blend mode set to LB_AlphaBlend while the other layers have theirs set to LB_HeightBlend. This is to stop the issue mentioned above (having black spots where layers meet) from happening.

Layer Blend Properties

To delete a layer, click the Drop-Down Arrow to the right of the layer's element number to open the context menu, and then click Delete.

Delete Layer

LandscapeLayerCoords

The LandscapeLayerCoords node generates UV coordinates that can be used to map Material networks to Landscape terrains.

LandscapeLayerCoords Node

You can set the properties of the LandscapeLayerCoords node in the Details panel.

Number Property Description
1: Mapping Type The ELandscapeCoordMappingType that specifies the orientation to use when mapping the Material (or network) to the Landscape.
2: Custom UVType The mapping place to use on the terrain. The CustomUVType outputs the UV coordinates to map the Material to the Landscape based on the given property values.
3: Mapping Scale The uniform scaling to apply to the UV coordinates.
4: Mapping Rotation The rotation, in degrees, to apply to the UV coordinates.
5: Mapping Pan [U] The offset in the [U] direction to apply to the UV coordinates.
6: Mapping Pan [V] The offset in the [V] direction to apply to the UV coordinates.
7: Unlabeled Output Outputs the UV coordinates to map the material to the Landscape based on the given property values.

LandscapeLayerSwitch

The LandscapeLayerSwitch node allows you to exclude some Material operations when a particular layer is not contributing to a region of the Landscape. This allows you to optimize your Material by removing calculations that are not necessary when a particular layer's weight is zero.

LandscapeLayerSwitch Node

You can set the properties of the LandscapeLayerSwitch node in the Details panel.

Number Property Description
1: Parameter Name The unique name that you give to the parameter.
2: Preview Used If checked, uses a preview.
3: LayerUsed The result to use when the layer specified in the node's properties is in use by the current region of the Landscape.
4: LayerNotUsed The result to use when the layer is not used by the current region of the Landscape and has a weight of zero.
5: Unlabeled Output Either the LayerUsed or LayerNotUsed inputs, depending on whether or not the layer contributes to the particular region of the Landscape.

LandscapeLayerWeight

The LandscapeLayerWeight expression allows Material networks to be blended based on the weight for the associated layer obtained from the Landscape the Material is applied to.

LandscapeLayerWeight Node

You can set the properties of the LandscapeLayerWeight node in the Details panel.

Number Property Description
1: Parameter Name The name of the layer belonging to the Landscape to be associated with this expression. The weight for this layer is used as the alpha value for blending the two input networks.
2: Preview Weight The weight to use for preview purposes in the Material Editor.
3: Const Base You can specify a base color here that you would like for your Landscape to have
4: Base The network to blend this layer with. This is generally the result of any previous layer blending, but can be empty if this is the first layer.
5: Layer The network to blend together to create this layer.
6: Unlabeled Output Outputs the result of the blending between the Base and Layer inputs based on the layer weights of the layers involved.

LandscapeVisibilityMask

The LandscapeVisibilityMask node is used for removing the visibility of parts of your Landscape, so you can create holes, for example, for creating caves.

LandscapeVisibilityMask Node

You can set the properties of the LandscapeVisibilityMask node in the Details panel.

Number Property Description
1: Unlabeled Output Outputs the visibility mask properties.

All you have to do to get this node to work correctly is to make sure that its output is connected to the Opacity Mask slot of your Material and that the Materials Blend Mode is set to Masked.

Landscape_VisibilityMaskSetup.png

Tags