Landscape material

Hey,

I have a landscape master material that is dependent on slopemasks. The slopemasks applies a grass and stone material function depending on height assigned in World Machine. I can manually draw and alter these layers, and I have also added another snow layer. This is all per Futurepoly’s tutorial, found here: Pro Tips: Creating Terrain For Unreal 4 Part 2 - YouTube.
He recommends sticking to these three material functions; grass, stone and snow, but I want a 4th layer of sand which will be applied at the shorelines. I can manually draw this, but the problem arises when I plug the sand material function graph into the LandscapeMasterMaterial. The whole landscape goes grey. I have tried and tried, but I can’t get the sand material to work as intended; however, if I change the material function for the graph with the Snow material function, the material renders as expected, although I’m missing the functionality. :slight_smile: So I looked into the differences of the sand material and the snow material, and there’s nothing that I can spot as an error; any help is most welcome! :slight_smile:

Summary: Master material misfunctioning when applying a 4th material function.

This is how the terrain appears when I apply the 4th material.

Graph node, showing the grass and stone MF’s implemented in the master material, along with the snow. This functions as intended if plugged in.

Here I have copied the snow function and made the sand function; does not work.

Sand material function.

Anyone who can help me? By the way, the master material gives me ~200 instructions. Is that a lot - I heard material functions are exepensive, but I also heard they’re the way to go.

I’ve tried merging the heightlerps of the snow material and the sand material and using the alpha of the grass/rock just to see if that worked, which it did not. There must be something wrong with the sand material function itself, as when I replace the sand function in the master material with for example the snow MF, then it works as expected. Strange.

You are likely to be hitting 16 texture sampler limit. Try either setting your texture samplers to Shared:wrap or use less texture samplers.