unity-game-enginegoogle-cardboardpanoramasstereoscopy

Unity- Photosphere Photo Viewer for Google Cardboard


I am trying to build a Photosphere-like application with Unity3D and use it along with Google cardboard.

I need to load different panoramic view photos and be able to view them stereoscopically, by using the Cardboard goggles.

I am having problem to use the pano images and render it into stereoscopic view in Unity.

Any suggestions will be gratefully received.


Solution

  • Simplest solution that I can give to you:

    A. Install your Unity Pro with Android Pro plugins, setup Cardboard SDK For Unity, install Android Build tools and SDK.

    B Setup Skybox

    1. Get a stereoscopic panorama image (Might take a while to load the image as it is a high resolution image).

    2. In Unity, import the image, change the Texture Type to Cubemap. Select the Mapping as Cylindrical (Lat and Long).

    3. Create a Material, change the Shader to Skybox/Cubemap.

    4. Assign the texture to the material.

    5. In Unity 5 Pro topbar, select Window -> Ligthing, drag the material to the Skybox property. In this step you can do it programmatically. Combine these steps with the Cardboard assets and game objects. Voila, you've made a VR panorama stereoscopic Cardboard app! The whole setup is just take out your five minutes(excluding setup your tools :D).

    If you're familiar with Unity, you know exactly what to do on my instructions. If you stuck at somewhere in my steps, feel free to ask me. Happy coding :)

    Extra tips: You can make the large textures files into Asset Bundles, act like a dynamic content which is stored in the server. Your app is just simply a small-size empty app. When app launches, request and download the asset bundles from server then manipulate the textures. :)

    Super extra tip: Don't forget to generate asset bundles under Android Build Settings. If not, your textures will be corrupted when the bundle is downloaded to Android phones.