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.

Limitations of mobile devices

Discussion in 'Android' started by darksblood, Jun 14, 2012.

  1. darksblood

    darksblood

    Joined:
    Apr 12, 2012
    Posts:
    31
    I started working on a game and I'm targeting mobile devices with this game. When i started modelling week ago, I of course understood that there are limitations, like poly count. I also know keeping your draw calls down is drastically important. I saw a post that said it's best to keep the total polygon count of the scene under 7000(odd because in unity it's all tris). In 3ds max i kept the total of all my objects well under 7000 polys, but this also left me with objects that i couldn't look nice with normal maps. As expected, they were hardly affected by the maps.

    I'd like to know, how far above that 7000 can i actually go if I'd like this game to achieve good frame rates from iPhone and android devices (post iphone 3Gs realease date)?

    I hope this question doesn't sound too newbie like. Thanks in advance.
     
  2. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Can only be answered by testing it yourself.
     
  3. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    the 'scene under 7k' recommendation only holds for pre 3GS devices with the SGX530 gpu. that has long ago gone away in that form :)

    For 3GS + and especially android (release date has no impact on android hardware and performance, even in 2011 new handsets were launched that stand no chance against 3GS) hippo is right, you need to test it yourself to see how far you can push it as it depends on a whole host of aspects
     
  4. darksblood

    darksblood

    Joined:
    Apr 12, 2012
    Posts:
    31
    Yes you two are right, I'm in the process of doing so right now.
     
  5. Tseng

    Tseng

    Joined:
    Nov 29, 2010
    Posts:
    1,217
    First, a triangle is technically a polygon too.

    Since the minimum points required to have edges/angles/corners is 3 (Tri; as in Triangle), which makes the Triangle a polygon too, just a special one (with 3 edges) or a 4 (quad/tetragon) or 5 (pentagon) or 6 (hexagon) or 7 (septagon) or 8 (octagon) etc.

    See Numeral Prefixes

    For SGX535 and higher GPUs, 30.000 tri-/polygons are recommended as upper limit for scenes (and 10.000 for SGX530). You should remember that this are the upper-limits, before geometry processing (usually CPU) becomes a bottle-neck.

    So you usually want to stay 20-30% below that, as there are other factors which costs CPU time (not GPU), like scripts and physics. If you have CPU intensive scripts or much physics, you may want to keep below that. There is no way to tell it, you will have to test it.

    The other things, which are usually a bottle neck is pixel fill rate. This can be caused by overdraws (objects drawn over other objects, transparent shaders, particles, or other special shaders). This is a GPU limitation and you can reach it easily with very few polygons
     
  6. lmbarns

    lmbarns

    Joined:
    Jul 14, 2011
    Posts:
    1,628
    Thx for that breakdown. I wonder when you use the combine mesh script it gives the option to "generate triangles", what's that do? Does it add more triangles, or reduce them?

    On my phone it's run well with a lot more than 30k tris in the total scene, as long as there aren't more than that in the view/being drawn at one time. Basically a mix of shortening the camera frustum, narrowing the perspective, and culling out different objects at different distances, with some fog. Just those tweaks reduced draw calls and everything by a lot. Lots of AI and some other things seem to cost a lot as well.

    Maybe I'm doing it wrong but it seemed to help a lot. Only real problem I've had was with villages where you have lots of buildings/npcs behind each other being overdrawn. Was looking at m2h culling to try to fix that. The rest of it I just use multiple meshes that are dropped when they're not in view and in areas where there aren't lots of buildings together I have triggers to adjust the settings to give you a more expansive view to make up for the shortened frustum when in the city.
     
  7. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    30k is definitely no limit.
    Already back in ipad days some users here have shown stunning examples with 200k+ polygons.
    The 30k makes then sense when a fair degree is actually skinned but since 3.4+ even thats less of a problem due to animation offloading in a background thread
     
  8. cupsster

    cupsster

    Joined:
    Apr 14, 2009
    Posts:
    363
    i'm pushing ~37000 @30fps+ on iPad2 on Tegra even more.. it also depends on shaders you use.. that is final slowdown factor.. use simple [mean fast] shaders and you can safely go over suggested values until you will go out of ram. I saw some demos pushing around 2M tris on iPad2 so this is mostly engine and scene dependent