Removing Landscape Grass does not work when used with Edit Layers

Let me share my Landscape setup first:

  • I use 4.26 on a Windows PC
  • I use an Auto material & it has some custom layers as well
  • I use Grass Output Node in the auto layer (It uses auto layer masks to spawn grass)
  • I also sample the use of Auto layer and if it doesn’t exist we don’t spawn grass

Now, I try to create a road with landscape splines.

  • I can add splines and add a paint layer to segments
  • Then it will show the paint layer on the road & remove grass as expected

But, when I move Splines to another Edit Layer (which is reserved for Splines), remove grass does not work.
I assume, that because this road is laid on top of the existing auto material.

Here’s a video showcasing the problem:

So, what solution/trick we can use to remove grass in this case?

Okay. I found the solution for this problem.
Actually, we can do this in the current setup.

We have to use an “Alpha Layer” as the grass removal layer. Then it will magically fix everything. We can even that layer to remove grass using the landmass plugin as well.

Here’s a demo with that:

Giving you a tip that may save your sanity later on.
You can make a spline actor. set the points on construction (for instance, I get my points converted from a real world coordinate system [lon/lat] to unreal units). and use this node to paint he landscape.

The result is that you have the spline available in the level to get actors to follow it along - on top of having applied the paint and being able to swap it out.

Might not be the same thing as using edit layers. Particularly because you could permanently deform the landscape. It might not even work with edit layers enabled (was never a fan of the function)…

But it’s probably a far better overall solution…

Thanks for sharing this. I didn’t know about this API before.
Would like to give it a try.

1 Like