close

Can the Finch Shift Be Used With Gear Vr UPDATED

Can the Finch Shift Be Used With Gear Vr

20160427_104517

1 of the virtually exciting parts of existence a developer is being able to build your own tool or game and then experience it for yourself for the first time. But creating a mobile game or a productivity tool pales in comparison to the excitement y'all feel when you lot really get to sideslip on a headset and enter the world you're building. That's some Jonny Quest stuff correct there! (Kudos if you get the reference.)

Just every bit science fiction as this may sound, information technology'south actually much easier than you lot recollect to starting time creating VR content and peculiarly on Android. In this mail I'll show you how to develop apps and games for one of the near popular mobile VR headsets: the Gear VR. It doesn't take all that long to get to grips with it (assuming you go the Unity road anyway…) and there are actually multiple ways you can get nearly it. So grab your headset and get ready to jack into the matrix!

Creating a mobile game or a productivity tool pales in comparison to the excitement you feel when you actually get to sideslip on a headset and enter the world you lot're building.

Setting upwards – your options

Oculus are corking to become developers involved with all their products to ensure a healthy amount of content that volition help sell the device. This should be good news for united states of america – it means in that location are plenty of tools and detailed instructions available from Oculus themselves. Most of this can be found at developer.oculus.com. The bad news? A whole lot of this information is out of date. Things are moving pretty fast at the moment and unfortunately most resources only can't go along upward. Old methods accept been depreciated and a lot of the advice is unhelpful and inaccurate.

20160504_144831

What you'll learn when exploring the official documentation is that when creating VR apps for the Gear, yous are going to need the Oculus Mobile SDK. This provides packages, samples and other resources that you can use with Android Studio or Unity in gild to start building VR apps. The problem is that you'll likely meet all way of problems getting it set up and the help available is lacking.

Fortunately, there'due south a much faster and easier way to build VR apps for the Gear which isn't withal described on the site: which is to use Unity 5without setting upwards the mobile SDK. This is possible because Unity actually at present comes with Gear VR support congenital-in. I highly recommend going this route as it will save you lot a lot of headaches and make evolution much quicker and more enjoyable.

Things still go a little fiddly though and seeing equally the official guides don't encompass this, let'south go over all the steps.

Creating a mural

The quickest way to go a feel for developing mobile VR apps is to create a terrain in Unity and and so leap into information technology. Permit's practise that and then…

If you're not familiar with how to ready and go started in Unity, become acquainted with my introduction to Unity3D for easy Android game development so bank check out the Android SDK setup documentation over at Unity3D.com. This will show y'all how to use Unity with the Android SDK to create APK files.

Then you tin brainstorm creating a 3D landscape…

First, create a new 3D project. Now select GameObject > 3DObject > Terrain and you'll see a flat mesh inserted into your scene. This is your floor! You could also cull a flat aeroplane then add a texture. If you want to, you can as well apply the same procedure to add additional elements into the scene: such as cubes. To make those cubes human action like boxes, apply the 'Add together Component' button to add a 'RigidBody' (which gives the box physics) and a 'Box Collider' (which makes sure y'all tin't just walk through it).

Unity VR

The great thing about Unity is that information technology makes everything incredibly straightforward for you lot. In order to make this random scene into a 'game' for example, you just demand to add a ready-fabricated script chosen 'FPSController'. To get access to this though, you first demand to import it.

To do this, go to assets, right click and select 'import bundle'. Now click 'Characters'. After a few seconds, yous'll see a list of avails and will be able to select 'import'. This will so import all those useful things for y'all to use in your game: including the FPSController.

Once everything is imported, you'll find the script y'all're looking for in Assets > Characters > FirstPersonCharacter > Prefabs > FPSController. Just drag and driblet this into your scene and yous're practiced to go! Note that this controller includes its ain camera, so if you accept ane in your scene already (which yous probably do past default) you can simply delete information technology. Press Play and you should now be able to movement effectually your scene with the WASD keys and mouse! Yous can leap, look effectually and otherwise do pretty much everything y'all'd look in a 1st person game.

I've glossed over how to create your 3D scene considering this isn't really a Unity tutorial – it'southward a VR tutorial. If yous're not familiar with Unity, then you lot tin find a great series of videos that will show you how to do all this in more detail here (part i beneath). Watch upwardly to Part three and y'all'll be good to go!

Porting your FPS to Gear VR

As mentioned earlier, Unity v now supports Gear VR past default which makes life much easier for us. That means that you don't need to install anything else on your PC – non fifty-fifty the Mobile SDK! Just make sure that you have the latest version of Unity installed and that information technology's set up up for Android development. But while you don't demand to mess around with the mobile SDK, what you lotpractice need to exercise is a whole bunch of other fiddly things… sad!

To showtime with, you lot're going to need to set your build settings correctly. To practise this, head to file > build settings. Here you lot will need to select 'Android' as the platform and so set 'texture compression' to 'ETC2 (GES 3.0)'. Y'all also need to drag your first scene (which you can probably find in the assets folder after y'all've saved) into 'Scenes in Build'.

VR Build Settings

All this will ensure that you're creating an app for Android that starts with the scene you lot've included. And then far so good! But at this point it's simply an Android app, not a Gear VR app. To rectify that, click the push button that says 'Histrion Settings'.

At present you'll find a bunch more than options for compiling your game. You'll need to choose a company name and a product name and you lot'll need to set your bundle proper noun following the usual conventions (com.CompanyName.AppName). Make sure to gear up the minimum API level to 19 or above and create your keystore.

Perhaps most important though is to click 'Virtual Reality Supported' under 'Other Settings'. This is the one footstep will automatically allow you to look effectually using the sensors in your telephone and the Gear VR, while besides splitting the display and applying the subtle warping effect to account for the lens baloney. Y'all may besides desire to tick 'Multithreaded Rendering' to improve performance.

VR Player Settings-16x9

And that's actually all information technology takes to make your app VR compatible! Oh and FYI, the touchpad is interpreted in only the aforementioned way every bit a mouse – so you can use mouse click to burn!

Creating an osig file

Unfortunately at that place's 1 more than ordeal yous'll accept to become through earlier you can jump in and try your app on your own device. That is: creating an .osig file (Oculus Signature File) and then calculation it to your project. This step is a security measure implemented by Oculus to ensure that it tin tightly command the types of experiences available on its device. Information technology's a somewhat controversial move every bit information technology makes developing, testing and distributing apps more hard… but it is what information technology is!

Basically, to run an app on whatsoever device, you first need to 'sign' it using the device'south ID. To do this, yous have to locate the device ID (not the series number) which you can find past plugging your device into your PC via USB and then entering 'adb devices' in a command window. You lot'll and then be shown the ID of your device. Enter this here: https://developer.oculus.com/osig/ so click 'Download File'. You'll too need to register equally an Oculus developer if you oasis't already.

osig generator

And now you need to take your osig file and put it in a new directory within your bundle. Specifically, that directory needs to be: YourApp/Assets/Plugins/Android/assets/. You may not fifty-fifty take a Plugins binder yet, so you'll need to create a whole bunch of empty folders within one some other.

Note that this means you lot'll need to create a new APK with a new osig file every fourth dimension you want to test your app on a different device until you've been accepted onto the Oculus Store. That ways you tin't just upload it to Reddit to get some feedback.

Interestingly though, in that location is an app that has been designed to get around this called Sideload VR. This creates custom APKs based on your device's ID and lets yous download some unique stuff not constitute in the official store: including a VR version of Quake! You can also utilize Sideload VR every bit a quicker style to catch your phone's ID.

Recall as well that you volition demand to allow installations from external sources in order to test your app. Install the APK and and then run it and it should prompt you to insert your phone into the Gear VR. If all has gone well, you're virtually to enter the globe y'all just created!

The empty, boxy world…

To recap on how we did this:

  • Set upwards Unity. Make sure it's the latest version and that you've also installed the Android SDK and Java JDK
  • Create whatever 3D environment with a photographic camera
  • Set up the platform to Android and texture compression to ETC2 (GES iii.0) in build settings
  • Click 'player settings' and tick 'virtual reality supported' and 'multithreaded rendering'
  • Create your packet name and individual keysign
  • Create an osig file unique to your device and add together information technology to: YourApp/Avails/Plugins/Android/assets/
  • Create your APK and make certain your device accepts apps from other sources
  • Run your app and insert your device into the Gear VR!

Building Gear VR apps in Android Studio

Unity is nearly likely the all-time option for xc% of people wanting to create something quickly that incorporates 3D graphics. Withal, some of you lot might want to go the Android Studio route and in that case you will need the mobile SDK which you can find here.

20160427_103608

While some aspects of this are simpler than they used to be thank you to improvements to Android Studio, a lot of the information is in one case once more out of engagement and the process ismuchmore fiddly overall. If you do decide to brave it though, the best way to get started is to endeavor out the samples. To use these, you are going to need to download and install the Android NDK. This is the 'Native Evolution Kit' which works similarly to the SDK simply allows you lot to clasp a piffling more performance out of your device and use C++ in your code. Both of these things are useful for developing VR applications.

I highly recommend sticking with the Unity method unless y'all take a very specific apply that requires otherwise.

Despite what the Oculus Documentation tells y'all though, you lot do non need to download and unzip the massive NDK goose egg file manually anymore. Instead, open up Android Studio and go to File > Project Structure > SDK Location. This is where you prepare the path for your SDK and JDK. And if you look beneath those 2, you'll see a blank field for the Android NDK location also. Beneath this is a link that says 'Install'. Only hit that and the NDK-Bundle will be automatically downloaded and installed for you.

You tin at present import ane of the projects from the Gear VR SDK and if you apply the Gradle Wrapper then everything will be set up up for you including the dependencies etc. In theory at to the lowest degree… Just select the file called 'build.gradle' and let Android do the rest.

From the official documentation

From the official documentation

If you run into errors, and then make certain that yous have the latest versions of Android Studio, the JDK and Gradle fix. You should also check the file chosen 'local.properties'. Make certain this is in the right location (wherever Android Studio says it'south looking for information technology) and that it points to the right location for your SDK and NDK.

local properties

You might also want to manually bank check the dependencies. When I attempted this lots of paths were incorrect and it took a lot of squinting at my screen until I got everything working. Remember you lot also need to add together your osig file to the project before you lot can take these samples for a spin. This time though y'all only have to identify the osig inside Project/assets/.

Basically, you'll probably have to do a lot of trouble shooting before everything runs smoothly. This gets very fiddly and back up is limited – seeing as the majority of developers aren't using this method. Googling doesn't tend to yield many useful results. Even Oculus seems to exist leaning more towards the Unity road which makes sense seeing every bit I'm struggling to think of annihilation you might desire to practice that wouldn't be easier this way. And then I highly recommend sticking with that method unless yous take a very specific use that requires otherwise.

Conclusions

Using this method, creating apps for the Gear VR is very unproblematic thanks to Unity and no thanks to the Oculus documentation/general lack of up-to-appointment data. Fortunately, the Unity method is good for pretty much any type of app you could be planning to create – so stick with that and you shouldn't have too many issues!

At the cease of the solar day, all yous're really doing is making a 3D game and then viewing information technology through your headset… just it feels like so much more than that. Existence able to step into your creations completely changes the way you experience them and opens the doors for some incredible possibilities.

You don't need to be an skillful at using Unity to brand something amazing either. In fact, most documentation recommends keeping graphics and furnishings to a minimum in order to ensure smoothen frame rates (which take priority in VR). The large breakthroughs won't likely accept annihilation to do with graphical fidelity only rather will alter the way nosotros collaborate with our hardware and software.

lands end

Don't make this, someone has already has (ustwo)

In brusque, you now have the ability to create entire virtual worlds. The question becomes: so, what are you lot going to create?

DOWNLOAD HERE

Can the Finch Shift Be Used With Gear Vr UPDATED

Posted by: warrendworter.blogspot.com

Comments