Search Unity

Tegra 2 and OpenGL 2.0

Discussion in 'Android' started by Nieles, Nov 2, 2011.

  1. Nieles

    Nieles

    Joined:
    Dec 27, 2010
    Posts:
    50
    I'm now on a new project and it involves an open terrain and lightmapping.
    Both not a big problem, since android 3.4 now supports the Unity terrain.

    So I have a very beautiful result and my Samsung galaxy s2 runs it at 60 fps.
    But my Samsung tab 10.1 with a tegra 2 has a very very choppy fps, about 10 to 20.

    I build my project with OpenGL 2.0 because with 1.1 the terrain textures look like large pixels.
    With OpenGL 1.1 the tegra tab has a lot better results but the terrain is ugly and the lightmaps flicker.

    To me a duo core processor like the samsung tab 10.1 should be able to easily run it.
    I just tried out the new shooter: Shadowgun, on my tablet and it has much heavier graphics and that runs just fine.

    So my problem can be solved by to ways:
    - How to optimize my game with OpenGL 2.0 so it does run good on tegra devices?
    - How to have better terrain textures and lightmaps with OpenGl 1.1?

    (Yes I also tried it with Tegra texture compression, but that didn't do a thing)


    OpenGL 2.0:


    OpenGL 1.1:
     
  2. Themp

    Themp

    Joined:
    Nov 8, 2011
    Posts:
    96
    i use an LG Optimus x2 (android 2.3.7) which also has an tegra 2

    and when i build games for it i use openGL 2.0 and i dont seem to encounter any problems at all, could u send me the APK or something so i can try it if you dont mind.. maybe it's your tablet which fails then :S
     
  3. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    you won't get higher detail on OpenGL ES 1.1. Thats just the price of having it baked down onto a single color map, while opengl es 2.0 does realtime splatmap blending through pixel shaders.

    the furthest you can go is blending 2 textures in a single pass on OES 1.1, in that case you would likely want to invest in terrain 4 mobile.


    Hard to say why it runs otherwise slow though without knowing more about what you do ... did you potentially use fullscreen effects or anything 'heavy'?
     
  4. trevorchandler

    trevorchandler

    Joined:
    May 16, 2009
    Posts:
    121
    Hello,

    In case it helps.
    I also have the Xoom Motorola with the Dual Core procs tegra 2.

    I had the same exact issue, and all I had to do to fix it was
    - For the editor, change the following --> Edit --> Graphics Emulation --> Generic OpenGL ES2.0
    - For deploying to the device --> Project Settings --> Player --> Graphics Level --> Open GL ES 2.0

    I didn't believe this was a hardware issue so much becuase ...
    1. The iPhone ran the same scene and terrain without any issue, and it is way less powerful
    2. The editor had the same problem, and i know the Mac is far superior
    3. The Xoom seems to be very powerful, and extremely capable to me, and I own iPads, iPhones, Android Phones, And the Xoom to compare them all against each other.

    At any rate, changing the unity settings fixed my blocky resolution issues, and hopefully, it will fix your issue as well if it is the same problem,

    Thanks,
     
  5. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    1. Yes but the iOS device has optimized drivers, not the crap that motorola delivers on the xoom which kills 50% of its theoretical power.
    never extrapolate from the hardware power to the performance on a device, not when its in the android device fragmentation pool.

    2. If it chokes on Mac then there is something strange going on. But then I wouldn't exactly put it on the performance front anymore, then it sounds more like your code might not work as smooth as you think. for example physics in update or a bad physics rate or something alike. Don't forget, the tegra has no math coprocessor, the iOS side always had, so animations for example on unity older than 3.4 will run significantly worse on tegra than iOS. In the end its not possible to say anything more just from the screenshot though

    3. Compared to an iphone 4 yeah. compared to anything else its worse. The ipad2 / iphone4s easily kill it with 3x the performance and any samsung offering with 2 cores kills it too cause they didn't F*** up OS and drivers as badly as motorola.
     
  6. trevorchandler

    trevorchandler

    Joined:
    May 16, 2009
    Posts:
    121
    Dreamora,

    I appreciate your views here.
    Personally, I disagree, but informative conversation.

    My issue was clearly the OpenGL settings in unity and my tablet is working awesome now.
    Maybe others are havings different issues that match what you are saying, but my stuff is running great now.

    Thanks again,

    Awesome insights as always,
     
  7. Nieles

    Nieles

    Joined:
    Dec 27, 2010
    Posts:
    50
    I know the terrain looks better with opengl 2, thats not the problem.
    The problem is that when I run my games with opengl 2 the performance on tegra devices droppes to about 10 to 20 fps. Both the samsung galaxy tab 10.1v and the asus transformer have this issue.

    So I gues that there is something wrong with tegra and opengl 2
     
    Last edited: Nov 11, 2011
  8. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    The problem on tegra2 is unhappily two fold:

    1. The cpu is the only cpu on mobiles that is used on larger scale that has no mathematic coprocessor to back it up (NEON on iOS and others, VFP on older ARMV6 devices) at all. Totally ununderstandable ...
    2. The gpu is one of the few OpenGL ES 2.0 gpus that unhappily have no unified shader units. That means although the gpu has 4 shader units, 2 of these units can only perform vertex shader industructions, 2 of them only pixel shader instructions (while the SGX535 / 543 in iOS devices can do both on all units). Due to this you are not only limited by the fillrate, but also by the maximum pixel shader operations these 2 units can perform per second.
    Additionally the fillrate is much worse, http://www.anandtech.com/show/4216/...rmance-explored-powervr-sgx543mp2-benchmarked gives you a good idea on the 3rd graph of what I consider 'much worse', even the ipad1 easily stomps the xoom by over 34%

    Its a pretty uncool situation with it beeing there and its unfavorable that so many devices use it, yet we have to life with it and have to make our games scaleable enough to react to the fact that the fillrate is just not there. (it is fillrate wise somewhere in the range of the 3GS GPU, the SGX535, yet normally it gets used in devices with resolutions even higher than iphone4 and ipad1 which had enough fillrate bound problems already ...)
     
  9. cupsster

    cupsster

    Joined:
    Apr 14, 2009
    Posts:
    363
    i hope that issues will be solved with next tegra devices.. I also experience suffering form tegra 2 while testing.. can't understand certain decision on nVidia side.. :/
     
  10. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    it's not a decision on nvidia's side, its a decision on the device manufacterer's side to include a cheap component. It's cheap because its missing all that stuff :)
     
  11. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    the funny thing is back in LG Optimus X2 / Xoom days tegras were the by far most expensive chips although already lacking back then compared to Samsungs Hummingbird - SGX540 combo ... rumors said that they cost over $300 per chip and that with orders in the 5-6 figure range. It was one of the reasons the xoom was that totally unrealistically overpriced by $400+ (it was never worth more than at maximum $650 bucks but they sold it at $1100 and stuff like that) for being serious crap with superb engineering F***ups everywhere be it basic OS behavior or the totally messed drivers.
     
  12. Nieles

    Nieles

    Joined:
    Dec 27, 2010
    Posts:
    50
    Oke well that sucks. But then I have no other choice then to say: Sorry tegra users your not gonna play my game!
    But then again Shadowgun runs perfect on my tegra device. So I wonder what they did to make it run so smooth.
     
  13. cupsster

    cupsster

    Joined:
    Apr 14, 2009
    Posts:
    363
    S***load of old tricks.. tegra 2 sucks..
     
  14. Arkasis

    Arkasis

    Joined:
    Nov 22, 2010
    Posts:
    61
    Hi everybody !

    I have the same issue with a tegra 2 and, like Nieles, even if the tegra 2 is a bad device, I'm sure it is an optimisation problem on Unity.

    Games with more graphics detail works fine on it like Shadowgun and AngryBot (made with Unity...)

    So I would appreciate if someone in unity team could explain us how we could make our games work fine on Tegra 2 with more than 10-20 fps :-/

    Thanks.