Can RICOH THETA Z1 be used in Unity as a webcam?

Alright, so I tried with the newest version of Unity today and it still has the same issue.

One thing I noticed is when I stream the camera live in MPC-HC, a big “LIVE” word starts blinking on the camera’s small screen. When I play the scene in Unity, the camera quickly flashes the “LIVE” words then it disappears, as if it connected to it for a second, then just disconnects due to the “connect pins” issue.

Thanks for this report on your tests. We saw a similar thing with the THETA V. MPC-HC could detect the hardware device driver (THETA V or THETA Z1) on Windows. However, other software such as Unity and OBS (Open Broadcaster Software) required the use of the software device driver. In addition, Unity also needed non-blank fields as described above.

Just so you know, for the THETA V,

Web Cam Device Used On Note
THETA V Mac OS and Windows only with MPC_HC no driver software needed
THETA V FullHD and THETA V 4K Other Windows software like OBS driver software needed on Windows
THETA V FullHD and THETA V 4K with update for Unity Works on most Windows software, including Unity Basically incorporated the community hack for “software driver info” into the official driver

The Windows software for the THETA V I’m referring to is here:

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

This software may need to be updated for the THETA Z1.

I’m sharing old information right now, I need to test this more with the Z1 before I have an opinion on the current state of Z1 live streaming with Unity.

Note that if you have access to MacOS, it might be worth trying Unity on MacOS as it uses a different driver. The test below with the THETA V was done on a Windows machine with dual-boot MacOS.

Update 10/1 I am looking for the software driver for the Z1. Have you seen any download links for a Z1 live streaming driver? I have a note out to a person at RICOH about this.

On the Z1, I have this device on Windows 10, but it is not appearing in OBS.

image

If it’s not working on OBS, I don’t think it will work on Unity. I’m going to try and get the Z1 to stream with OBS before I test it with Unity.

I tried to stream with MPC-HC and I can’t get the video stream to appear right now.

image

Is the video stream appearing inside of the preview window of MPC-HC? Can you post a screenshot of your settings?

@craig I finally got the Z1 working in Unity and OBS! It’s probably because of you, since you said you might be able to contact people at Ricoh.

They just released a UVC4K software for the Z1. Here’s the link (found it in the FAQ): Live video is not displayed on a Computer - トピックス(米国)

Once installed, it created a new “Camera” entry in the registry called “RICOH THETA Z1 FullHD” (Probably does other magic too, not sure). But now, you can specify that name instead of the regular “RICOH THETA Z1” in your code in Unity, it works. In OBS, “RICOH THETA Z1 FullHD” now appears as a camera choice.

Anyway, thanks so much for your help @craig

Here’s my code that I attached to a sphere to test it:

using UnityEngine;

public class getRicohStream : MonoBehaviour
{

static WebCamTexture myCam;
string selectedDeviceName = "RICOH THETA Z1 FullHD";

void Start()
{

    Renderer renderer = GetComponent<Renderer>();

    if (myCam == null)
            myCam = new WebCamTexture(selectedDeviceName, 1920, 960);

        renderer.material.mainTexture = myCam;

    if (!myCam.isPlaying)
    myCam.Play();

}

}

2 Likes

Nice! This is fantastic. I have it working with OBS and am upgrading Unity and Visual Studio in order to change my application from THETA V 4K to THETA Z1 4K. Just an FYI, the 4K driver is higher resolution, but you may experience lag if you’re transmitting the stream over the Internet.

Great! I could only get FullHD version to be recognized in Unity for some reason. It is showing up in the registry, so I’m not sure why. I’ll try reinstalling it, or maybe even restarting my computer :thinking:

By the way, I posted a little guide for anyone interested in getting their camera stream as a Unity skybox instead of a sphere:

1 Like

Thank You for this! That conversation was exactly what I was going through. I got the 4K in Unity as well though following the same steps you did.

2 Likes

@RicoB

Hi! Thank you for the information. I am facing the same problem now. I found that the current drivers Ricoh theta v/z1 4k and Ricoh theta v/z1 FullHD work perfectly in OBS. But in Unity, it constantly shows the Could not connect pins - RenderStream() error. May I ask which version of Unity you have tested with?

Hello @RicoB,

I also happen to have the same problem with Could not connect pins - RenderStream() error. As @Yanjiao_Ao asked, mine version of Unity is 2019.4.6f1 and running from Windows 10 Home edition. I have gone through this topic with the same error from @codetricity , but it hasn’t been solved.

Has there been any aditional work you did with this error that you could share? Thanks

Please confirm that you are using the driver from here:

https://topics.theta360.com/en/faq/c_00_z1/304_1/

If so, please confirm:

  • you are using Windows 10 64 bit
  • post build number of Windows
  • post camera firmware version
  • confirm that the “live” word is flashing on the front of the camera (you most push the mode button a few times to see it)

Hey @craig!

Just to clarify, I talk about THETA V.
I confirm that I unistalled RICOH THETA UVC V/Z1 v2.0.0 and made a fresh install from the link here

I also confirm the info you asked:

  • I use Windows 10 Home 64-bit
  • Version 2004 (OS Build 19041.804) as provided by “winver” command
  • camera firmware version 3.50.1
  • Live led flashes and in addition streams runs perfectly in OBS (video and audio)

I have the same problem.

image

I’m using a Skybox.
Unity 2019.4.20f1

I’m going to take another look at this tomorrow.

1 Like

So I had this same issue with the Ricoh Theta V and just recently found a band-aid solution that seems to work for now until someone finds something better.
I looked around and started running through various Unity versions even ones that had been previously confirmed to work but they all gave that same pins error. I finally tried uninstalling the recommended UVC drivers that have been linked above and instead installing older drivers that @craig inked in this post:

The drivers specifically:
Windows 64-bit: https://theta360.com/en/support/download/liveapp4k/win64
Windows 32-bit: https://theta360.com/en/support/download/liveapp4k/win32

If you do this make sure to uninstall the recommended drivers or it won’t work. Then in Unity instead of trying to read the Ricoh Theta V/Z1 FullHD or Ricoh Theta V/Z1 4k streams, you will read the Ricoh Theta V FullHD or Ricoh Theta V 4k streams.

My current setup:
Using the skybox method
Unity 2020.2.4f1 (though I think I tested it on earlier versions and it also works)
Ricoh Theta V
Firmware Version: 3.50.1
Microsoft Windows 10 Education

(First time posting here so let me know if there is anything else that I should add)

2 Likes

Nice! Thanks for posting this solution. Can you post your script and some basic info such as if you used a sphere or a skybox?

Thanks.

I have it working with a sphere.

I’d like to try running it from a skybox next.

Oh sure yeah! I used a skybox, here was the basic script I used:

using UnityEngine;

public class getRicohStream : MonoBehaviour

{

    static WebCamTexture ricohStream;

    string camName = "RICOH THETA V FullHD"; // Name of your camera. 

    public Material camMaterial;  // Skybox material

    void Start()

    {

        WebCamDevice[] devices = WebCamTexture.devices;

        //printing out all video sources for debugging purposes

        Debug.Log("Number of web cams connected: " + devices.Length);

        for (int i = 0; i < devices.Length; i++)

        {

            Debug.Log(i + " " + devices[i].name);

        }

        if (ricohStream == null)

            ricohStream = new WebCamTexture(camName, 3840, 1920); // Resolution you want

        if (!ricohStream.isPlaying)

            ricohStream.Play();

    if (camMaterial != null)

            camMaterial.mainTexture = ricohStream;

    }

}

Then just attach a skybox/panoramic material to camMaterial and use that same material for your skybox.

I basically just followed the same steps as this post:
Stream Ricoh Theta to Unity Skybox

1 Like

@Justin @craig
Hey. Thank you for all the information.
I recently got both the theta v and theta z1. I installed both z1 as well as the v drivers from the links. Both cameras seems to be working in OBS, however in unity, only the theta v is working. The z1 is giving the error “Could not connect pins - RenderStream()”.
With theta v, i’m trying to connect to the camera named “Ricoh Theta V FullHD” and it is working. With theta z1, i’m trying to connect to the camera named “Ricoh Theta V/Z1 FullHD” and that is not working.

Firmware installed is the latest 3.60.1
Unity Version 2020.3.5f1
Windows 10 Build Version 20H2 build 19042.928

Watch this video and let me know if you still have problems.

Hey. Thank you for the prompt response. As instructed in the video, I uninstalled the version 2 of the drivers and installed the v1.0.0 for the Z1. It is still working in OBS, however in unity, it is now giving a new error “ERROR - Could not find specified video device” when trying to connect to “RICOH THETA Z1 FullHD”.

1 Like

Got it to work!!! Had to add the DevicePath “foo:bar” key to the registry. Thanks a lot for the help…

For future reference of others, here is a step by step guide:

  1. Uninstall the v2 V/Z1 drivers and install the v1 drivers for Z1 from here.
  2. Open the windows registry and navigate to Computer\HKEY_CLASSES_ROOT\CLSID{860BB310-5D01-11d0-BD3B-00A0C911CE86}\Instance
  3. In the sub items, search for the entry of RICOH THETA Z1 FullHD and 4K. In both those entries, right click and select new → string value.
  4. Name the key “DevicePath”. After naming it, double click it to get a popup for inserting value. Give it a value of “foo:bar” (I think it could be anything really).

That should be enough for Z1 to be recognized by unity. For theta V, the v1 drivers seems to make the registry entries automatically so it should work immediately after installing the drivers.

2 Likes

@nikunjarora12345 thanks for posting the improved solution. I must have installed a different driver on my system that set the registry for me. When I made the video, I mistakenly thought that Z1 driver 1.0.0 would set everything up automatically.

It’s also possible that I set the registry manually when I was trying to get it to work and then I forgot about it.

Thanks again for your contribution to the community knowledge. That original registry hack was from @zimmermegan a while back and other people have improved the technique over time.

I added your solution to the description on the video and added a link to your post.

2 Likes