Landscape layer blending LB_HeightBlend question

[FONT=times new roman]I’ve been experimenting with creating landscape materials for my landscape today and I am confused about how the LB_Heightblend option works. From the documentation
(Landscape Material Expressions in Unreal Engine | Unreal Engine 5.3 Documentation) it says the following:

[FONT=“Source Sans”]

This suggests to me that if a landscape layer that is height blended has a height map which is a constant 0 it should never show up because it’s weight is always going to be multiplied by the constant height value of zero when blending. However this isn’t the case, when I try to paint in a height blended layer with a constant 0 attached to it’s height map input it still shows.
What incorrect assumptions am I making here?

Bump, anyone have any ideas?

the heightmap is used to bias the gradient (the transition zone) from one layer to the next
your incorrect assumption is that the heightmap defines the absolute transition, which of couse cannot be the case because the heightmap cannot be mapped into the direction of the gradient arbitrarily
the documentation part you quote merely warns you against using only HeightBlend layers stacked together as it can lead to none of the layers showing up on specific areas (so it inherently suggests that in any given area where multiple layers get blended, at least one non-HeightBlend layer should be present)

what is it that you’re trying to achieve here?

I’ve got a mud layer in my landscape material and a grass layer, puddles are drawn in portions of the mud layer (where the mud layer heightmap is lower) I want to apply the grass layer ontop of the mud layer but I don’t want the grass layer to be applied anywhere where the puddles are. How should I set up my layers to achieve this?

Is there some code I can look at or something that shows exactly how the highmap is used to bias the gradient? And how the gradient is used to affect the transition between the layers?

Yep, the code is under


UMaterialExpressionLandscapeLayerBlend::Compile

Thanks I will check out that code now!

What technique should I be using to do the following:

I have a base landscape layer which is mud with depressions that are filled with water (puddles) and I want to paint grass ontop of this base layer without painting any grass into the puddles at all