Announcement

Collapse
No announcement yet.

Procedural foliage generator

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    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.



    Click image for larger version

Name:	YOvnPWB.jpg
Views:	2
Size:	292.3 KB
ID:	1147943

    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.
    Attached Files

    #2
    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

    Comment


      #3
      Originally posted by J. J. Franzen View Post
      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 :\

      Comment


        #4
        I really like the addition of making the player the center of the generated foliage. You'll never escape the treeline! Great work!
        Andrew Hurley
        Engine Support Technician

        Wiki Tutorials Page

        Comment


          #5
          Very Good!

          Comment

          Working...
          X