Download

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.

ddf7ccea63d95392fb8874e28932aa2a978d9ff8.jpeg

Source code: https://gist.github.com/hallatore/f30cab601c416acb70a2

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?

J^2

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!