How to add a Foliage on procedural Mesh

Hello, I spent the day doing a procedural generation of world with a perlin noise and a procedural mesh, everything works perfectly, now I need foliage, but nothing want to appear, I even try the generation procedural foliage but it does not work, does anyone know a solution? thank you !!

I need to know this too. Wasn’t aware they don’t support foliage

it does not really make sense to not be able to use them on procedural mesh, I’ll try something else with follies tomorrow, I keep you informed.

it seems that nobody is replying to this and no documentation talks about this. the searching of keyboard for procedural + foliage would get you procedural foliage

As far as I know, you can’t use the foliage actor with the procedural mesh. However, there is an alternative solution. Unreal’s example project Blueprints has a blueprint actor that can accomplish a similar thing for you.

The blueprint is small and actually very effective, it is the solution I use. Easy enough to understand and use. Just drop it onto your mesh, then in its details panel choose the options such as which meshes (foliage) to generate.

2 Likes

I know this is an old post, but I too am working on a similar project where the terrain is procedurally generated using perlin noise along with procedurally placed foliage + buildings.

Just incase anyone is still looking at this thread, the “Randomly Generated Foliage” post Olathuss linked is exactly what worked for me!

Basically you want to use the “GetLineByChannel” blueprint function (or respective c++ function call) to cast line traces downwards onto your procedural mesh component (pmc), which will be detected! From here you can simply use the hit info to spawn any meshes/foliage you wish. I do want to note that when using the pmc, many of its inputs are optional, I would recommend you atleast calculate the normals for your pmc as those were very useful when placing objects on slopes (also so that lighting looks good on your pmc :slight_smile: ) If you happen to struggle with the math, there is a “calculate tangents” bp function thats included in the pmc library that calculates both the normals and tangents for you.

4 Likes