Scatter grass on a static mesh

I have a car track scenario modeled in 3dsmax.
When I’m in Unreal I need to scatter grass on it. Specifically, it’s a hill, and it’s a static mesh.
I don’t want a landscape actor. I would like to scatter grass, flowers and other things just like I do when I’m in foliage mode or with the grass node/landscapeGrassType.

There’s a button to choose static meshes for the foliage

image

The mesh does need to have collision for it to work.

I have been looking into a way to output the grass node on static meshes.
Let me just save you the trouble: dont even think about it :stuck_out_tongue:

I would suggest trying the ‘still beta after 6 years’ procedural foliage tools.
Im just not positive on if I had to modify them or not to populate static mesh areas - its worth a shot since they offer way faster options than hand painting in the foliage…

So, after experimenting actually I’m pretty close to what I need.
I’ve managed to procedurally grow objects on a static mesh with the Procedural foliage spawner.

One super useful thing, though, is still missing: an exclude area. Do you know how can I select a map and use it as an include/exlude area?

The exclusion boxes are box like areas.
To map it to an actual map like area you’d have to revert to using the landscape and a material with paint layers, so I wouldn’t even consider it.

Just do this for grass - inside the grass material.

Map a texture that is the size of the mesh 0 to 1.
Use world position offset to drive the position of the texture in word space.
Then output the texture to the Opacity pin.

This will erase grass from zones you manually paint black into the texture (or render target, you can support runtime).

For trees/rocks you can just manually access the generated foliage instances and delete/move like you would regular foliage.
Ofc, if you click regenerate it is going to place instances back where you don’t want them, so just wait on manual thinkering until you are happy with/have all the items you are going to have placed …