Step 3.

Now we can build the Material Functions for our Landscape Material.

  1. Create a new Material Function in a folder you’ll be wanting to keep your landscape materials. This one is for the Potting Soil, so I’ve called it MF_PottingSoil_SP (Swizzle+Puddle) – located in a “Landscape” folder. I’ve suffixed it with the type of DeTiler I’m using so I can create multiple types and switch them in and out at any stage.
  2. Add a “Material Function Call” and choose one of the DeTilers we created earlier. For The Potting soil I’ve selected the MF_DeTile_SwizzlePuddle function.
  3. Drag the imported Potting Soils Diffuse, Normal and SRAODP textures to the appropriate inputs in your Material Instance once you have created it and add a mask map – The Starter Content has some good ones.
  4. Drag a wire from the output of the DeTiler to the output result of the function. The DeTiler returns a Material Expression, which is what our Landscape Material will be wanting.

Repeat this for each Landscape Layer material you’re using, exchanging the DeTiler to whichever you think fits the textures the best. This tutorial is using the SwizzleBlotch for the Mud and MossyStones, the Puddle for the Gravel, Potting Soil and Soil Mulch as they look pretty good without the swizzle.

For each of the Function inputs, I’ve labelled them prefixed with the layer name, e.g. “PottingSoil_Scale1” and set their category to the layer name as well. This keeps things tidy in the Material Instance we will be creating further down.

This Landscape Material also includes a Puddle layer which can be painted over the gravel in the tutorial example – it gets used to paint over shadowed areas and along edges of gardens. It’s just a simple function that interpolates the pixel color to black (or selected color), flattens the Normal and reduces the roughness down to 0.

It has it’s own Displacement Amount so if you’re using displacement (like we are here) you can set this amount as slightly less than the main gravels displacement and it creates a puddle/drain like dent in the landscape at the same time.

While creating these Material Functions and hooking up the textures is a good time to make any initial changes to the textures brightness and other values. You can easily alter these things in the Texture Editor, just open it and adjust the values in the Details Panel. For this tutorial I was looking for a damp look for the potting soil, so setting its brightness value down to 0.5 worked for me.