Ten Technical Tips & Tricks for Creating a Killer Gear VR App

Ten Technical Tips & Tricks for Creating a Killer Gear VR App

Samsung Developer Connection

With just two days left to submit an entry to our Killer Gear VR App contest, here’s some tips and tricks to consider when developing your APK. Even if you’re not entering an app/demo in this particular contest, we highly recommend them when creating apps for Samsung Gear VR:

    1. Moving your head side to side in a VR experience is more comfortable than moving it up and down. So seriously consider minimizing up-down movements in your app!

 

    1. Make sure there aren’t any “jaggies” in your graphics. In other words, use your development platforms’ anti-alias setting. When using Unity with real time assets, for example, select Edit>Project settings>Quality>Anti Aliasing> 2x Mulit Sampling. (Just don’t set this any higher or you may have performance problems.)

 

    1. Prebake your lighting into your images to better optimize graphics performance. In many 3D packages, you can render or bake out textures with an option such as “Render to Texture”.

 

    1. Batch your draw calls and minimize draw calls. When using 3D geometry, combine any assets into one model instead of several. Best case practice is experience—this will limit your draw calls. You will also want to atlas as many textures into combined texture sheets. Texture space is your friend on mobile devices: 2048×2048 can hold a good amount of textures. If working with real-time graphics, you will want to combine models and textures as much as possible to limit draw calls.

 

    1. Don’t use post-processing effects like reflection, refraction, lighting, or shadows — these are dynamic effects that require the GPU to make a second pass on the entire screen. (With dynamic shadows, shadows must be calculated and then rendered.) This is too expensive to maintain good framerate on GearVR with the current generation of hardware.

 

    1. Mipmapping helps reduce the fidelity of textures when not needed, and increases it when needed (for example, when zoomed in on an object ). Allowing Unity to mipmap your textures will keep them from looking overly aliased, and save performance by switching to smaller versions of an image at different distances.

 

    1. Keep long running tasks off the UI thread & pre-load animation or assets upfront before launching.
      For instance, downloading or uploading images from a server should not be on the UI thread. For a similar reason, pre-loading is important, because uploading animated .fbx files or other files may give you a small performance hit in run-time.
    2. Use Unity’s fragment shader and vertex shader performance graph to locate your bottleneck and adjust your shaders accordingly

 

    1. Make sure your shaders are set up to only draw to the pixels on the screen once — or as few passes as possible. We recommend not using more the two texture passes. (When developing in Unity, use mobile-only shaders.)

 

  1. Use transparency sparingly. In Unity, you can get away with more polygons and modeling out an asset that you may want to be transparent. More GEO is better than Transparency.

Go to our developer site for more tips and tricks. And don’t forget to submit your entry here!