Download

Modulated blending woes in non-landscape materials

I’ve been hitting a road-block with a multi-layered material, and now I’m wondering if what I’m trying to do is even possible. Maybe an Unreal guru out there can set me straight.

I have developed a material that utilizes several material functions, and I’m using vertex colors to blend between the functions. That part works fine. However, when I try to modulate the blend with heightmaps, things behave badly. The modulation does work, but the upper layers, where masked, show the base layer underneath instead of the combinationof layers.

So, for example, assume these are my layers:
#1 (base)=Dirt
#2=Dry grass
#3=Green grass
#4=Cobblestones
When I paint dry grass (#2), it blends fine with the dirt (#1). But when I paint green grass (#3) and want it to transition nicely with #2, instead it transitions with #1 only. Same thing with the cobblestones (#4)–I can’t get it to show #2 or #3 in the spaces between the stones, only #1.

I’m not using a landscape material. I know that the usual approach is to use a landscape mesh and material for this sort of thing, but for various reasons I’m trying to just use a regular static mesh (of fairly small size).

Any help would be greatly appreciated. I’ve attached one of my material graphs for reference.