Mobile VR: Leaving No Phone Behind

Impact Unified’s Simon Hultgren explains how they were means to strike a solid 60FPS on hardware such as a Note 4 for a recover of A Most Curious Murder, out this week for Gear VR.

 

One doubt you’ll face when building for a still rising marketplace is either we should spend your changed time creation certain we strike a compulsory 60 frames per seconds consistently on all accessible devices. Is it some-more critical to not skip out on any intensity actor out there, or take a discerning highway to recover and extent your diversion to high finish phones and restraint out a apportionment of a already tiny VR user bottom as a result?

Having combined something singular – during slightest we like to consider so – we motionless to leave no phone and no intensity gamer behind. Strapping on a coding gloves and grouping a pallet of dodgy appetite drinks, we set out to make a diversion run uniformly on each Oculus Gear concordant phone, all a approach behind to a ancient Note 4.

 

Take Note

Oculus requires diversion play of a well-spoken 60 frames per second and meaningful a restrictions of mobiles, we had already singular ourselves to one energetic light; a so critical flashlight that we lift as we mangle into a military hire in hopes of anticipating justification that will giveaway we of a murder trial. All other lights were baked and orderly finished into light maps to make a mobiles happy.

We had also done certain all a 3D models are low poly and that a levels are not too swarming while still gripping adequate props and sum to make them picturesque for a experience. It is a military hire after all, so pattern some donuts and dull coffee cups in this murder poser game.

Loading adult a diversion on a aged Galaxy Note for a initial time, we were delicately optimistic, all until we reached a some-more heated locations of a levels and saw a support rates plunge to around 30 frames per second. With that low support rate, we knew we that we missed a 16.7 microsecond deadline for a GPU to finish a subsequent support many of a time.

 

Meshes, Textures And Shaders

We now incited to a built-in stats guard in a Unity editor that tells we a series of polygons and series of pull calls indispensable to describe a stream perspective in your stage among other things. After replaying a heated locations in a editor, we could see that we had a problem with a series of pull calls, that was removing tighten to 200 in a misfortune cases.

Draw calls are radically preparations that a CPU needs to do to bucket a GPU with one or some-more meshes, one element and a shader for rendering. Having too many pull calls increases a risk that a GPU will not describe a whole perspective in time for a subsequent support to be shown on screen. The pivotal here is that a GPU can be installed with mixed meshes during a same time, as prolonged as they share a same hardness and shader settings.

Since we wanted to keep a particular materials on a objects in a scene, we motionless to emanate a hardness atlas, that is fundamentally a vast hardness containing a strange textures tiled. Each indication will afterwards accept an equivalent into a atlas where a hardness is stored.

Apart from formulating a hardness atlas, we also reworked a turn pattern to equivocate throttle points with too many models in perspective during a same time. For example, fluctuating brief corridors going out during an angle from a incomparable bedrooms to entirely implement a occlusion culling when relocating in and out of rooms.

By default, a Unity engine won’t describe objects that are located outward a camera’s margin of view, though it will describe objects that are in front of a camera though still entirely vaporous by another object. Occlusion culling is a approach to order a stage into smaller cells, symbol those objects that are non-moveable and so will censor or be dark by other objects. And finally, bake an occlusion dataset that is used by a engine while digest a stream view. This is a really critical apparatus for gripping your pull calls and series of polygons down.

After formulating hardness atlases and compliance a turn to urge occlusion culling, we managed to get a normal series of pull calls to around 50 and never surpassing 100, even in a many heated views, even with a energetic flashlight enabled. With this, we were means to strech 60 frames per second even on a common aged Note 4. 

More zoo ...

Posted in
Tagged . Bookmark the permalink.
short link zookitchen.com/?p=14815.