Announcement

Collapse
No announcement yet.

[PLUGIN] Playstation Move Plugin (not finished yet)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [PLUGIN] Playstation Move Plugin (not finished yet)

    I'm working on a plugin ala the Razer Hydra plugin but for the Playstation Move, since they are quite cheap right now used, or even new, and I can use it to prototype for Hydra and other motion controllers etc.

    The plugin is based on getnamo's Hydra plugin (thank you!). The first version will only support the move controllers with positional support, without support for the navigation controller.

    My PS move gear hasn't arrived yet (managed to snag 2x move controllers, 1x cam, 1x nav controller for for $40), but once it does I should be able to get it running fairly quickly. Aside from things like the docking, and buttons that are different, the interface should be 99% the same as the Hydra plugin. So for those developers that already support the Hydra via the plugin, you should be able to just hook up the same nodes but for the Move plugin to your existing code and have instant support.

    Down the line I'd like to support multiple cameras for extra positional tracking volume/accuracy, navigation controllers etc., pairing support.

    Edit: https://github.com/ChairGraveyard/move-ue4-plugin

    Here's a link to the repo, but it doesn't have anything really except for the renamed Hydra plugin files currently. Tomorrow I will probably have it finished up. If anyone with a Move wants to test it this week before I receive my own gear, please let me know!

    Update: Got most of the DLL functions set up last night. Going to set up the initialization and start going through and swapping out the Hydra functions for the Move functions. Move API doesn't provide a nice pretty single data structure like the Sixsense API does, so I have a lot more functions I need to call to put the data into the struct for firing off the events.

    Couple of days and it should be ready for early testing. In order to use it, you'll want the Move to already be paired or to be plugged in via USB (there's a pairing utility in the PS Move API (todo: link there)). I'll set up access to pairing in the interface as well at some point.

    Update: More work done on the plugin getting the DLL functions defined. Some more renaming work done.
    Last edited by n00854180t; 06-30-2014, 04:05 PM.
    Storyteller - An immersive VR audiobook player

    Dungeon Survival - WIP First person dungeon crawler with a focus on survival and environmental gameplay ala roguelikes

    #2
    Progress!

    This weekend I got to the point where I could test the DLL function imports, and see if that was working. After much hair pulling I realized that the DLL wasn't loading because it was a 32bit build, and I was using the 64bit build of UE4.

    I managed to get PS Move API recompiled in 64bit, got the function imports working, and now have a *very basic* working version of the plugin (can hit a button and get the event in the engine!).

    Eye camera support for positional tracking is another matter - right now I can't get the DLL for tracking to build due to some issues with OpenCV includes.

    To do:

    * Re-enable the rest of the function imports from the regular library.
    * Set up more of the data into the data collector class, so that more events will fire correctly (right now buttons are the only thing that works). Rotation for instance.
    * Refactor the button events to refer to Triangle/Square/Circle/Cross buttons rather than B1/B2 etc.
    * Add Select, Move button (the big one) and PS button.
    * Support rumble and setting LEDs.

    Tracker support:

    * Get tracking lib compiling 64bit.
    * Set up tracker ref to be held and initialized.
    * Add tracking function imports.
    * Set up tracker fusion support.

    After that's done:

    * Set up support for navigation controllers, multiple move controllers.
    Storyteller - An immersive VR audiobook player

    Dungeon Survival - WIP First person dungeon crawler with a focus on survival and environmental gameplay ala roguelikes

    Comment


      #3
      This sounds really, really cool Can't wait for further updates!

      Comment


        #4
        Thanks

        Update:

        * Re-enabled most DLL function imports.
        * Re-enabled and confirmed trigger works
        * Tested LEDs (works - you have to call UpdateLEDs after calling SetLEDs to make it actually update).
        * Added the start of the framework for setting stuff like LEDs/rumble on the controller.
        * Recompiled PSMoveAPI with Magdwick AHRS algorithm - no luck retrieving orientation (needs more investigation).

        I also spent a fair amount of time trying to debug why CMake is not finding the OpenCV directory properly, so that I can build the tracking DLL and set up positional tracking. I hope to figure that out tonight or tomorrow.

        Can't wait to get this out to the community.
        Last edited by n00854180t; 07-08-2014, 12:54 PM.
        Storyteller - An immersive VR audiobook player

        Dungeon Survival - WIP First person dungeon crawler with a focus on survival and environmental gameplay ala roguelikes

        Comment


          #5
          Got OpenCV built on my machine, got CMake to find it, and managed to get the tracking DLL built for 64bit

          With that in place I can hopefully get the rest of the functionality hooked up in the next couple of days (position and rotation, mainly, buttons/LEDs/rumble are easy). Then it will be ready for an initial release. I'll also collect some of the special info for connecting the Move controller on Windows (you need a Bluetooth receiver! The main functionality doesn't work over USB only).

          As an aside - I also just figured out why rotation wasn't being sent. Gotta enable it first.
          Storyteller - An immersive VR audiobook player

          Dungeon Survival - WIP First person dungeon crawler with a focus on survival and environmental gameplay ala roguelikes

          Comment


            #6
            Ill be following this closely, i love the potential!

            I'm thinking rail shooter house of the dead style.

            Comment


              #7
              @hobbitjack, I'm really happy to see there's interest

              Mo' Progress, Mo' Problems

              So after getting OpenCV built and CMake finding it, I built the tracking library (64bit).

              I went through, and set up all the functions for tracking, and also set it up to create a tracker and enable positional tracking (and rotation). Unfortunately, despite finding the DLL and the functions, for some reason execution is hanging inside psmove_tracker_new, and not returning a tracker OR failing.

              I suspect it might be due to my OpenCV build, or something of that sort, but I'll need to get the DLL for tracking and also OpenCV built with debug to tell what's going on. Before I do that, though I have some ideas I'm going to try later today to see if I can fix it without doing all that extra work.

              --

              As an aside, when I do finally get this all working, I'm going to need some help!

              The PS Move API gives you position information about the controller in cm unit world space relative to the camera. So I'm at sort of a loss to figure out how I'm going to get that into the game's worldspace, so I can drive the hands to an IK target.

              Anyone have any ideas? I think the problem is that there's not a really great way to know exactly where the camera is in the game's worldspace. If anyone has any ideas or knows what to do there, I'm all ears, that's going to be the last hurdle to getting this working well.
              Storyteller - An immersive VR audiobook player

              Dungeon Survival - WIP First person dungeon crawler with a focus on survival and environmental gameplay ala roguelikes

              Comment


                #8
                I think I figured out the problem. Unfortunately, it's a real wrench in the works.

                The main issue seems to be that the driver for Windows that supports the PS3 Eye camera does not have a 64bit version. Therefore when OpenCV tries to get the camera frame (from a 64bit compile) it fails.

                I'll still try and support the 32bit build of this, and also provide the 64bit DLLs for PS Move API that I compiled, but unfortunately it's going to less of a priority due to the lack of support for 64bit, which means not being able to use it from the editor at all (you can use the editor with the plugin loaded in a 64bit build, and even get the Blueprint nodes, but it won't work in runtime unless in a 32bit game build).

                I'm going to try and ask CodeLaboratories (they make the driver) about getting a 64bit build.

                Another issue is that CodeLaboratories recently made the CL Eye Driver cost $1.99. Not a big deal in terms of price, but it's very much impractical to expect developers and especially gamers to pay for a driver to be able to use the plugin/play your game (respectively).

                In any case - I'm going to try and get the 32bit build working and publish it, just for completeness sake.

                Sorry everyone I was really excited to bring this to the community, but it doesn't look like it's going to happen how I was hoping.
                Storyteller - An immersive VR audiobook player

                Dungeon Survival - WIP First person dungeon crawler with a focus on survival and environmental gameplay ala roguelikes

                Comment


                  #9
                  Quick update - I did find a potential alternative (64bit!!!) driver for the Eye cam. I'll test it out this weekend and report back. Fingers crossed.
                  Storyteller - An immersive VR audiobook player

                  Dungeon Survival - WIP First person dungeon crawler with a focus on survival and environmental gameplay ala roguelikes

                  Comment


                    #10
                    Did you get any success? .

                    Comment


                      #11
                      Sadly no :/ The alternate driver isn't supported by the API, and it's a bit beyond me to figure out how to integrate it.

                      I went on to the CodeLaboratories site's forums posted a thread asking for a 64bit version of the CL Eye Driver, but no response from the developer has come up yet.

                      For now I'm going to devote time to supporting Razer Hydra for my game, but I'd like to come back to this in the future. Either way down the line I will support the 32bit version, which will work as long as its not an editor build (and is 32bit). But that's hardly ideal.

                      If you want to, please post on http://codelaboratories.com/forums/viewthread/1163/ this thread and ask the CL developers to put out a 64bit build of the CL Eye Driver.

                      Also, the plugin code and stuff is all up on the Github mentioned before, so if another developer wants to take a crack at it (e.g., maybe doing a 32bit interop solution, though I've heard those are slow), it's available.
                      Storyteller - An immersive VR audiobook player

                      Dungeon Survival - WIP First person dungeon crawler with a focus on survival and environmental gameplay ala roguelikes

                      Comment


                        #12
                        Hi, Sorry for reviving an old thread. I would like to know if you are still working on this I am very interested in PS Move support on UE4. If you still are can you look at this Windows driver: https://github.com/inspirit/PS3EYEDriver for the PS3Eye it's based on libusb which has a 64 bit version here: http://sourceforge.net/projects/libu...eases/1.2.6.0/. Also, if you own a PS4 Camera it might be possible to use that and get more depth data with the stereo camera but it's trickier. First, the PS4Cam driver is Linux and OS X only for now it's right here: https://github.com/bigboss-ps3dev/PS4EYECam/ for OS X and https://github.com/ps4eye/ps4eye for Linux then you would have to adapt your PS4 Camera's AUX plug to a USB 3.0 only (won't work on USB 2.0) plug by following this guide: http://ps4eye.tumblr.com/ and connecting the wire based on the color code here: http://www.psdevwiki.com/ps4/AUX . You can get more info on PS4Cam here: http://www.psdevwiki.com/ps4/PlayStation_4_Camera also, you might permanently damage the PS4 camera by modifying it and might not work with a PS4 anymore. Anyhow, thank you for all your work it really helps me a lot. Hopefully, you can get the PS3Eye working.

                        Comment

                        Working...
                        X