View OpenSim builds with Google Cardboard

As anyone with experience in OpenSim knows perhaps the biggest barrier to having the general public view your work is the requirement to download a viewer and the complexity of using it once you have it downloaded.

Google Cardboard is a device that turns smartphones into stereoscopic, 3D viewers. Using the accelerometer and gyroscope built into the phone, the app also responds to head movements in 360 degrees.

Google Cardboard prices start at around $5, and the kit is available from dozens of different vendors.
Google Cardboard prices start at around $5, and the kit is available from dozens of different vendors.

While building our highly detailed 12,000-plus prim scale model of Detroit’s Michigan Central Station, we decided to do a simpler multi-platform sampler version for deployment in a variety of ways as a taster to persuade people to make the effort required to experience the full build. But we still wanted to keep it in 3D.

We created a smaller build, under 500 prims and with just 20 textures, so that it could be used as a display — for example, at last fall’s OpenSimulator Community Conference – and could also be realistically ported to other platforms like Unity 3D for embedding in a website and viewing with Oculus Rift and Google Cardboard for an immersion experience.

Above are two stereoscopic images of 3dcolab.com's Detroit Train Station from last years OS Community Conference. With the Google Cardboard headset on, on when you look at the red ball for two seconds, you will start walking around. (Image courtesy Paul Emery.)
Above is a stereoscopic images of 3dcolab.com’s Detroit Train Station. With the Google Cardboard headset on, when you look at the red ball for two seconds, you will start walking around. (Image courtesy Paul Emery.)

What follows is an brief explanation of how to make your OpenSim prim build viewable in Google Cardboard for Android.

What you need:

Step One

Link up the prims in OpenSim into manageable size link-sets and then to export them as Collada mesh objects with textures.

The Singularity viewer does this quite will as long as you are the creator of both prims and textures.

Step Two

Create a project in the free version of Unity 3D and import your newly created Collada objects into the Unity 3D scene.

In the video below, John “Pathfinder” Lester shows how to do this.

Step Three

Add the Cardboard Plugin for Unity to your local Unity setup and build your new Unity “game.”

If you want your users to be able to move around inside the build, you will need to create some kind of movement mechanism. This is tricky, because users can’t touch their smartphones while they’re in the Google Cardboard headset, and tilting the smartphone is what controls the camera.

My solution was to put a red ball inside the scene. The user looks at the ball for a few seconds, and it triggers forward movement. Details about how I did this are in the white paper.

Step Four

Configure your Android device to allow you to build and deploy your “game” to the device.

This turned out to be the trickiest part for me – damn Windows drivers!

Then find your new “game” icon on your Android device, click on it, put your phone inside the Google Cardboard headset, and enjoy.

It feels like you're walking around inside the build.
It feels like you’re walking around inside the build.

If at any point you get stuck, a great place to get help is the Cardboard & VR Developers community on Google Plus.

Step Five

Find your local hip coffee shop and just sit there moving your head around like an idiot looking in your Google Cardboard.

Pretty soon some one will ask you whats up and you can show them. After they get finished with the “Wow did you do this?”, you can start promoting your craft and explain how they should go on line and take a look at the complete build.

This article is adapted from a longer, more technical white paper about converting OpenSim builds to Unity 3D for Google Cardboard.

Latest posts by Paul Emery (see all)