psmoveservice / PSMoveService

A background service that communicates with the psmove and stores pose and button data.
Apache License 2.0
585 stars 147 forks source link

Camera video feed as texture on Unity 5 (pseye driver libusb) #227

Closed rebitti closed 7 years ago

rebitti commented 7 years ago

Hello, i dont know if im doing the question on the right place (sorry if im wrong). But here is:

I need to show the live video feed into Unity 5, i have a great asset called AVPRO Live that show realtime video in 60 fps on Unity 5. Im using psmoveservice-unity5 project and works very fine !

The problem is the new way to install PSEYE Cameras on Windows with libusb (required by project), this make the device not listed as a common camera, and others applications cannot see the camera...

So my question if anyone know how to solve this with a script for Unity to show the live video feed into Unity 5 ?

Name of device on 'device manager': USB Camera-B4.09.24.1

masterchop commented 7 years ago

I think you should look over here: psmove-unity5

rebitti commented 7 years ago

Ok thank you, i will post on there. Btw maybe there others users here that know psmove-service and uses Unity.

masterchop commented 7 years ago

i am interested on the same, we could apply openCV directly from unity

rebitti commented 7 years ago

Nice, this will open a new possibilities. Take a look at 'AVPRO Live Camera' this is the unique asset that can show live fluid video into Unity 5 with high frame rates. It is expensive but really works and fits perfect with our pseye's !

http://renderheads.com/product/av-pro-live-camera/

HipsterSloth commented 7 years ago

@rebitti It sounds like you want to treat the ps3eye camera as a generic windows "Direct Show" camera? The libusb driver doesn't provide that kind of interface. It's a lower level api that streams camera data directly via usb requests. If you want a proper windows camera driver for the PS3Eye camera I recommend using the CL Eye drivers. Do note that you won't be able to both stream the ps3 eye camera video feed to a texture AND have that same camera used by PSMoveService at the same time of you do that.

If you do want to get the video feed from a PS3Eye camera that is currently being used by PSMoveService, that is technically possible (via shared memory). That's exactly what I'm doing for the PSMoveConfigTool. However PSMoveService doesn't have a C# API available yet.

I should also note that I am the author of PSMove-Unity5. I'm not really supporting that right now because all of my free time is being spent working on PSMoveService. That said I'm happy to answer questions about either project.

rebitti commented 7 years ago

Hello HiperSloth, thanks for your fast reply !

You are right, i saw other user trying to make libusb work on OBS software. https://obsproject.com/forum/threads/playstation-eye-multi-cam-has-anyone-done-this-in-windows.23564/

I will forever grateful if you put on the roadmap ! :)

We need to have a 'shader' capable to render the live feed video maybe using device address from libusb camera devices.

So, no video feed video for now ! :(

HipsterSloth commented 7 years ago

@rebitti Just to be clear, are you just trying to get a video feed from a ps3eye camera? Or are you trying to get a video feed AND use the same PS3EYE camera for tracking a psmove controller at the same time? Also are you trying to use more than one PS3EYE camera?

rebitti commented 7 years ago

Sorry if im not clear, my primary language is not english.

I want to use psmove-unity5 showing video feed on 'plane' or 'cubes' 3D objects, working with my psmoves devices ! ( So, directX drivers will not work with psmove-service api with unity 5, i understand as you sad)

i will use 4 pseye cameras or more if the 'limit' in a near feature can be removed from the code, but this is secondary right now.

rebitti commented 7 years ago

a image example:

http://i.imgur.com/lktJb0U.jpg

HipsterSloth commented 7 years ago

No problem! I just wanted to make sure I understood what problem you wanted to solve.

That all makes sense. It is my long term plan to expose PSMoveService back to Unity and Unreal. Part of that work involves finishing the client API in C. Currently the client API is in C++ and that's more complicated to expose to C#. We have a version of the C-API in place, but we haven't had to time to finish it up yet (see the capi branch: https://github.com/cboulay/PSMoveService/tree/client_capi). Once that is done I can write the Unity plugin. Getting the current video frame for a given PS3 camera could be part of that client API.

If you have experience with C++/C and were interested in helping with this effort I would be happy to provide guidance about where to start.

Also I'm going to mark this issue as "closed" for tracking purposes, since it's really about a feature request rather than a bug. We're trying to re-direct feature requests and discussions to the google group and keep the issues page to just bugs:

groups.google.com/forum/#!forum/psmoveservice

That said, feel free to continue discussion here. All closing the issue does is change which list it gets sorted into.