Download

How to stop grass from spawning on slopes

I am using a slope function to have rock texture spawn on certain slopes and the rest remains grass. When I try to use the grass output node and tell it to only sample grass it still is spawning it over my entire landscape. Is there anyway to possibly mask the grass on everything that has a certain slope?

What you are using is the layer called Grass.

No changes are made to that layer at all, so you probably just have it painted full.

Solution can be as simple as adding a “no procedural” layer and painting it around.

Then you subtract no procedural sample from all other procedural layers, clamp, and connect to the node.

Similarly, you can also manually paint the grass layer instead of filling the landscape.

Is there a way to do that without painting. My landscape is too big to go around and paint all the slopes with rock so grass wont spawn on it.

Or maybe better put, can I put the slope function earlier on in the grass layer so that it changes not only where rock is but where grass isnt.

OFC you can.
The main issue will be performance cost.
Just subtract the same math you subtract from the auto layer, clamp, and feed into the grass node.

Painting it is almost always preferable if you Have to use landscapes.
Same for the auto layer.

Personally, I have used it only as a default fallback, then painted the materials above it.

Here’s what you CAN do. and probably SHOULD do.

make your auto material. set it up with Switches so that you can paint one area at a time in full black/white.
Once you have that set and the fades look nice, go into the landscape tools and bake the level as an impostor.
The engine will then capture the black/white texture.
Export/save/move the texture elsewhere.

go back to the level, change material to a different one without the auto layer, and use the texture(s) you produced as the paint layers.
It’s an option when in paint mode, you can select a texture to use for the layer fill.

That’s a few steps, but it will also allow you to use the physical material. Whereas the auto material won’t allow for that.