Announcement

Collapse
No announcement yet.

1016064 trees

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

    1016064 trees

    Wanted to see if I could spawn more than a million trees. Assets are from the Kite demo package.




    Some screenshots once down on the ground. I could probably roam for hours.

    Click image for larger version

Name:	wBl6XDm.jpg
Views:	1
Size:	576.8 KB
ID:	1147525

    Click image for larger version

Name:	OKj4FSN.jpg
Views:	1
Size:	495.9 KB
ID:	1147526

    #2
    They had an overall of +15 million foliage instanced in that demo map. (With optimization, not loading all at once).
    Artstation
    Join the support channel
    Gumroad Store

    Comment


      #3
      How many fps do you get + what are you specs?

      Comment


        #4
        Originally posted by Maximum-Dev View Post
        They had an overall of +15 million foliage instanced in that demo map. (With optimization, not loading all at once).
        Dynamic loading is the key
        I have only about 40000 foliage instances in this test. Plus the 1.000.000 trees of course.

        I found that collision is the most expensive part about this. Dynamically having collision only on the nearby/needed trees increases the performance drastically.

        Comment


          #5
          Have you employed culling at all? Looks like it runs well enough from the short video. Pretty cool!

          Comment


            #6
            Originally posted by fighter5347 View Post
            How many fps do you get + what are you specs?
            780 GTX and I7-4790K @ 4.6GHZ.
            50 fps while falling. 23 fps on the ground at 1080p. But if decrease the amount so they don't stand so close I get much better results. It was just the spread I needed for 1 million trees in a single landscape.


            Here is a slightly less packed test (but still way too much to fit other stuff in between)

            Click image for larger version

Name:	jlmnR0e.jpg
Views:	1
Size:	405.7 KB
ID:	1071955
            Last edited by hallatore; 04-04-2015, 07:05 PM.

            Comment


              #7
              Originally posted by Havoc View Post
              Have you employed culling at all? Looks like it runs well enough from the short video. Pretty cool!
              No culling. Just the default lod that the assets come with.

              Comment


                #8
                Originally posted by hallatore View Post
                Wanted to see if I could spawn more than a million trees. Assets are from the Kite demo package.


                NO, no Stop, you can't do that!

                You're making my brain melt. so envious, sheesh I need to get off this forum and read some more documentation.
                Bioelectrical Inference Endjinn

                Comment


                  #9
                  Originally posted by hallatore View Post
                  780 GTX and I7-4790K @ 4.6GHZ.
                  50 fps while falling. 23 fps on the ground at 1080p. But if decrease the amount so they don't stand so close I get much better results. It was just the spread I needed for 1 million trees in a single landscape.
                  Just tested my trees on my PC (gtx 660 ti, intel i5-3570 3.4GHz) and I also get a pretty good performance -> with 2 million trees I get around 40 fps.....that's insane

                  Comment


                    #10
                    Could you please share how you are spawning those trees? I'm trying to procedurally do something with trees and I can't even get 30,000 trees to render without killing my frame rate. I'd love to see how you are getting so many on screen at once. Cheers,

                    J^2

                    Comment


                      #11
                      I added some more trees and ended up with 2178900 this time.

                      Once on the ground the performance issue is mostly when a tree casts shadow on another tree, this affects the performance quite a bit. So if you want great performance, don't let tree's shadow other trees.


                      Comment


                        #12
                        Originally posted by J. J. Franzen View Post
                        Could you please share how you are spawning those trees? I'm trying to procedurally do something with trees and I can't even get 30,000 trees to render without killing my frame rate. I'd love to see how you are getting so many on screen at once. Cheers,

                        J^2
                        I've been using the week to learn unreal and some c++. So I made a forest generator and a foliage tool. https://forums.unrealengine.com/show...esh-generation
                        In this demo I use the foliage code to spawn the trees and have turned off collisions for them. I'm thinking about combining some of logic in both tools to create a forest generator that takes a set amount of trees (lets say 1 million) and reuses it in such a way that you can never run out of trees.

                        PS: The trees in the kite asset pack have a 2d-sprite as their lowest lod. I can see your having problems if you use trees that are still pretty detailed at their smallest lod.

                        BTW: In the video below the foliage is about 20000 instances, but as you can see I can run around forever

                        Last edited by hallatore; 04-05-2015, 04:03 AM.

                        Comment


                          #13
                          Hmm. The beginning of your first video, where you start way up high and move down, how many trees would you say where in view at the beginning? And where they all using the lowest LOD/billboard tree? I'm looking at a more Civ V type scenario, less Far Cry, so I need to get a bunch of trees pretty closely packed that still look like trees when viewed from 1 kilometer above them. I haven't been able to use the foliage system since it really isn't compatible with a procedurally generated level. I'll take a look at that tree model and see what's different from the one I'm using. Maybe they have some secret sauce in there. Cheers,

                          J^2

                          Comment


                            #14
                            Originally posted by J. J. Franzen View Post
                            Hmm. The beginning of your first video, where you start way up high and move down, how many trees would you say where in view at the beginning? And where they all using the lowest LOD/billboard tree? I'm looking at a more Civ V type scenario, less Far Cry, so I need to get a bunch of trees pretty closely packed that still look like trees when viewed from 1 kilometer above them. I haven't been able to use the foliage system since it really isn't compatible with a procedurally generated level. I'll take a look at that tree model and see what's different from the one I'm using. Maybe they have some secret sauce in there. Cheers,

                            J^2
                            I'm guessing I can see between 200.000 - 400.000 trees at the beginning.

                            If you want to be able to zoom far out and still see trees, but at the same time zoom way in: You have to do some magic, you can't have 1 million meshes with a lot of polys each. You need a good lod so that the tree is mostly just a 2d-sprite at the very distance, hd close up and some levels of lod in between.


                            Btw: How do you spawn your trees? C++ or blueprint?
                            I take a static mesh and create a HierarchicalInstancedStaticMeshComponent out of it. Then I add instances to that.

                            Here is some example/psudo code:
                            UHierarchicalInstancedStaticMeshComponent* HierarchicalInstancedStaticMeshComponent = CreateDefaultSubobject<UHierarchicalInstancedStaticMeshComponent>(TEXT("MeshComponent"));
                            HierarchicalInstancedStaticMeshComponent->SetStaticMesh(StaticMesh);
                            HierarchicalInstancedStaticMeshComponent->SetCollisionEnabled(ECollisionEnabled::NoCollision);

                            // For each tree
                            FTransform transform = FTransform(...);
                            HierarchicalInstancedStaticMeshComponent->AddInstance(transform);

                            Comment


                              #15
                              I looked at your other post and was wondering, you are implementing the bp node in C++, but are you building off the existing foliage system, or making your own? And are you extending the instanced static mesh class or the hierarchical instanced static mesh node? I'm asking since I'm working with Zeustiak on his random map generator and we've kind of gotten stuck in the trees. They are killing our frame rate. We are using the HISM node to make our forests, but the impact on frame rate is not what we had hoped. Are we just going too far by trying to use individual trees to build the forest? Do I need to make a more simplified universal "forest" mesh? Any advice would be appreciated. Cheers,

                              J^2

                              https://forums.unrealengine.com/show...lease-Critique!

                              https://forums.unrealengine.com/show...ee-kill-my-fps

                              Comment

                              Working...
                              X