Search Unity

Running Viking Village on Android Nexus 7

Discussion in 'Global Illumination' started by ranjan_rishi, Apr 3, 2015.

  1. ranjan_rishi

    ranjan_rishi

    Joined:
    Dec 1, 2014
    Posts:
    9
    I am trying to run Viking Village on Android Nexus 7 to see if I can replicate the GI setups mentioned in http://blogs.unity3d.com/2014/09/18/global-illumination-in-unity-5/. I have forced OpenGLES 3.0 on my Android player setting. But without any change also, the sample is extremely un responsive on my Android.

    Before I start debugging, am I missing something? Is it not possible to run GI example at all even on OpenGLES 3.0?

    Thanks,
    Rishi
     
  2. SpiriTx

    SpiriTx

    Graphics QA

    Joined:
    Apr 12, 2012
    Posts:
    252
    Well, Viking Village is definitely on the resource heavy side of the projects for mobiles.
    Did you try profiling how big is the difference between it not using GI at all and realtime GI?
     
  3. ranjan_rishi

    ranjan_rishi

    Joined:
    Dec 1, 2014
    Posts:
    9
    I had profile with Ambinet light set to Baked and Realtime. Here are my observations:

    1. Realtime: Graphics.PresentAndSync takes almost 2 seconds and rendering is completely unresponsive.
    2, Bake: Graphics.PresentAndSync takes 750 ms and the scene responds but it's still takes time to respond.

    I want to run the scene on Nexus player which is connected to my TV. I am trying to run it smoothly to try Unity features on Nexus 7 which has latest and greatest GPU/CPU capability on a tablet.

    I will start more closer profiling. Please let me know if I am missing something.

    Rishi
     
  4. SpiriTx

    SpiriTx

    Graphics QA

    Joined:
    Apr 12, 2012
    Posts:
    252
    You should be mostly interested in Baking setting on your lights themselves, not for Ambient. Please check out GI manual for more details.

    Also please try disabling v-sync and select reasonable quality settings
     
  5. ranjan_rishi

    ranjan_rishi

    Joined:
    Dec 1, 2014
    Posts:
    9
    I did select Lights object group and then set all of them to Baked. v-sync was already disabled.
    With these also, Graphics.PresentAndSync takes almost 1 seconds.

    I will play with Quality settings now to see if it works.

    Thanks,
    Rishi
     
  6. BelfegnarInc

    BelfegnarInc

    Joined:
    Jun 29, 2014
    Posts:
    32
    In Viking Village scene you have about 1,5k drawcalls most of the time. And more than 2kk verts in most camera positions. It just can not be processed with realtime speed on mobile devices. No matter what type of shaders you will use in this case.
    Actually it's not.
     
  7. ranjan_rishi

    ranjan_rishi

    Joined:
    Dec 1, 2014
    Posts:
    9
    Hi,
    I made a mistake. I am doing all the testing on Nexus 9 which has 192-core NVIDIA Kepler GPU(and not on nexus 7). In GDC 2015, Nvidia claimed it's latest and greatest mobile GPU.

    I understand that Unity does not support OpenGLES 3.1 and AEP for now. But once Unity supports OpenGLES 3.1 and AEP , will it be possible to run these kind of scene on mobile devices?

    I am again coming from GDC 2015 demo where Google and Nvidia kept on claiming that with OpenGLES 3.1 and AEP, we will get close to console gaming capability on mobile devices.

    Can you suggest some changes which can help me run this on Nexus 9(with 192-core NVIDIA Kepler GPU) and Nexus Player( with PowerVR Series 6 Graphics). Both the devices support Opengles 3.1 and AEP.

    I did some more profiling and I realized that even if I force the OpenGLES to 3.0 in player setting, Unity App creates an OpenGLES 2.0 context only. I am attaching the OpenGLES trace output. It clearly shows that context being created is OpenGLES 2.0. You can also see that due to OpenGLES 2.0, glDrawElements is being used. With OpneGLES 3.0, glDrawElementsInstanced can reduce multiple calls to the GPU.

    Is there a way to compile the app to create OpenGLES 3.0 context and use new efficient APIs released in OpenGL ES 3.0?

    I also captured the FPS and resource utilization data using Tegra Graphics debugger. GPU is always 100% occupied and it's not even able to achieve 1 FPS with baked GI setting.

    I have started looking at per frame capture to see analyze if any of the OpenGLES 3.0 or 3.1 calls can improve the performance. Please let me know if you have any input.
    Thanks,
    Rishi
     

    Attached Files:

    Last edited: Apr 13, 2015
    p87 likes this.