MaterialFunctionInstance Texture Parameters won't resolve when using it in a Landscape Material with LandscapeLayerBlend

Hey there,

I wanted to create a Landscape Material and practice painting landscapes a bit in Unreal Engine 5.5.1. For that I wanted to use LandscapeLayerBlend with different materials in my M_Landscape. For starters I hooked up different colored materials to test if the painting works. You can see the output here:

To maintain my landscape material (M_Landscape) I thought it might be a good idea instead of making all the individual materials there to instead wrap them all in material functions and then import each layer as material function into M_Landscape and use them in my LandscapeLayerBlend node. For that I created MF_LandscapeLayer. This material function uses only in engine textures as default textures:

Here is the reference viewer for MF LandscapeLayer:

After that I created my 3 Landscape Layers by creating Material Function Instances of MF LandscapeLayer and adjusting the TextureParameters:

With all that I can bring it all together in my M_Landscape:

As noted in the image I tried out different techniques with different results:

  • Using Materials created within M_Landscape works fine (the R, B and G materials display properly)
  • Using the MF_LandscapeLayer Material Function directly also works fine. The landscape then displays the material output of MF_LandscapeLayer properly
  • Using a Material Function Instance of MF_LandscapeLayer (in this case MF_LandscapeLayer_Inst) WITHOUT changing the default texture2D parameters also works fine
  • However, using MFI_LandscapeLayer_MossyGround will output the error shown in the image and the landscape will not display properly

I went ahead and created a small test material to see if the material function instance in general is broken, however it works just fine when used on shapes and basic materials:

After all of that I tried out duplicating MF_LandscapeLayer and setting the MossyGround textures directly inside it. In doing so, I’m avoiding using Material Function Instances and having to override their texture2d parameters. However, this of course also means that I will have to duplicate this node graph over and over again for every landscape layer I will create. Here is the graph:

And it actually works just fine:

Is there something wrong with using texture2d parameters in material function instances together with landscape layer blend? Does anyone have a different approach to what I am trying to achieve here without having to duplicate the node tree over and over?

Things I will try instead: I will try to create a material layer and import the landscape layers one by one in M_Landscape using the MaterialAttributeLayers node and see if this works better. If it does I will post it in the comments. My questions for Material Function Instances will still remain though. Im really curious why my initial approach doesn’t work.

Thanks for your help!

For those interested, the Material Layer approach failed. You can not import each layer individually using Material Attribute Layers, because you apparently can only have one of them in your graph:

I think there is something wrong with your graphics card.