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

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

This is fantastic. Thank you for providing your solution back to the community. Very helpful.

2 Likes

yea, it’s cool. @Justin originally solved the problem with an older driver. @RicoB also posted some solutions, including skybox. There’s really more contributions. As I normally don’t use Unity, I am just an aggregator. I need to figure out an easier way to provide attribution.

@jcasman , if you have time, please send the video link out to some Unity development groups. It’s fun to use streaming video from the Z1 / V and not so difficult if you use the right driver and setup. However, it’s super difficult if you don’t know to use the right driver and registry modification.

I think the THETA V/Z1 might be the best camera for this type of development at a reasonable equipment cost.

THETA driver for windows(v2.0) and Unity may work with the virtual camera output of the OBS.

Although the integrated virtual camera of the latest OBS does not work with Unity, the older plugin version seems to work with Unity.

(OBS Virtualcam | OBS Forums)

Unity seems to be aware of this kind of webcam issue,

https://forum.unity.com/threads/webcam-capatibility-not-work-on-publish-setting.857095/#post-6578806

If anyone has time, suggest sending a bug report to them.

1 Like

Has there been an updated solution to this form since UVC 3.0 driver came out? Using the UVC 1.0 drivers and 2.0 drivers I still can’t get my Ricoh Theta z1 camera linked up to unity. I have tried just about everything. I am trying to retrieve live video from the z1 onto unity and attach it to a sphere to use it for VR. Any help would be appreciated, I’ve watched about every video online relating to this topic.

As of 2023 Dec 8, I had to use OBS as a virtual camera, then use the virtual camera in Unity. I didn’t try to get it working with the RICOH THETA UVC for that long. I used Windows 10 in my test.

this is the driver that I’m using.

image

I did some additional tests with the RICOH THETA Z1 and Unity to check the smoothness of the video inside of Unity. This is how it looks with a moving video.

I have the Z1 on a small tripod with an extension. I have a laptop showing a video in front of the camera.

The camera is in live streaming mode.

OBS is setup as virtual cam

make sure you press “Start Virtual Cam”

image

Thank you so much for the help, using the live video feed from a virtual camera through OBS rather than pulling the live video feed directly from the camera allowed unity to work.

1 Like

Hi, I’m working with @Caleb_Amadoro and am wondering how to wirelessly connect the Ricoh Theta Z1 to the OBS Virtual Camera and if there’s any way to do so? We were successful in connecting the Ricoh Theta Z1 to OBS’s virtual camera and streaming it to Unity, but that was with connecting the Ricoh Theta Z1 to our laptop with a USB C to USB A cable when our goal is to connect it wirelessly. I have found a plug in guide for connecting the Ricoh Theta Z1 to a YouTube live stream but not OBS which is what we need to connect to so that the virtual camera can connect to Unity. Our final goal is as low latency as possible so not using Youtube or any live streaming platform would be best.

You may be able to use the RTSP plug-in (free). See below.

You may be able to use RTSP to VLC (not OBS) and then VLC to Unity.

This would replace OBS virtual cam with VLC.

I have not tried and have not heard of anyone trying it. if you succeed, please post.

This project does not solve your problem, but may be interesting.

This is another undergraduate project for telepresence

Are you able to post information on your research project? Pictures or project goals?

Hi,
I’m the developer of HDR live streaming plugin. I just finished an upgrade to be able to wirelessly stream to any pc in same network and use live camera feed as regular video capture device/source. What is interesting is that can encode using h.265 too, need a good pc if want to process it in this case.

Is your z1 put into dev mode? If yes I can share the apk directly with you to try, or wait until update is publicly available(need a few days to finalize and send to Ricoh).

2 Likes

laszlo, great news. I’ve used your high-quality plugin in the past and look forward to seeing the new release.

Does the ability to stream to a PC require a free or paid login to your service? The RTSP plugin is no longer under development, so it would be better to use the HDR live streaming plugin as it is under active development.

1 Like

Oh, @biviel, I’m very interested in seeing the new version. Hope it’s updated on the RICOH plug-in repo soon!

1 Like

Only free registration is required and user is able to control their Z1 through flow.tours website like earlier, to set bitrate, encoding settings, server address where to stream to etc. Once plugin is started will pull this configuration data set by the user and set the Z1 accordingly to stream to RTMP or RTSP or SRT , using h.264 or h.265. Able to stream to OSB too directly using RTSP or SRT too. In HDR or regular video quality. Only requirement is to have both Z1 and PC on same network.

1 Like