Solved: Unity Can't Display THETA V Live Stream on Windows 10


#21

You need to install Unity 5.6 on Windows 10 to get in the game here. :slight_smile:

I’m now installing the same version that Megan is using. Then we can try and flip sphere inside of Unity instead of using the flip normals sphere.


#22

I’ve got a Windows 10 laptop here, I’m hoping to work through this soon. :theta:


#23

I have multiple names for the Theta V showing up, and am using the one “RICOH V FullHD”, it also works with the “RICOH THETA V” option. I have not tried the 4K version.

ThetaCams

I was searching for reasons that the camera might not have been recognized by unity by others, and
remembered that I may have messed around with the registries on my computer as per the old Theta UVC solution that craig explained here out of habit while in a frenzy to get it to work on my own. The reg for the “RICOH THETA V FullHD” feed looks like this:
Regs

Honestly I probably was in one of those “debug until it works” moods, and didn’t realize that I wasn’t documenting what I was doing. Unless it works automatically for you guys, I think that’s the fix.


#24

Thanks!

I’m making solid progress on Win 10.

I think i needed to add the foo:bar DevicePath

Now with THETA V 4K


#25

Great! I guess that must be the solution! Man now I feel guilty for forgetting to post about it a while ago. Anyway I’ll go ahead and recap the solution for this thread.

  1. Open regedit
  2. Navigate to:

For RICOH THETA V FullHD:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID{860BB310-5D01-11D0-BD3B-00A0C911CE86}\Instance{05B5709A-D045-4076-AA59-CAF159FEC26E}
For RICOH THETA V 4K:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID{860BB310-5D01-11D0-BD3B-00A0C911CE86}\Instance{44ADD235-FE8A-42D8-8B18-CF575554AAB1}

  1. Right click - New - String Value. Make the Name of the string “DevicePath”
  2. Right click “DevicePath” and select “Modify Value” and add in a string of some sort. The sample here is “foo:bar”
    Reg5

#26

Wish I could heart this 10 times. Very useful, thank you.


#27

Tested as a standalone app to make sure it runs without the Unity dev environment.


#28

Thank you all. This info allowed me to get my Theta V live streaming on Windows 10 in Unity.


#29

Man, I love comments like this


#30

I’m testing this on another Win 10 machine as a standalone app. In order to get the registry to appear, I needed to install RICOH THETA UVC 4K, available below:

https://theta360.com/en/support/faq/c_06_v/304_1/

After I installed THETA UVC 4K on my laptop and edited the registry, the standalone application worked on my laptop. The application binary is 14MB. It looks like the application can be deployed on different machines as long as the new machine has THETA UVC 4K installed and the registry is edited.


#31

Great to hear! If you have code that displays the stream to the inside of the sphere, can you share it with @zimmermegan. She’s the one that powered through to find the solutions and shared it with us. She’s trying to use Unity only to do this, not the special sphere I made for the mac tutorial.


#32

@codetricity @zimmermegan Oh, I had the mirroring issue too. To fix it, I used the inside-sphere that was made in blender and changed the X, Y and Z scale values in Unity to negative numbers.


#33

Thanks for the update.

Using Blender does work, but I understand that it disrupts the workflow if you’re building different spheres or want to change vertices. It’d also be cool and educational to do this entirely in Unity.

The code below is from Shanyan Teng. It was made for a video file, but it may be possible to modify it for the live stream. Unfortunately, I don’t understand it right now, though I’ve tested it with video file applications and it does work.

I’ll carve out some time and try it myself in the future.

Shader "ThetaInsideShader" {
	Properties{
		_MainTex("Base (RGB)", 2D) = "white" {}
	}

		SubShader{
		Tags{ "RenderType" = "Opaque" }
		Cull front    //  FLIP THE SURFACES
		LOD 100

		Pass{
		CGPROGRAM
#pragma vertex vert
#pragma fragment frag

#include "UnityCG.cginc"

		struct appdata_t {
		float4 vertex : POSITION;
		float2 texcoord : TEXCOORD0;
	};

	struct v2f {
		float4 vertex : SV_POSITION;
		half2 texcoord : TEXCOORD0;
	};

	sampler2D _MainTex;
	float4 _MainTex_ST;

	v2f vert(appdata_t v)
	{
		v2f o;
		o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
		v.texcoord.x = 1 - v.texcoord.x;
		o.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex);
		return o;
	}

	fixed4 frag(v2f i) : SV_Target
	{
		fixed4 col = tex2D(_MainTex, i.texcoord);
	return col;
	}
		ENDCG
	}
	}

}

#34

Updated test of 4K streaming on Windows in Unity. Now showing view from inside of Sphere.

Here’s the Unity package used in the test.

thetav-streaming-test.unitypackage (656.5 KB)

Other tests:

  • Did not work on Unity 2017. I’m still using Unity 5.5
  • Could not get code above to work with a normal Unity sphere. I’m using a Blender ico sphere with flip normals

#35

@joshappleman Thanks! This fix worked for my purposes! Would be nice to see some other fixes without use of the blender sphere at some point though :slight_smile:


#36

Just so everyone following this thread is clear, the fix Megan is talking about is to set the x, y, z scale values to negative numbers. Otherwise, the text and other things will appear reversed. This is not implemented in the unitypackage file I shared above. I created another package below with the blender sphere and with the default scale set to -8, -8, -8, so it shows the correct mirroring from the start.

Also, there should be examples of using Unity to project the stream onto the inside of a sphere without using Blender. We should look for an example and publish the results here.

Now with negative values for scale of x, y, z, per @joshappleman’s tip. :slight_smile:

Shows newspaper headline to verify that mirroring problem is resolved.

thetav-flip-normals-sphere.unitypackage (656.5 KB)


#37

THETA V Now Working with Unity 2017.2.0f3

Process

There’s another virtual driver that needs to be edited.

In Regedit, use the find command to locate all “Data” for THETA V.
image

Once you find the key with the search feature, click on each Instance.

image

Prior to editing, you will not see a DevicePath.

image

You need to add it.

Right-click on the Instance and select New->String Value.
image

Add DevicePath. Right click on DevicePath again and then modify it. Add a fake path like foo:bar.

image

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\WOW6432Node\CLSID\{860BB310-5D01-11d0-BD3B-00A0C911CE86}\Instance\{D36BCC1B-8993-4568-B265-DC5AE05A8C8B}

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\WOW6432Node\CLSID\{860BB310-5D01-11d0-BD3B-00A0C911CE86}\Instance\{C0A73D6F-A72E-4064-B648-BDCB30C09E6A}


image

Summary

NEW Info for THETA V 4K

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\WOW6432Node\CLSID{860BB310-5D01-11d0-BD3B-00A0C911CE86}\Instance{D36BCC1B-8993-4568-B265-DC5AE05A8C8B}

Previous fix was limited to this.

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID{860BB310-5D01-11d0-BD3B-00A0C911CE86}\Instance{44ADD235-FE8A-42D8-8B18-CF575554AAB1}


#39

UPDATE - Hack No Longer Needed

RICOH THETA UVC 4K 1.0.1 appears to solve this problem.

Download New Driver version 1.0.1

https://theta360.com/en/support/faq/c_06_v/304_1/

Uninstall Previous Driver

image

Install New Driver

image

Reboot computer.

Test Unity

It works!

Use Regedit to Confirm That Hacked DevicePath is Not Used

I used foo:bar in the hack. New DevicePath set by driver is RICOH THETA V. It appears that Unity developers no longer need to use regedit.

image

Thanks Ricoh!

It appears that Ricoh listened to the community hack and implemented a DevicePath into the driver that people can download from the Ricoh site.


HowTo: Use RICOH THETA V with HTC Vive and SteamVR
#40

Hi I have the same problem with my theta V and Window 10, could you upload the project?


#41

I think your problem will be solved if you download the latest RICOH THETA UVC 4K 1.0.1

https://theta360.com/en/support/faq/c_06_v/304_1/

https://theta360.com/en/support/download/liveapp4k/win64


A simple test package is available a few posts above. Though, the problem is probably the driver if your problem is that Unity can’t use the THETA V as a web cam.

thetav-flip-normals-sphere.unitypackage (656.5 KB)

If your problem is that the image is mirrored, the above package may help. By mirrored, I mean that the text on a newspaper looks like it does in a mirror. If that is your problem, than the package above will help.