This is a followup to the great @DrustZ post to get THETA UVC FullHD Blender to work in Unity. By using THETA UVC FullHD Blender as the WebCamTexture, youāll be able to render the THETA live stream as a perfect sphere with no adjustment.
Preparation
Register THETA UVC FullHD Blender in Windows.
If youāve got streaming working in equirectangular, youāve probably registered it. Refer to the THETA Live Streaming Guide if you have not used live streaming before.
Edit Windows Registry
Open regedit on Windows. You will need to open the folders for HKEY_LOCAL_MACHINE ā SOFTWARE ā Classes.
Open CLSID
Go to:
{860BB310-5D01-11d0-BD3B-00A0C911CE86}/Instance
On my computer, THETA UVC FullHD Blender is {2219F8F0-38CB-4B19-9DC1-3F1A5C324545}
Hereās a summary from this blog post that is the source of the regedit info.
The registry key is located under HKLM, SOFTWARE\Classes\CLSID{860BB310-5D01-11d0-BD3B-00A0C911CE86}\Instance (note itās SOFTWARE\Classes\Wow6432Node\CLSIDā¦ in 64-bit OS for 32-bit app space), where every subkey corresponds to a registered device (find yours there). Note that CLSID above is actually CLSID_VideoInputDeviceCategory.
Test on Unity
Create a sphere in Unity.
Create a test C# script and attach to the sphere.
I used Visual Studio to make a test script.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class WebCamDetect : MonoBehaviour
{
void Start()
{
WebCamDevice[] devices = WebCamTexture.devices;
Debug.Log("Number of web cams connected: " + devices.Length);
for (int i=0; i < devices.Length; i++)
{
Debug.Log(i + " " + devices[i].name);
}
Renderer rend = this.GetComponentInChildren<Renderer>();
WebCamTexture mycam = new WebCamTexture();
string camName = devices[2].name;
Debug.Log("The webcam name is " + camName);
mycam.deviceName = camName;
rend.material.mainTexture = mycam;
mycam.Play();
}
}
On my console, Iām getting an error, but as the test is working, I havenāt tried to fix it.
Everything just works!
Hereās a video clip of my desktop so you can see that the sphere has no gaps in it. No adjustment done.