Spawning objects on material layers with blueprint

Hello everyone!

I just started out with learning blueprints so I don’t even know if this is possible.

I want to spawn static meshes on material layers. For example: I have a giant rock formation where I want to spawn grass on one layer and pebbles on another layer.

Or is it possible to use a texture mask to determine where certain items spawn on an object?

Any help would be greatly appreciated! Thank you!

there is a standard solution for that.

Grass Quick Start in Unreal Engine | Unreal Engine 5.0 Documentation

here’s one example in video format:
Procedural Grass & Foliage for Landscapes - Building Worlds In Unreal - Episode 20 - YouTube

if you are looking for a custom solution not involved with landscapes, the basic idea is that you can use a line trace to get reference to the physical material applied on some surface. You might also look into the procedural foliage tools - don’t have to use it only for trees, it can instance any sort of static mesh.

Okay. Thank you! I’ll look into that