Notifications
Article
Mobile VR Performance Techniques
Published 5 months ago
39
0
These things have worked for me in getting an experience to run at expected frame-rate.

Textures

  • All non-alpha textures set to "RGB Compressed ETC 1" / 'fastest'
  • Any alpha textures set to "RGB 16"

Materials

  • mobile diffuse for almost everything
  • consolidate all materials that reference the same textures ( these add up )
  • where it's not too complicated, or for IMPORTANT objects, remap UV's to new atlased material that can serve multiple objects
  • Static / Lightmap Static most / all objects set to this unless it HAS to move in the scene
  • all lights set to either "Mixed" or baked mode
  • real time shadows ONLY for the most important moving objects, everything else is baked.
  • turn off real time GI
  • reduce number of lights (if there are a lot)

Models

  • Reduce vertices using Blender one model at a time, or Unity plugin like: Advanced Tools Mega Pack
  • Combine ALL static meshes into a single object with consolidated materials

Rendering / camera settings

  • Draw distance no further than absolutely needed (typically < 300)
  • Basic cubemap instead of newer skybox shader
  • Forward rendering (this usually isn't needed if everything else is already done)

Terrains

  • convert to OBJ format, re-import as simple model
  • reassign baked model texture with mobile diffuse
  • apply techniques in "models", especially vertex reduction
  • now terrains are practically nothing on the performance budget. !!!

If there's still problems after doing all that.....

Are there too many live objects? Might need a dynamic culling system on top of Unity's default.
Overall output "Quality" settings in Unity can be tried, but the goal is to get target frame rate at close to "Fantastic" quality, which is totally possible ****** might still want to disable antialiasing (​get jagged edges​) and anisotropic filtering (​textures perpendicular to camera with blur at closer distances ... psssh, big deal. )
FINALLY ... Start looking at script performance, and ​only​ through profiling. Find worst offenders of ​allocations​. Raw execution time (instrumentation) is extremely rarely the problem. More often, lots of constant allocations kick off the garbage collector which robs performance.
IF for same insane and unlikely reason there is a method that just "takes too long" to execute, spend zero time speeding it up, and instead take that method out of critical path, either by putting it startup or on background thread.

Michael Tsouris
Unity3D Developer, Producer - Programmer
1
Comments