# Mesh Terrain is incompatible with Material Layer Blend (MLB) assets

**URL:** <https://forums.unrealengine.com/t/mesh-terrain-is-incompatible-with-material-layer-blend-mlb-assets/2732313>\
**Category:** Issues and Bug Reporting (Unreal Engine)\
**Tags:** unreal-engine, open\
**Created:** [June 29, 2026, 3:10pm UTC](https://forums.unrealengine.com/t/mesh-terrain-is-incompatible-with-material-layer-blend-mlb-assets/2732313 "2026-06-29T15:10:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheDekuduke](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TheDekuduke](https://forums.unrealengine.com/u/TheDekuduke)\
**Post date:** [June 29, 2026, 3:10pm UTC](https://forums.unrealengine.com/t/mesh-terrain-is-incompatible-with-material-layer-blend-mlb-assets/2732313/1 "2026-06-29T15:10:18Z")

</div>

### Summary

When using Mesh Terrain, if you put a `MeshPartitionResource` and `MeshPartitionChannelSample` node inside a Material Layer Blend, the result is always 0. The setup works if the nodes are used in the material directly instead of the MLB asset.

This means material layer blending is impossible with Mesh Terrain. A material must instead hoist all layer definitions and blend logic into the material itself, bypassing Unreal’s layer system entirely.

### What Type of Bug are you experiencing?

World Creation Tools

### Steps to Reproduce

1. Make an Open World level. Add Mesh Terrain and assign an MPD that has a channel (e.g., `Dirt`) and a material with at least one layer (not including the Background layer)
  - Important: the layer MUST have a Material Layer Blend (MLB) asset assigned.

2. Add a brush modifier and paint `Dirt` onto the terrain.
3. In the MPD material, pipe `MeshPartitionResource` into `MeshPartitionChannelSample` (Channel = `Dirt`) and then into Base Color. The painted area **will** be visible.
4. Now put that same `MeshPartitionResource` + `MeshPartitionChannelSample` inside the MLB asset. Connect it straight to the blend’s Alpha. Assign the blend to a layer on the instance. The painted area **will not** be visible.
  - Note: this matches the example shown in the Mesh Terrain [docs](https://dev.epicgames.com/documentation/unreal-engine/mesh-terrain-material-in-unreal-engine?lang=en-US#readingweightchannelsinmaterial).

### Expected Result

Mesh Terrain channel sample data should be returned when when using the `MeshPartitionResource` + `MeshPartitionChannelSample` nodes inside a Material Layer Blend asset.

### Observed Result

Mesh Terrain channel sample data is always zero inside Material Layer Blend assets.

### Affects Versions

5.8

### Platform(s)

Windows

### Video

> **[Material Layer Blend bug.mp4](https://drive.google.com/file/d/1FM3zQqOZzWSj5EenDRDboQbm_apJyjqp/view)**
>
> Google Drive file.

### Additional Notes

The attached video demonstrates:

1. `MeshPartitionChannelSample` works when used directly in a material.
2. `MeshPartitionChannelSample` does not work when used in an MLB asset.
3. Sanity check: MLB is configured correctly.

---

<div class="post-metadata">

**Author:** ![Bug-Reporter](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/bug-reporter/32/1223650_2.png) [@Bug-Reporter](https://forums.unrealengine.com/u/Bug-Reporter)\
**Post date:** [August 20, 2026, 1:00am UTC](https://forums.unrealengine.com/t/mesh-terrain-is-incompatible-with-material-layer-blend-mlb-assets/2732313/4 "2026-08-20T01:00:32Z")

</div>

UE-391544 has been added to our ‘To Do’ list. Someone’s been assigned this task.

---

<div class="post-metadata">

**Author:** ![Jackson3232](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jackson3232/32/1203544_2.png) [@Jackson3232](https://forums.unrealengine.com/u/Jackson3232)\
**Post date:** [September 11, 2026, 11:14am UTC](https://forums.unrealengine.com/t/mesh-terrain-is-incompatible-with-material-layer-blend-mlb-assets/2732313/5 "2026-09-11T11:14:50Z")

</div>

I have made an engine side edit to MeshPartitionMaterialExpressionUtils.cpp(45) to get it working.

```auto
#if WITH_EDITOR
int32 UMaterialExpressionMeshPartitionResource::Compile(class FMaterialCompiler* Compiler, int32 OutputIndex)
{
    {
       UTexture* TextureToUse = TextureParameter.Get();

       if (!TextureToUse)
       {
          return Compiler->Errorf(TEXT("Missing MeshPartition Texture."));
       }

       // The channel texture is bound per section as a global parameter (SetTextureParameterValue(ChannelTextureParameterName)).
       // When compiled inside a material layer or blend function, the compiler scopes parameters to the current owner
       // (LayerParameter/BlendParameter + index), which would not match the global override and fall back to the default texture.
       // Force the global association, like FHLSLMaterialTranslator::StaticTerrainLayerWeight does for landscape weightmaps.
       Compiler->PushParameterOwner(FMaterialParameterInfo());

       // Return the TextureObject (used by other expressions like samplers)
       const int32 TextureParameter_IDX = Compiler->TextureParameter(ChannelTextureParameterName, TextureToUse, EMaterialSamplerType::SAMPLERTYPE_Masks);

       Compiler->PopParameterOwner();

       return TextureParameter_IDX;
    }
}

```

If you have a custom build of the engine, this can be implemented to make the MeshPartitionRessource work from inside a Material Layer Blend asset.  
Hope this can be of help while waiting for a proper fix from epic !
