Announcement

Collapse
No announcement yet.

Rendering 5000 sprites in UE4 10x slower than Unity5?

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

    #31
    what about moving them? having low cost static sprites is nice, but having them not kill performance when being moved would be even better.

    Comment


      #32
      Originally posted by divi View Post
      what about moving them? having low cost static sprites is nice, but having them not kill performance when being moved would be even better.
      Moving the entire component is basically free (e.g., all instances at the same rate for a parallax layer), but moving individual instances requires a rebuild of the vertex buffer. You will not be able to move 100k unique instances every frame at a reasonable frame rate, but if you split out dynamic and static instances and group only things that are all likely to be changing every frame together it should be comparable to leaving them as loose components. Disabling collision will also increase the speed of rebuilds since it avoids having to talk to PhysX for example.

      Cheers,
      Michael Noland

      Comment


        #33
        Originally posted by TheJamsh View Post
        Very cool!

        So you're also telling me that you also exceeded the Unity implementation with an extra 16 fps Stunning!
        To be clear, that's not what I'm saying at all. I haven't done any benchmarking against Unity (I'm not legally allowed to by their EULA), I don't know for sure that this benchmark is in any way comparable to Nate's, or if my machine is comparable to his. It's also generally unsound to use FPS for any sort of benchmark at all (time elapsed per thread is more accurate and less prone to measurement errors, unrelated things on the PC, etc...).

        Cheers,
        Michael Noland
        Last edited by Michael Noland; 05-20-2015, 01:44 PM.

        Comment


          #34
          Originally posted by Hevedy View Post
          Michael you can share the map/scene or the project ? or give an example about how is made the scene etc ?
          Yeah I'll either post pictures of the project settings and test Blueprint or a zip of the project. However, I built it in main (version # is already bumped to 4.9.0) and it's saved on a programmer build, not a promoted build, so it probably won't load directly in 4.8.0.

          Cheers,
          Michael Noland

          Comment


            #35
            I gave grouped sprite component a try, the fps went from 24 to 216 now on my PC. Thanks Michale, that's awesome job done.

            But then I tried to update the transform per frame on both Unity and Unreal test, I got:

            Unity 5: 46fps
            UE4: 2fps

            Here's the full comparison chart:

            Click image for larger version

Name:	5000sprites_vs.png
Views:	4
Size:	8.9 KB
ID:	1078652

            Also, please note that in unity's case, all sprites are individual game objects which could have different script and components setup individually; In unreal, there's one actor with one grouped sprite component which is much more difficult to assign different behavior to individual sprite.

            Another area unity done different is that in unity all the batching is happen behind the scene, user only specific a game object to "static", and it'll be batched automatically without further action.
            | twitter | github | #ue4tip

            Comment


              #36
              Originally posted by Michael Noland View Post
              Yeah I'll either post pictures of the project settings and test Blueprint or a zip of the project. However, I built it in main (version # is already bumped to 4.9.0) and it's saved on a programmer build, not a promoted build, so it probably won't load directly in 4.8.0.

              Cheers,
              Michael Noland
              Thanks you!
              I like that because is to check between the engines (Urho3D - UnrealEngine4 - Unity5) with the same scene & config more or less for compare the results and post here.
              Hevedy - Instance Tools: https://hevedy.itch.io/hevedyinstances
              Hevedy - Image Tools: https://hevedy.itch.io/imagetools

              Comment


                #37
                Bha here is 10 million
                Click image for larger version

Name:	10mil.JPG
Views:	1
Size:	94.0 KB
ID:	1081104

                Comment


                  #38
                  Hi, I am a beginner on UE4. This is what I am just want for rendering a massive(says at least 1 million) of 2D object. So can you tell me more detail of groupd sprite component? Is it UPaperGroupedSpriteComponent?

                  Comment


                    #39
                    Originally posted by Nate View Post
                    I gave grouped sprite component a try, the fps went from 24 to 216 now on my PC. Thanks Michale, that's awesome job done.

                    But then I tried to update the transform per frame on both Unity and Unreal test, I got:

                    Unity 5: 46fps
                    UE4: 2fps

                    Here's the full comparison chart:

                    [ATTACH=CONFIG]40325[/ATTACH]

                    Also, please note that in unity's case, all sprites are individual game objects which could have different script and components setup individually; In unreal, there's one actor with one grouped sprite component which is much more difficult to assign different behavior to individual sprite.

                    Another area unity done different is that in unity all the batching is happen behind the scene, user only specific a game object to "static", and it'll be batched automatically without further action.
                    Hi can you tell more detail about how to group sprite? Is it to use UPaperGourpedSpriteComponent in C++?

                    Comment


                      #40
                      Having the CPU generate 100,000 2D sprite billboards into a streaming vertex buffer every frame should be fast.
                      I think the main problem here is that Unreal doesn't optimize for animated 2D sprites using that mechanism.

                      Comment


                        #41
                        @michael could you please share your test project as a reference? Thanks!

                        Comment


                          #42
                          please forgive me for necroing this post.. but after a long while, im so happy UE4 has improved with 2d sprites, especially this paper grouped sprite..
                          i can now spawn static sprites without framedrop..

                          but can i ask?.. how can i do this with flipbooks?..

                          there is static mesh instance for 3d..
                          then there is paper grouped sprite for sprite instances for 2d..

                          how about flipbook instances?
                          if i want to display hundreds of flipbooks... how can i reduce framedrop?

                          Comment


                            #43
                            I'm not sure about it, but there are good chances that you won't be able to achieve what you want with the current paper2d. AFAIK you need to be able to have all the sprites of the flipbook into a single texture (spritesheet) so that you don't need to switch textures (that's usually the reason of the frame drop) during rendering. It's been a while since I last checked paper2d, so maybe now there's a way to import a spritesheet and slice it up into subtextures to assign to the animations of the flipbook.

                            Comment

                            Working...
                            X