Posted by Savvas Constantinides
Toy Box is a series of articles to introduce creative executions of innovative technologies from our team. The first technology we’ll be playing with is Google Cardboard. We look at how to get a 360-degree video to work on iPhones so that users can look around in every direction and immerse themselves into an exciting Virtual Reality (VR) experience.
To get all this done you’ll need knowledge of 3D modelling, Unity and iPhone development. You’ll also need a sphere exported from your favourite 3D rendering software. We used Blender, as you can see in the image below. Make sure your sphere is centred and you have unwrapped the UV texture, otherwise you’ll get some pretty weird effects when adding the texture later on!
To build the environment we used Unity; just drag your sphere in and centre it. Add a shader and a script to assign the texture to the sphere and play the video. Centre your existing camera and make sure to turn culling off in the shader, otherwise you won’t be able to see the movie playing when the camera is in the centre of it.
You should now be able to see the video play in the Unity player. The next step is to install the Google Cardboard Unity package and replace your camera with the Google Cardboard camera. Do that and make sure you centre the camera again. Last but not least, add a bit of light. We chose to add six directional lights, one in each direction, and set the intensity to taste.
Although everything works in Unity, if you try to export the project to XCode you’ll notice the compiler complains about missing a namespace. Unfortunately, Unity doesn’t support playing MovieTextures on mobile, so the choices are to build your own plugin or use one of the available ones in the market (provided by different companies). Each plugin works in a different way, but they all try to provide one way or another to use a video as a texture.
Whichever package you end up using, the end result is equally amazing. Your users will be able to pan around in every direction and watch a video as if they’re right in the centre of everything. If you ever try to build a 360-degree video yourself, why not try to use the magnetic button to trigger an event?
If you want to discuss Google Cardboard, VR or anything else mobile, please get in touch and we can show you what can be done!
Originally published at www.himumsaiddad.com.