Procedural Foliage - Based on Material


I am trying to get the procedural foliage spawner to only spawn foliage on a static mesh based on material ID.

So this is my desired pipeline:

  1. Import a static mesh with multimple material elements, ie. Grass material, Dirt Material.
  2. Procedurally place a grass mesh only on the area with the grass material applied
  3. Procedurally place a plant mesh only on the area with the dirt material applied

Is this possible?

Many thanks in advance

Or alternatively I would like the procedural spawning to only spawn foliage on a specific mesh.

i.e. Mesh A only has trees, Mesh B only has grass.

Yes, as explained here:

You can add plant meshes to the grass tool as well.

Thanks for your reply.

This only works on the condition you use the “Landscape” mode right?

I would like this to work on a static mesh as supposed to a physical landscape generated from a heightmap.

Correct me if I’m wrong.

Ahh yes I’l sorry, my bad. Not sure how to do this on a static mesh, probally something along the lines of getting mesh position + mesh bound and a line cast to decide the position, then somehow check what material layer is beneath that. But I might be wrong here :slight_smile:

So there’s no “out the box” tool I guess

This seems like it should be really easy to do. Am I missing something?

1 Like

What about using masks?