Procedural foliage generator

I made an actor that places a mesh in a tiled structure around the view. It spawns a given number of instances that it then moves so that player is always in center.


Source code:

PS: I did this mostly to learn a bit of c++ and to test out UE4, so there might be some bugs in the code.

I’m curious. How dense can you make the trees? Can you do a full on forest, so dense you can’t see the sky?


Yes you can. But when trees cast shadow on other trees you get a bit less fps. So you can have 10-100 trees that overlap. But 50.000 causes lag :\

I really like the addition of making the player the center of the generated foliage. You’ll never escape the treeline! Great work!

Very Good!