The THETA V streams a 4K equirectangular video over USB. It appears to Unity as a normal webcam called RICOH THETA V. The video is already stitched. You just need to attach a WebCamTexture to a 3D sphere and you’ll have a simple VR application.
To get started with live streaming an equirectangular video from the THETA V, first create a new project in Unity.
Add A Sphere
Scale the sphere to a reasonable size such as 8 8 8.
You’ll have a simple scene like this. It just has a sphere in it.
Add Script
In the Inspector panel, Add Component → New Script → C Sharp.
Call the script testScriptBasic.
In MonoDevelop-Unity, paste this script in.
using UnityEngine;
using System.Collections;
public class testScriptBasic : MonoBehaviour {
void Start () {
WebCamDevice[] devices = WebCamTexture.devices;
Debug.Log("Number of web cams connected: " + devices.Length);
Renderer rend = this.GetComponentInChildren<Renderer>();
WebCamTexture mycam = new WebCamTexture();
string camName = devices[0].name;
Debug.Log("The webcam name is " + camName);
mycam.deviceName = camName;
rend.material.mainTexture = mycam;
mycam.Play();
}
}
Identify RICOH THETA V webcam
Press Play.
Verify that you are getting the webcam name as RICOH THETA V. If you are getting another cam name, adjust the devices[0]
line to devices[1]
. If that doesn’t work, try devices[2]
. You can also just loop through the array and print out all the devices to find the correct webcam.
Change Y Rotation
Press your mouse over the Y in the Transform → Rotation for the Sphere. Move your mouse left or right. The THETA V view will rotate.
Change Camera View to Inside of Sphere
You can add different assets inside of your VR world. This tutorial shows you how to add a house plant to your VR world and navigate around the world.
Showing inside of sphere view on Mac OS X
Sphere made in blender with flip normals. (Download)