EDITIONS
Resources

Virtual reality 101 – Building for VR

Ashwin Jaishanker
22nd Jun 2016
1+ Shares
  • Share Icon
  • Facebook Icon
  • Twitter Icon
  • LinkedIn Icon
  • Reddit Icon
  • WhatsApp Icon
Share on

This is the final part of the virtual reality 101 series. The virtual reality (VR) industry has made tremendous strides in the past couple of years. Judging by the rate at which the VR industry is currently growing, and the sheer excitement a good VR experience generates in the user, I am willing to bet that there will be many more like me who wish to find out more about VR in the immediate future. The sole purpose of this series of articles is to offer a starting point to these people. The approach adopted is to address these basic questions:

virtual-reality-application
  1. What exactly is VR? How is it different from augmented reality? What is this new “Mixed Reality” term that’s popped up all of a sudden?
  2. Why are there so many headsets out there? Why would I buy the Samsung Gear VR headset for Rs 8,000 when I could buy the Google Cardboard for just Rs 400?
  3. How do I build/develop for VR?
  4. Why aren’t there any famous Indian firms in this space yet?

Questions 1,2, and 3 were answered in Parts 1 and Parts 2. If you haven’t read them, I strongly suggest you do that first. You can find Part 1 here, and Part 2 here. Now let’s address the final 2 questions:

How do I build/develop for virtual reality?

So, you have an idea, and you’ve even drawn up wireframes for your VR application. Now, how do you actually build this virtual world? What technology stack do you use? Where do you begin?

Well, the VR developer’s best friend is a game engine, so your first step would be to download one. The most popular ones are Unity (C#), Unreal Engine (C++) and CryEngine (C++). They can all be downloaded for free. Unlike in mobile development, where developers use Java with Android Studio (or Eclipse) to develop for Android, Swift with X-code to build for iOS, and C# with Visual Studio to build for Windows Phone, VR development is slightly more organised. All the game engines mentioned are capable of publishing apps to most VR platforms ‑ from the Google Cardboard to the Gear VR to the HTC Vive and Oculus Rift.

Take your time when choosing a game engine to work with. If you’ve never worked with a game engine before, I suggest you begin with Unity. Unity has terrific documentation and many quality online tutorials. It uses C# for scripting, which is more abstracted than the C++ code you would need to write with Unreal Engine or CryEngine. Having said that, Unreal Engine does have a visual scripting module called Blueprints, which helps you build entire VR experiences without writing a single line of C++ code.

Popular community opinion states that Unreal Engine and CryEngine offer more realistic visuals, but Unity has made significant progress in their graphics quality and rendering recently. If you're choosing a game engine based on these metrics, do go through the links mentioned there, before making your decision.

In terms of pricing, while all three engines are free for download, they do come with certain restrictions. Unity has a professional edition available for $75 (~Rs 5,000) per month, while Unreal Engine charges a five percent royalty, on any experiences or applications you create. I advise you take a good look at the pricing schemes of all three game engines before you pick one.

So, let’s assume you’ve downloaded a game engine and figured out how to use it. What’s next? Let’s break it down:

a) Design your environment: Create the 3D models that define the world around your user. Unity offers extremely rudimentary 3D modelling, while Unreal Engine allows you to do a fair amount of 3D modelling. Most game engines have an associated store where you can download 3D models and other assets. For anything slightly sophisticated, you will need to use a 3D modelling software like Autodesk’s 3DS Max.

Building-for-VR

Figure 10: 3D modelling using AutoDesk's 3DS Max

b) Assemble your environment and establish rules for your world: Once you’re done creating the models to make your environment, import them into your game engine. Put together the 3D models you created, and decide which ones the user can interact with and how. Decide if the rules of physics apply to your world – elements like collisions, gravity, lighting, etc. This is where the true power of the game engine comes to the fore. Complex features like physics turn into checkboxes that you can pick and choose.

c) Publish your app: Once the app is ready, you can publish it to the Oculus app store if you’re targeting the Gear VR or Oculus Rift. Publish it to Steam VR for users of the HTC Vive. Publish on the Play Store for the Google Cardboard, and quite soon probably for Daydream as well. Once again, the game engine handles the bulk of the work here, building your desktop executable or mobile app, as the case may be.

When compared to building a mobile or a web app, it is certainly harder to build a VR app. With the former two, the user is restricted to a two-dimensional screen. The user’s input is limited to swipes and touches, keyboard input, and mouse clicks. With VR, the user is exposed to an entirely new world and seeks and can interact with his/her surroundings in a number of ways. The user could throw elements away, break them, stretch them or walk through walls. It’s extremely important to keep this in mind when designing for VR.

This answer only scratches the surface of VR development. There is a lot more to cover, right from choosing the right game engine and platform to incorporating practices that ensure your users enjoy a terrific experience. If you are genuinely interested in developing for VR, then take a look at this playlist. I have compiled together some talks that cover VR development in details. It includes experiences by developers who have built some of the most popular games for the HTC Vive. The technical talks by the folks at Daydream from this year’s Google I/O are also listed in the playlist. They are a must-watch for a wannabe VR developer, describing the design process and UI guidelines to follow when creating a VR experience. There are a few other talks from past Oculus Connect and Valve events as well.

The VR ecosystem is relatively nascent, but is still miles ahead of where the mobile application development ecosystem was in 2007. The game engine forums are quite active and the community is very supportive. It is still early days in the industry, and design and development standards are still being defined. A slightly impressive application gets noticed easily. There is a real opportunity to create that platform defining app.

TL;DR:Pick up the basics of programming and 3D modelling. Buy a VR device. Download a game engine like Unity or Unreal Engine. Watch videos, build stuff, and learn.

Are there any famous Indian firms in this space yet?

Major Indian firms have flirted with VR for a while now. The earliest high profile Indian VR initiative I can remember is the Commonfloor Retina. Commonfloor took 360 degree photos and videos of listed houses and flats and showed it to customers using a Google cardboard ‑ helping them understand what the house looked like before they had ever set foot in it.

Recently, Tata adopted VR in the marketing of its new vehicle ‑ the Tiago. The Google Cardboard headsets were delivered to our doorsteps with the morning paper. All you needed to do was download the app from the Play Store and watch the Tiago zip by.

Heres a list of articles with the Virtual Reality tag on YourStory ‑ there are very few startups mentioned there. Maybe it’s due to the lack of availability of the Vive and Rift or the nascent nature of the industry. The fact remains that the Indian startup ecosystem is yet to embrace VR with any real enthusiasm.


So, you now have a basic introduction to VR. There was a focussed effort to ensure this article doesn’t get too technical.If VR excites you and you wish to build for it, I urge you to research further. Start by clicking on the links mentioned above and watching the videos on this playlist – it is a veritable goldmine of information.

If, during the course of your research, you find any other points, links or videos that deserve to be mentioned here, then send me a tweet at @AshwinJaishankr or mail me at ashwin@autovrse.in, and I’ll be sure to respond.

(Disclaimer: The views and opinions expressed in this article are those of the author and do not necessarily reflect the views of YourStory.)

1+ Shares
  • Share Icon
  • Facebook Icon
  • Twitter Icon
  • LinkedIn Icon
  • Reddit Icon
  • WhatsApp Icon
Share on
Report an issue
Authors

Related Tags