# How to add a Foliage on procedural Mesh

**URL:** <https://forums.unrealengine.com/t/how-to-add-a-foliage-on-procedural-mesh/405836>\
**Category:** World Creation\
**Tags:** Procedural-Generation, unreal-engine, Foliage, procedural-mesh, Blueprint, question\
**Created:** [September 30, 2017, 3:43pm UTC](https://forums.unrealengine.com/t/how-to-add-a-foliage-on-procedural-mesh/405836 "2017-09-30T15:43:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Upeaval](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Upeaval](https://forums.unrealengine.com/u/Upeaval)\
**Post date:** [September 30, 2017, 3:43pm UTC](https://forums.unrealengine.com/t/how-to-add-a-foliage-on-procedural-mesh/405836/1 "2017-09-30T15:43:59Z")

</div>

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 !!

---

<div class="post-metadata">

**Author:** ![Frozenfire](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Frozenfire](https://forums.unrealengine.com/u/Frozenfire)\
**Post date:** [October 7, 2017, 2:55pm UTC](https://forums.unrealengine.com/t/how-to-add-a-foliage-on-procedural-mesh/405836/2 "2017-10-07T14:55:16Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Upeaval](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Upeaval](https://forums.unrealengine.com/u/Upeaval)\
**Post date:** [October 7, 2017, 7:55pm UTC](https://forums.unrealengine.com/t/how-to-add-a-foliage-on-procedural-mesh/405836/3 "2017-10-07T19:55:46Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Frozenfire](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Frozenfire](https://forums.unrealengine.com/u/Frozenfire)\
**Post date:** [October 8, 2017, 6:21am UTC](https://forums.unrealengine.com/t/how-to-add-a-foliage-on-procedural-mesh/405836/4 "2017-10-08T06:21:41Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Olathuss](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Olathuss](https://forums.unrealengine.com/u/Olathuss)\
**Post date:** [May 15, 2018, 11:47pm UTC](https://forums.unrealengine.com/t/how-to-add-a-foliage-on-procedural-mesh/405836/5 "2018-05-15T23:47:54Z")

</div>

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.

> **[Blueprints](https://docs.unrealengine.com/4.27/en-US/Resources/Showcases/BlueprintExamples/)**
>
> An overview of the Blueprint Examples Showcase included with UE4.

> **[Randomly Generated Foliage](https://docs.unrealengine.com/4.27/en-US/Resources/Showcases/BlueprintExamples/Foliage/)**
>
> An overview of the Foliage Blueprint.

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.

---

<div class="post-metadata">

**Author:** ![Hoxin](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Hoxin](https://forums.unrealengine.com/u/Hoxin)\
**Post date:** [April 12, 2022, 10:05am UTC](https://forums.unrealengine.com/t/how-to-add-a-foliage-on-procedural-mesh/405836/6 "2022-04-12T10:05:33Z")

</div>

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 🙂 ) 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.
