[TIP] - Remove procedural landscape grass under splines and steep areas

Remove procedural landscape grass under splines (when using a reserved for splines layer) and steep areas (optional).

5 Likes

How does this work?

The procedural grass is applied to the entire extent where the material layer relating to it is painted on the landscape, without respecting terrain elevations or the presence of splines.
This technique works as a mask to prevent grass from being applied to these regions.
Otherwise, it would be necessary to manually paint with another identical layer (without the procedural grass) in the regions where you want to remove the grass, which would be much more laborious.

Thank you! When I’ve tried this, if the Spline is quite curvy, the edges of the grass are never perfectly sharp next to where the spline is. Have you had that issue? I cannot figure out how to create Landscape grass with a sharp edge next to Splines…

Use the foliage tool and add meshes in the areas that need touchups.

It’s usually removing the procedural landscape grass that’s the issue rather then adding stuff back to make a sharp edge. I think using RVTs now make the most sense and use it to occlude the grass via its Material.

remove more than you think, and add back in what you want manually so as to have much more control.

The reason you have issues is the texture resolution of the layer paint.

You are essentially stuck with 1px^2 being equal to 1m^2.

The solutions are:

  1. don’t use the landscape system.

Or

  1. Work around the landscape limitations.

Since you want to use the landscape, you are kinda stuck with option 2…

Btw, this can and would pribably include making a grass material that reads RTVs and adjusts locally using much more resolution/based off a render of the local area rather than using the landscape paint stuff…

That’s very smart. I wish it could be more procedural because the projects I’m working on are pretty large-scale and have to be HQ, but that’s a perfect point, so thank you.

Yeah, I’m definitely stuck with option 2. I’ve thought about scaling the Landscape down after creating it to give me more local resolution, but ultimately, it’s never enough for it to be “sharp” or anything like that.

I think I’ll just set the Opacity of my grass material using Absolute World Position and read from an RVT I set where my Spline will “paint” the RVT or give it a mask of where the grass should be masked out. I assume I’ll just be able to increase the resolution of the RVT and, thus, the mask. I’ve seen people be able to do edge fades and add noise to this mask along the edges, which I like. I hope I can still use Nanite Displacement on my Landscape using this method though, and I’m not sure how that will be affects should I need my Landscape Material to sample that RVT as well.

I’m going to try creating this basically, and I believe it’s what he’s doing in this demo/in his plugin: https://www.youtube.com/watch?v=Hcn2BCX9dcU&t=477s.

Grass particularly for my projects was its own beast.

First of, you have different types of it - aside from the genus. It either clumps and clusters or grows out fairly evenly distributed in single strands.

In all cases, what the landscape system doesn’t do is allow you to control what is essentially the lifetime of the grass blade so as to control its lenght.
Creating a model/shader set for it is/was rather complicated, but once set up, being able to define the growth really helps with localization.

Im essentially able to do walked down pathways with varying level of somewhat natural looking grass that resemble how a real trail would look (if grass actually grew perfectly up vertically like a stick? :stuck_out_tongue: )

Its decent, but not exactly the best in terms of fidelity.

Either way, the setup by nature allows what you are wanting to do, making it so that a strand of grass our of the mesh is unable to be drawn in a specific area - over which you have render target level control.
By the time render target is no longer in the grass, most often there is no grass to draw (2048px to 10m seems to produce just about enough res for anything).

Thinking a similar setup maybe with less bells and whistles is what you want to fix the spline edge issues…