Hi everyone,
We want to build a small VR conferencing app using Unity. I see that there were a lot of posts about connecting Ricoh Theta V with Unity via USB cable (like a webcam) to live stream 4K, but I couldn’t find any post about connecting the newer Z1 camera to Unity. Did someone successfully managed to connect it to Unity via USB? I like the larger sensor on Z1 and the image quality it produces, that is why I would like to go with it.
Just curious if you’ve had luck streaming the camera directly in Unity? I keep getting “Could not connect pins - RenderStream()” when playing the scene.
The only way I’ve managed to do it is with a ridiculous hack, just so I can at least develop while finding a real solution:
Plug Ricoh Z1 by USB
Open stream in MPC-HC media player
Capture with OBS
Output to Unity wit NDI
Receive in Unity with NDI receiver
Apply to Unity Skybox.
I mean…it works haha. But definitely not a realistic or usable option.
Thank you for the update. Sorry you had to buy a THETA V. I haven’t got around to testing it with the Z1, but still intend to.
it appears that @RicoB has got it to work with a hack, likely the hack described below.
The only way I’ve managed to do it is with a ridiculous hack, just so I can at least develop while finding a real solution:
You can likely edit the register with regedit and create a fake device driver for RICOH THETA Z1 4K. I have not tried this yet. You can find the HKEY by searching for RICOH THETA
Search for THETA Z1 and find the key (have not tried yet)
The key will be different for Z1.
From roughly Mar 2018, the hack was no longer needed with THETA V as RICOH incorporated a similar hack into the driver 1.0.1.
What I want to do is to first test this myself with the Z1 and then send a report to some guys I know at RICOH.
If you hack the registry on your Windows machine, you will need to hack the register for every Windows computer you use with the Z1. Thus, it’s not a good solution for commercial deployment if you sell your app. However, it may be useful for prototyping and demos. Also, I don’t know if it works with Z1 as I have not tested it yet.
Btw, the hack I did was meant as a figure of speech hack…not a real “registry hack”. I just streamed the ricoh camera from MPC-HC to OBS, through NDI, to Unity. It was just for testing purposes. Quality and delay was pretty bad.
So I created a new Key under “Instance” using a CLSID I found for the Z1 searching the registry (It seems the key name is the same as the CLSID for all other cameras, so I did that), then added all the necessary String inside (ie. FriendlyName, DevicePath, CLID,etc. - except FilterData cause I couldn’t find it or understand). Results: same issue, unfortunately.
Here are my findings, though:
The new key I created makes it so MPC-HC now sees 2 x Ricoh Z1, but the new one doesn’t work.
I found the registry entry that MPC-HC uses to find the camera, by doing a search in the registry and changing the “FriendlyName” until I saw it changed it in MPC-HC as well. I added a “DevicePath” entry for the fun of it, but that didn’t do anything. Here’s the path in case anyone else wants to experiment:
In Unity, if the Z1 is in live mode, I am getting a black texture on the sphere/object I am applying the texture to, and it is saying my current camera is the Z1 in the debug window, but it still has that “Could not connect pins - RenderStream()” error right after.
If I unplug the camera, the sphere displays a texture that just shows the Ricoh Theta logo with “Theta V FullHD Status: 0x800705AA” error message. So it just finds the next available camera to use as a texture, which I don’t actually have.
@RicoB, thank you for reporting back with these detailed results. I will take two actions in parallel.
I will report this back to some people I know at RICOH
I will also attempt to either replicate the error or get the “fake driver” working
Your information is useful. It sounds similar to the problem we had with the THETA V initially. If you have time, can you post the version of Unity you are using.
That’s great news! It’s nice to see a forum being so active and people interested in resolving issues for a relatively “niche” product. Or maybe I hadn’t realized how big the Ricoh 360 camera customer base had grown in the past few years.
Anyway, all my tests have been with Unity 2019.1.0f2. I will try a blank project with the newest version of unity on Monday, though. Was delaying upgrading since we already have a working project using our Nokia OZO, and it’s always a risk upgrading with a product that is no longer technically supported.
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:
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.
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.
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.
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
By the way, I posted a little guide for anyone interested in getting their camera stream as a Unity skybox instead of a sphere:
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?
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
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:
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)