In today’s economic world, the virtual reality is poised with new forms of storytelling and emotionally powerful experiences. Yet making, the virtual reality services are intimidating as it is expensive and requires special hardware and skills (both). Unless you have been living under a rock, you must be fascinated by virtual reality. After a lot of investigation, turns out it is actually not that hard to create a VR app, even if you do not have any experience or have any 3D or coding idea. It is quite easier to make your own virtual reality without having zero experience in the same field. That’s quite amazing..!!
Tools That You Need
Below are some of the tools that you will require to make your own virtual reality app as:
- A VR headset (you can use any headset of VR, I probably prefer Google Cardboard)
- Unity (You must download and install its free version)
- Android SDK (Download this from SDK tools only)
- Cardboard Unity SDK (download this from Github repo)
- An auto-walk script which is made by Jupp Otto (You can download this also from Github repo)
The app we will be making is a simple virtual environment tour. You can toggle auto walk by using the triggers in your VR headset.
Now, all set to create a VR app of your own. Let’s get started with the simple and basic steps which you need to follow during creating a VR app development by your own as:
Step1- Create virtual Environment
- In this, you have to open Unity. Then start creating a project in the pop-up window. There is no need to modify any setting at this point.
- For example: I will be using this Forest Environment free asset which is created by Patryk Zatylny, but you can use whatever asset you like by your choice. Now, open the URL, click “Open in Unity”.the In asset store panel, unity will load it. Now, all you have to do is to click on “Download” button (in this unity does not allow downloading the asset directly from the web page).
- After this, the downloading will finish, now you will see a pop-up. Click on the “Import” button.
- Navigate to your project panel (if you do not find the project panel, then follow the steps as go to the top menu bar, then windows, then layouts and then default). Now, double-click the demo scene free file in the file structure for this use the slider in the lower right to later the thumbnail size). Now, the beautiful scene can be viewed in the panel.
Step 2- Setup Cardboard Unity SDK
- In the hierarchy panel, you have to delete the first person controller and main camera.
- Now, unzip the cardboard SDK that you have downloaded from Github repo you get a cardboard unity master folder. In the top menu bar, go to Asset>import package> custom package> and now select cardboardSDKforUnity in the Cardboard-unity-master folder. In the next popup, click “Import”.
- Now, in the project panel, you will see a cardboard folder. Now, go to the prefabs subfolder, drag a cardboardMain and drop it in the scene.
- Test it out by clicking on the play button. You can use your mouse or trackpad and alt or control keys for simulating the camera pan or tilt. When you are not in the play mode, then you can modify the beginning position of CardboardMain by using the transform section in the toolbar in the inspector panel all the way on the right or use the transforms tools in the upper left of the toolbar.
Step 3- Add an auto-walk function
- Unzip the auto-walk script, which you have downloaded from the Github repo, you get a Google Cardboard master folder. Drag the auto-walk.cs file and drop it in the assets folder in the project panel.
- Click to select the CardboardMain in the hierarchy panel, click on “Add component” in the inspector panel all the way to the right, and find out where the auto-walk is and choose it.
- Now, you will see a new Auto-walk in the inspector panel. Check walk when triggered and set the speed to 1 or whatever speed you may like you can select that. In play mode, you can use the mouse click or trackpad tap to simulate the trigger to look auto-walk in action.
Step 4-Package the app
- Go to the top menu bar, File>build settings. Choose android and click on the player settings. Enter the name of the company and a bundle identifier. In resolution and presentation section, change the default orientation to landscape left.
- Now, scroll down to publishing setting. If you do not have a keystore, then check to create new keystore, enter the password and then click browse keystore. In the pop-up, enter a name for your keystore and click on the Save button. To browse keystore, now you should see the file path of your keystore next
- In the key section below, in the Alias dropdown, choose to create a new key. Enter your information in the pop-up and then click on create the key.
- Optionally, you can add app icon in the icon section and then click build in the build setting window. During this entire process, you might get asked to choose the root android SDK folder. Unzip the Android SDK file which you have downloaded and selected that folder. You might also get asked to update SDK. Just confirm to update. After the build is completed, you can now install the app on your android phone, test it out with your VR headset or even upload it to Google Play store. It might have something to do with SDK version and android version.
- And, finally, you are done with your own VR app. Hope that wasn’t too hard for you, was it?
The following above steps will surely have cleared all your troubles and were quite simple to perform while you want to make your own virtual reality app. The lower your expectations are, the result will be under promised and over delivered to the clients.