Announcement

Collapse
No announcement yet.

Performance Profiling a.k.a. Say what now?

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

    Performance Profiling a.k.a. Say what now?

    Hello there,

    I am currently busy optimizing / profiling my project. I keep falling down to about 15 fps on my workstation and that is obviously way too bad.

    I need to find the problem but since I am teaching myself, I lack the technical skills to really comprehend what is going on...

    Before I get into it: The project is fairly simply. No Dynamic anything. Lightmass with small to hugh lightmaps depending on the object size. Skylight, directional Light.

    Now, for example: I enable stat FPS and Stat Unit which helps a lot. I get the following stuff:

    13.65 fps (red)
    73.24ms (red)
    Frame: 73.87ms (red)
    Game: 5.57ms (green)
    Draw: 73.88ms (red)
    GPU: 73.88ms (red)


    I do not understand most of these values.

    Is the value Frame how many ms Unreal needs to render 1 Frame? 13.65ms x 73.24ms = almost 1000 --- The math checks out so I guess that is it.

    Then I guess that Frame is the combined time of Game/Draw/GPU?
    "Game" is functionality like blueprints and game mode / controls? This is I guess a CPU thread?
    "Draw" is loading the assets (geometry and Lightmaps)? Does this involve the power of my hard drive or is this also CPU?
    "GPU" is everything the graphics card needs to do to render the final images - i.e. interpret the lightmaps etc, basically the final render.

    First the GPU
    I have found the GPU Profiler and it gives me something very weird. When I open the profiler, the Draw instantly drops to almost nothing, like 1,6ms or something... Once I close the window it jumps back to the red value... What the...?

    In the GPU Profiler he tells me that my lightmaps take forever. I do have a couple of fairly big Lightmaps, but I need those to achieve the visual quality that I want... but the performance kicks it... can I somehow influence this? I read something about streaming cache or something - Can someone elaborate?

    Now about the Draw:
    What exactly takes so long? Can i find a list of all the objects he loads? With stat.sceneRendering I just get a number of objects he loads which confuses me a bit because he tells me he's loading in around 441 mesh draw calls and 435 static List Draw calls ... I cannot believe that I am actaully looking at that amout of objects... what else does he open? Also the stat.SceneRendering has the Counters in the bottom lines and gives me a "present time" and the Mesh and Static list draw calls beneath it... but my Stat Unit gives me another Draw ms than the present time... what's this?

    And lastly Game:
    It is no problem for me at the moment, but actually pretty much nothing happens concerning interactivity or whatever the Game thread does... so even 6ms seems a bit much when I compare screenshots to other projects I have seen... How can I check what's going on here?

    Thank you so far!
    If I have overlooked a basic FAQ or a site in the documentation please link me there... but the profiling stuff in the documentation goes fairly deep into actual coding which I would like to not do...

    Oh and my specs are:
    GeForce GTX 650
    Intel i7 @3.2 GH / 6core Multithread 12core


    Thanks alot and hope you're having a good time!

    Greetings,
    JayCox of on3studio
    Last edited by on3studio; 01-07-2016, 12:22 PM.

    #2
    This video should answer most of your questions:

    Swarm Agent and Lightmass Troubleshooting

    Comment


      #3
      Thank you! Will have a look at it now!

      I defragmented my computer last night, because I found it being 25% fragmented... Now I opened Unreal and my Draw went down from around 80ms to 2ms <3

      Is there a direct correlation or is this purely coincidental? Thanks alot!
      EDIT:// ok yeah... back to before... what the...?
      Last edited by on3studio; 01-08-2016, 05:28 AM.

      Comment


        #4
        Originally posted by on3studio View Post
        Thank you! Will have a look at it now!
        Is there a direct correlation or is this purely coincidental? Thanks alot!
        Purely coincidental, File fragmentation only affects the time required to read the file. <- And it is good practice to defrag every now and again
        Never say Never, Because Never comes too soon. - ryan20fun

        Frames Per Second is NOT a proper performance metric, You should use frame time. You can read this or this as to why.
        (Profiling) Tools: RenderDoc (UE4 Plugin), NVIDIA nSight, AMD GPU PerfStudio, CodeXL
        Good articles/Series: A trip through the Graphics Pipeline 2011

        Comment


          #5
          Originally posted by ryan20fun View Post
          Purely coincidental, File fragmentation only affects the time required to read the file. <- And it is good practice to defrag every now and again
          Unless you are running off a SSD then never Defrag :P

          Comment


            #6
            Quick question:

            in this video, he profiles in standalone mode by typing things in the console... what do I have to do to enable the Console in my standalone game? I somehow cannot access the console in standalone mode...?

            Comment


              #7
              You need to use the Development build configuration instead of Shipping build configuration when packaging.

              Comment


                #8
                Do I need to setup a console in my game to access it ? Even in development build mode I cannot access the console ... Or is there another box I need to tick?

                EDIT// ...this is annoying... I am close to creating keybindings to basic Console commands that I want to use -.-
                Attached Files
                Last edited by on3studio; 01-20-2016, 07:34 AM.

                Comment


                  #9
                  Another quick question apart from the console in "standalone" play mode... Is there a way to override all materials with one click? I want to know if my performance increases significantly with very basic materials... I have realised I am using a BaseMat I bought and instancing it about which has 210 shader instructions...

                  Or Do I have to replace each material by hand ...?

                  Comment


                    #10
                    Originally posted by on3studio View Post
                    Another quick question apart from the console in "standalone" play mode... Is there a way to override all materials with one click? I want to know if my performance increases significantly with very basic materials... I have realised I am using a BaseMat I bought and instancing it about which has 210 shader instructions...

                    Or Do I have to replace each material by hand ...?
                    Still can't access the console in a standalone game? With the tilde (~) or (`) key by the number 1? Strange. Keep in mind we're talking about a standalone game from the editor and not a packaged game. The screenshot you posted above is packaging settings for a deployed project.

                    210 instructions is a lot of instructions if you are using it for almost every pixel in the game. Go to Lit > Shader Complexity to see how serious your instruction count problem is. Darker green is meh, red is bad, large amounts of white are an extreme problem. In the standalone game, you can also access these viewmodes from the console.

                    Get your framerate counter going, and open the console (~) and type in "viewmode lightingonly" or "viewmode unlit" or "viewmode shadercomplexity" or "viewmode lightmapdensity" or others. This will essentially override your materials just like you are asking about.
                    Theia Interactive makes immersive VR experiences in collaboration with the world’s leading companies and creatives, leveraging this bleeding edge technology to pioneer the next generation of entertainment, storytelling, and customer engagement.

                    Comment


                      #11
                      Originally posted by on3studio View Post
                      Is there a way to override all materials with one click?
                      I would also like to know this, Perhaps it can be done in C++?
                      Could be possible if you can set the material via BluePrint/C++, Then a function that loops over everything could do it.
                      I think I will try this sometime this week(unless it has already been done/not possible).
                      Never say Never, Because Never comes too soon. - ryan20fun

                      Frames Per Second is NOT a proper performance metric, You should use frame time. You can read this or this as to why.
                      (Profiling) Tools: RenderDoc (UE4 Plugin), NVIDIA nSight, AMD GPU PerfStudio, CodeXL
                      Good articles/Series: A trip through the Graphics Pipeline 2011

                      Comment


                        #12
                        Originally posted by on3studio View Post
                        Another quick question apart from the console in "standalone" play mode... Is there a way to override all materials with one click? I want to know if my performance increases significantly with very basic materials... I have realised I am using a BaseMat I bought and instancing it about which has 210 shader instructions...

                        Or Do I have to replace each material by hand ...?
                        You do not have to do any of that and can instead use the SHOW commands to hide and unhide entire sets of objects, like static meshes, to see what is causing your rendering issuses. To do this all you need to do is open up the Unreal Console by pressing the back tick / tilde key ~ and then in the commandline input SHOW Staticmeshes to turn Static Meshes off and then input it again to turn them back on. You can also use the SHOW Materials command to enable / disable the rendering of Materials.

                        Comment


                          #13
                          Originally posted by Sam Deiter View Post
                          You can also use the SHOW Materials command to enable / disable the rendering of Materials.
                          This appears to do nothing for a development package of my game, But the static meshes one did.
                          What is supposed to happen when toggling materials?
                          BTW I am using 4.10.0
                          Never say Never, Because Never comes too soon. - ryan20fun

                          Frames Per Second is NOT a proper performance metric, You should use frame time. You can read this or this as to why.
                          (Profiling) Tools: RenderDoc (UE4 Plugin), NVIDIA nSight, AMD GPU PerfStudio, CodeXL
                          Good articles/Series: A trip through the Graphics Pipeline 2011

                          Comment


                            #14
                            Originally posted by ryan20fun View Post
                            This appears to do nothing for a development package of my game, But the static meshes one did.
                            What is supposed to happen when toggling materials?
                            BTW I am using 4.10.0
                            This is an editor / development only command. When you package all of the debug commands, like this one, are stripped from the game. What should happen is all the Materials in the level should go grey, however I have not tested this on a complexe sceen as if I have to do this type of testing I use something like NVIDIA Performance HUD or Intels GPU analyizer. If that does not work please let me know and I can look into something else for you.
                            Last edited by Sam Deiter; 01-20-2016, 06:00 PM.

                            Comment


                              #15
                              Alright this is all great and all... but I still cannot access the console in standalone... am I too stupid? Since I am normally using a german keyboard layout, I switched it to english and tried - didn't work. When I change the keyboard shortcut, it doesn't work...

                              I am close to building a freaking text input that connects to an Execute Console Command in the Player Blueprint... this cannot be what I need to do, for crying out loud ...

                              Please help because this is getting proper annoying -.-

                              Which button do I have to push or box to tick so I can access the console in standalone game mode (Not packaged)...
                              Thanks!

                              Comment

                              Working...
                              X