Nanite Landscape has wrong Weightmap projection

Hey.

I’ve got a problem regarding Landscapes, specifically with nanite-enabled landscapes.

When I enable nanite on a landscape, all painted weightmaps become “wrong”. It almost seems like their projection is wrong. I managed to repro the problem on a clean Unreal Engine build with a minimalistic landscape material.

I attached 2 screenshots, one of them is nanite-disabled and the other is nanite-enabled.

Cheers!

Screenshot 2026-07-10 162135.png(1.58 MB)
Screenshot 2026-07-10 162119.png(1.53 MB)

Steps to Reproduce

  1. Open project
  2. Select the Landscape actor in the level
  3. Enable Nanite on it
  4. Press Build Data
  5. You should see that the landscape has wrong painted weightmaps

Hey friend! Thanks for the solid repro. For the time being I’ve filed an issue and it should populate with info in the next few days: https://issues.unrealengine.com/issue/UE\-386481\.

I think I manage to indirectly fix this problem, although I’m not 100% sure how.

Here’s the gist:

I wanted to fix the incorrect specular and roughness values output of Landscape Layer Blend material node. This github change was the culprit for that issue:

https://github.com/EpicGames/UnrealEngine/commit/5fb68c7cd7df1fcfeee60b27ea35b9962509da57

Specifically line 225:

OutputCode = FMaterialAttributeDefinitionMap::CompileDefaultExpression(Compiler, Compiler->GetMaterialAttribute());This issue might warrant its own thread, but this change basically was shifting the specular and roughness values by 0.5 (which is their default value) for each painted layer.

This is the change I applied:

const int32 DefaultCode = FMaterialAttributeDefinitionMap::CompileDefaultExpression(Compiler, Compiler->GetMaterialAttribute());
if(bNeedsRenormalize)
{
  OutputCode = Compiler->Constant(0);
}
else
{
  const int32 RemainderCode = Compiler->Clamp(Compiler->Sub(Compiler->Constant(1.f), WeightSumCode),  Compiler->Constant(0.f), Compiler->Constant(1.f));
 
  OutputCode = Compiler->Mul(DefaultCode, RemainderCode);
}

This changed fixed the specular/roughness issues on the landscape when I both had heigh-blended and clear weight-blended layers.

But this change also fixed the wrong weightmap projection on nanite-enabled landscapes.

The code in line 225 was the main culprit.

Hi,

Thanks for reporting. It turns out this had been fixed in our main development branch already (as part of a refactor of that material expression), which is likely why we haven’t noticed before. We’ll make sure to integrate a proper fix into UE5.8.1.

Cheers,