Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Can't get a non demanding scene run more than 30 fps on android!

Discussion in 'Editor & General Support' started by Eliotz, Jul 16, 2016.

  1. Eliotz

    Eliotz

    Joined:
    Jul 18, 2015
    Posts:
    81
    First of all I wanna say that this probably doesn't affect high end devices since it's pretty much impossible to get an empty scene to even dip below 60 fps (except if you were really going for it). But apparently I'm having a problem with performance on Galaxy Note 2 which will act as "Low End" device for my current project.

    And as you can probably see in the title I have trouble getting a scene where is nothing going on and some couple static geometry visible run more than 30 fps when a scene like that should run way more 30 fps on a device like that.

    What I tried:
    Of course I didn't come here as a blank page, in fact I tried a bunch of optimization techniques and pretty much everything I know about optimization. Still no luck.
    OK here is what is going on in my project:

    1. Realtime GI is turned off.
    2. Vsync is turned off.
    3. Shadows are turned off (in Quality settings, Lights and even mesh renderers)
    4. Realtime reflection probes are turned off
    5. Anti Aliasing is turned off.
    6. No Image effects, HDR
    7. 1 Realtime Directonal Light
    8. Texures 512 to 1024 resolutions (all compressed)
    9. All meshes on high mesh compression (Also read/write disabled)
    10. No fog
    11. Scene consists of around 6 to 7k polys (all models static and even if delete 90% of the models from the scene I get 4 fps boost ).
    12. All models using standard shader(using a different shader will give me 1-2 fps boost or nothing).
    13. No scripts running (except framerate counter of course :D).

    AND most importantly: 10 - 15 draw calls/batches ...... -->10-15<-- BATCHES!? what??
    Also on my (i5 / GTX 960) PC it literary runs at 2500 fps (of course I'm comparing that to a PC but if it runs at 2500 fps on PC, the phone gotta be able to run it a little better than 30... it's not Nokia 3310 damn it)

    So yeah I have feeling like I have tried everything and It did nothing.

    Is there anything I could still try? PLEASE let me know.

    Note that after I did these optimisations I got like 5 fps boost if anything at all.

    I mesured the framerate with this asset:
    https://www.assetstore.unity3d.com/en/#!/content/10941
     
  2. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Look at what the profiler says.

    --Eric
     
  3. Wekthor

    Wekthor

    Joined:
    Apr 30, 2011
    Posts:
    162
    Make sure you are not using Terrain. Also make sure your pixel light count is 0 and light set to Not Important. Are you using Legacy shaders or new Standard shaders ? Standard shaders are not good for low end devices.

    As Eric said, look into profiler, figure out of its memory issue or something else and then dig in deeper.
     
  4. Eliotz

    Eliotz

    Joined:
    Jul 18, 2015
    Posts:
    81
    I was able to get 5 more fps with per pixel light count set to 0 and another 5 more by using a legacy bumped diffuse shader.

    The bad thing about the legacy shaders is that they are absolutely useless, because of how they look. Like I'm making a high end game and already managed to get it looking pretty good on some higher end devices, but with legacy shaders my game looks like straight outta 1995.

    I'm planning to solve this issue by writing my own custom brdf shader that is based on a lookup table.

    About the profiler....

    1. Rendering is taking up little under 50%
    2. Overhead taking up around 25% (whatever that is)
    3. Update function taking up 8%
    4. And the rest is just some unity stuff, each is taking around 0.5% - 1% (probably not worth my time)

    Sometimes the profiler spits out this - Gfx.WaitForPresent which appears as big spike in my profiler every now and then and takes up 68% and because it's such a big spike that it makes my rendering tab look small, which is rocking 10% on that frame.

    What also happens every once in a while is Physics.Processing tab shows up taking up whopping 80%.

    So far weren't able to get more than 40 fps.
     
  5. OmarVector

    OmarVector

    Joined:
    Apr 18, 2018
    Posts:
    117
    I've the same problem, I did the same scene setup inside unreal engine and it hit 60fps so smooth, back to unity it never let me go over 30fps , on lowest of lowest of setting.

    Seriously, dont know what I suppose to do
     
  6. dmennenoh

    dmennenoh

    Joined:
    Jul 1, 2015
    Posts:
    379
  7. OmarVector

    OmarVector

    Joined:
    Apr 18, 2018
    Posts:
    117
    pettsok3 and Ajasmm02 like this.