Announcement

Collapse
No announcement yet.

Razer Hydra Plugin

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

    Originally posted by getnamo View Post
    Oo this is cool ! Will have a proper look at this later, but I was wondering why the download size is 780megs? seems quite large for a rigged character. It seems like you included the whole template with starter content! You should be able to extract just the uassets that belong to the character (use migrate?), which would shrink the zip substantially.
    I haven't done that before but I will look it up to see how easy it is for people to download and import. I just figured to include the whole project to make it really easy for people to start it up and try it out. No need to fiddle with plugins or anything since that should all be good to go

    *NOTE* this is the 4.5.1 engine version in case anyone asks :P

    Comment


      Per getnamo's suggestion, I did a migrate of the player and all associated assets for this so that the file is much much smaller to download. From what it looks like, you'll just need to download it and un-zip the files into your specified projects root folder or you can do an import from within ue4 and point it to the un-zipped file locations. Here is the download link for you guys when you get a chance to try it out. Let me know if you have any questions regarding how it's structured and I'll do my best to answer

      https://mega.co.nz/#!Dg9BRSCR!S70a-I...4egfONO5Y4c7l0

      Comment


        Originally posted by cleerusher123 View Post
        Per getnamo's suggestion, I did a migrate of the player and all associated assets for this so that the file is much much smaller to download. From what it looks like, you'll just need to download it and un-zip the files into your specified projects root folder or you can do an import from within ue4 and point it to the un-zipped file locations. Here is the download link for you guys when you get a chance to try it out. Let me know if you have any questions regarding how it's structured and I'll do my best to answer

        https://mega.co.nz/#!Dg9BRSCR!S70a-I...4egfONO5Y4c7l0
        Had a look and I think it is a good starting point. Couple of points:

        -The shrunk package is a much better size
        -Consider renaming and grouping all of the character content into a convenient folder name such as Content/TPHydra so you can drag and drop it and easily remove it if you need to (otherwise it mixes with your project content folders and removing cleanly becomes difficult). As it is you either replace the assets you have (e.g. third person template) or you need to rename things and go through fixing link errors in the blueprint, which isn't ideal IMO.
        -Love the use of UMG, something I should start doing as well, much cleaner debug.
        -Your calibration is an interesting approach, might be better than T-pose in some instances as shoulder mid point is more easily controllable.
        -Left hand orientation seems to be 45 degrees off
        -For VR (not sure if this is something you were aiming at) Calibration does not take into account your sitting/standing height, might want to have the oculus have a reset orientation call at that instance to sync them together.

        Overall good job, depending on what you want to do with it, some fixes/adjustments could enhance it.
        Plugins: Node.js - TensorFlow - Socket.io Client - ZipUtility - Leap Motion - Hydra - Myo - RealSense

        Comment


          Originally posted by getnamo View Post
          Had a look and I think it is a good starting point. Couple of points:

          -The shrunk package is a much better size
          -Consider renaming and grouping all of the character content into a convenient folder name such as Content/TPHydra so you can drag and drop it and easily remove it if you need to (otherwise it mixes with your project content folders and removing cleanly becomes difficult). As it is you either replace the assets you have (e.g. third person template) or you need to rename things and go through fixing link errors in the blueprint, which isn't ideal IMO.
          -Love the use of UMG, something I should start doing as well, much cleaner debug.
          -Your calibration is an interesting approach, might be better than T-pose in some instances as shoulder mid point is more easily controllable.
          -Left hand orientation seems to be 45 degrees off
          -For VR (not sure if this is something you were aiming at) Calibration does not take into account your sitting/standing height, might want to have the oculus have a reset orientation call at that instance to sync them together.

          Overall good job, depending on what you want to do with it, some fixes/adjustments could enhance it.
          Thank you for the input! I'll look into doing some renaming later on once I finish getting the arm size calibration setup working. Been having a hard time getting socket locations in a good way during calibration. I mainly put this up for people like me a couple of weeks ago that were having a hard time starting up and getting something working. This way, they have at least a semi functioning template to go off of that they can tweak and alter and learn from

          I do plan on doing this with the rift in mind, but I sold my dk1 to get the dk2 so I just have to wait till this paycheck to finish the preorder since it ready to ship. I'm going to wait for that to come in before I do any minor tweaks to the hand placement/orientation but I wanted to get some of the major things done in the meantime (arm length calibration mainly).

          Since I don't have my rift right now, it's hard to program the height of the character and such using those variables without being to actually test it lol. So it'll have to wait till I get mine and then I'll package it all up again and stick it on here for people as the template character to play around with.

          Thanks again for the input like usual Getnamo! Yeah, the UMG setup helped a lot when I was debugging the hand placement and orientations comparable to the hydra positions. Made getting this far a breeze once I got movement going lol!

          Comment


            Hey Guys

            I was wondering if there's anyway to reset orientation position? So that I can hit start and it zeros everything and if I move it from that position/orientation it'll update values using that position as 0xyz/0pry.
            Any ideas on this would be great, thanks!

            Comment


              Originally posted by Tayber415 View Post
              Hey Guys

              I was wondering if there's anyway to reset orientation position? So that I can hit start and it zeros everything and if I move it from that position/orientation it'll update values using that position as 0xyz/0pry.
              Any ideas on this would be great, thanks!
              Simply store the values of the hydra position/orientation at the point you call your reset function(once) and subtract the position/orientation out in all of your output positions (every tick/input event). This will achieve the effect you're looking for.
              Plugins: Node.js - TensorFlow - Socket.io Client - ZipUtility - Leap Motion - Hydra - Myo - RealSense

              Comment


                Thanks Getnamo for the reply. I really appreciate it.

                I have another question. I'm using a bone transform for the right hand rotation and I want the left arm to move depending on the location/rotation of the right. Basically the character is going to be holding a rifle and I want just the right hydra to control the rifle. So I need the left arm to be basically be attached to the rifle and have it move with the rifle. So how would you suggest I go about doing that... Do I have to rig my model to do that or is there a way to do it in engine? I'm fairly new to this so any advice would be great.

                Thanks guys

                Comment


                  Originally posted by Tayber415 View Post
                  Thanks Getnamo for the reply. I really appreciate it.

                  I have another question. I'm using a bone transform for the right hand rotation and I want the left arm to move depending on the location/rotation of the right. Basically the character is going to be holding a rifle and I want just the right hydra to control the rifle. So I need the left arm to be basically be attached to the rifle and have it move with the rifle. So how would you suggest I go about doing that... Do I have to rig my model to do that or is there a way to do it in engine? I'm fairly new to this so any advice would be great.

                  Thanks guys
                  If you want the left hand to follow the rifle, add a socket where your left hand should be to your rifle. Then as the right hand holds the rifle and the wrist rotates the rifle, the left hand will follow that socket location instead of where the hydra is reporting the left hand location to be.

                  You simply specify the the character is holding the rifle (attach rifle object to right hand socket) and fetch the rifle's left hand socket position and use this as the position for the left hand IK.
                  Last edited by getnamo; 02-07-2015, 03:44 AM.
                  Plugins: Node.js - TensorFlow - Socket.io Client - ZipUtility - Leap Motion - Hydra - Myo - RealSense

                  Comment


                    Hi getnamo, thanks for developing this plugin, it's great and it's really helpful.
                    Anyway, i'm having a very annoying bug, every time i close a project with your plugin (or the project crashes) and i reopen it, the Hydra interface in blueprints gets lost,
                    so i get this error:
                    Error /Game/FirstPerson/Blueprints/FirstPersonCharacter : Can't find file for asset. /Script/HydraPlugin

                    With UE 4.6 the BluePrint gets unopenable, and its progressions are lost forever, the only thing you can do is restore a backup, but one before you added the Hydra Interface, so it isn't that useful, and anyway i can't close the engine, or i'll loose all the work.
                    Of course i save everything and compile blueprints and the project, and i haven't touched the code, i'm trying with FPS default project.
                    I might be doing something wrong and very stupid, but i can't find a solution.

                    Fortunately, UE 4.7 (Preview 8) fixes the opening problem, and you can reimport the Hydra Interface, and fix the blueprint (you need to re-add all the events anyway).

                    I have tried to add other default interfaces that come with UE4 and apparently, they don't get lost after the program closes, so i'm assuming it's a bug of this Hydra Plugin, but i can't be sure.

                    The Hydra Component also gets lost, both in UE 4.6 and 4.7.

                    i'm developing a Uni Project with UE4, Oculus Rift and Hydra, and it's due in 2 months, that's why i'm desperately trying to find a solution.


                    #Update:
                    i think there is a bug with your plugin in UE 4.7 that is not present in 4.6, it might be the engine.
                    When you press play, in the viewport, and you have changed anything in a blueprint, the first time the hydra will not send the events, you have to stop and press play again.


                    #Update 2...:
                    i also get this error, which i totally believe is my fault, but you never know, it might help.
                    (i have included HydraDelegate.h in MyCharacter and MyProject.h in HydraDelegate.h
                    Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	836.1 KB
ID:	1066905
                    Last edited by Filoppi; 02-21-2015, 09:39 PM.

                    Comment


                      Originally posted by Filoppi View Post
                      Hi getnamo, thanks for developing this plugin, it's great and it's really helpful.
                      Anyway, i'm having a very annoying bug, every time i close a project with your plugin (or the project crashes) and i reopen it, the Hydra interface in blueprints gets lost,
                      so i get this error:
                      Error /Game/FirstPerson/Blueprints/FirstPersonCharacter : Can't find file for asset. /Script/HydraPlugin

                      With UE 4.6 the BluePrint gets unopenable, and its progressions are lost forever, the only thing you can do is restore a backup, but one before you added the Hydra Interface, so it isn't that useful, and anyway i can't close the engine, or i'll loose all the work.
                      Of course i save everything and compile blueprints and the project, and i haven't touched the code, i'm trying with FPS default project.
                      I might be doing something wrong and very stupid, but i can't find a solution.

                      Fortunately, UE 4.7 (Preview 8) fixes the opening problem, and you can reimport the Hydra Interface, and fix the blueprint (you need to re-add all the events anyway).

                      I have tried to add other default interfaces that come with UE4 and apparently, they don't get lost after the program closes, so i'm assuming it's a bug of this Hydra Plugin, but i can't be sure.

                      The Hydra Component also gets lost, both in UE 4.6 and 4.7.

                      i'm developing a Uni Project with UE4, Oculus Rift and Hydra, and it's due in 2 months, that's why i'm desperately trying to find a solution.
                      I'm guessing you're using the C++ fps template? If that is the case, the problem may be related to https://forums.unrealengine.com/show...l=1#post167217 to which the solution was to sub-class your C++ base character as a blueprint and then sub-class that blueprint to use your hydra component/interface. Still unsure why this error occurs, but it only occurs when the base class is derived from C++ not blueprint.

                      Originally posted by Filoppi View Post
                      #Update:
                      i think there is a bug with your plugin in UE 4.7 that is not present in 4.6, it might be the engine.
                      When you press play, in the viewport, and you have changed anything in a blueprint, the first time the hydra will not send the events, you have to stop and press play again.
                      Haven't had a chance to try 4.7 yet, will look into this when it comes out of preview

                      Originally posted by Filoppi View Post
                      #Update 2...:
                      i also get this error, which i totally believe is my fault, but you never know, it might help.
                      (i have included HydraDelegate.h in MyCharacter and MyProject.h in HydraDelegate.h
                      ...
                      You have to add a component and an interface in order to receive the events. The error message you are getting is saying that whatever class you added a component to, doesn't respond to hydra interface events, so you're missing the interface. You also have access to conveniences classes such as hydra actor or hydra player controller which can abstract your hydra interaction away from a specific blueprint, this may be a simpler way of using the plugin.
                      Plugins: Node.js - TensorFlow - Socket.io Client - ZipUtility - Leap Motion - Hydra - Myo - RealSense

                      Comment


                        Originally posted by getnamo View Post
                        I'm guessing you're using the C++ fps template? If that is the case, the problem may be related to https://forums.unrealengine.com/show...l=1#post167217 to which the solution was to sub-class your C++ base character as a blueprint and then sub-class that blueprint to use your hydra component/interface. Still unsure why this error occurs, but it only occurs when the base class is derived from C++ not blueprint.

                        You have to add a component and an interface in order to receive the events. The error message you are getting is saying that whatever class you added a component to, doesn't respond to hydra interface events, so you're missing the interface. You also have access to conveniences classes such as hydra actor or hydra player controller which can abstract your hydra interaction away from a specific blueprint, this may be a simpler way of using the plugin.
                        Ok, so, I have tried everything possible, both with 4.6.1 and 4.7 Preview 8 so i don't think 4.7 has anything to do with this problem.

                        I have added the component and the interface, i had done it in the first place, and tons of times, in different ways, it works, but after you restart, you get the same annoying error:
                        (i'm going to attach some picture because this is driving me insane)
                        Click image for larger version

Name:	1.PNG
Views:	1
Size:	113.3 KB
ID:	1067051
                        As you see, this time, as you suggested to, i created a blueprint of the character c++ class, and then i have created a child of that blueprint.
                        it is clear from the screenshot that i have added the interface (and the hydra component) in both the father and child blueprint, but i have also tried to add them to just the father and just the child, i have also played around with this question as i though it might have something to do it the error:
                        Click image for larger version

Name:	2.jpg
Views:	1
Size:	10.3 KB
ID:	1067057
                        (if you click yes, apparently, there is no way to revert it)
                        so, finally, i can say i have tried every single possibility, every time the blueprints compile, the hydra works in Viewport Play, but it never works in Standalone Game. (Shipping just doesn't build as now, but i'm not worried about that).

                        This is how the game looks in viewport (and how it is supposed to look right now):
                        Click image for larger version

Name:	3.jpg
Views:	1
Size:	455.2 KB
ID:	1067055
                        You have to hands/arms, that you can move with your left and right hydra, and everything works as supposed.
                        I'm spawning a FPCharacter_Child at a pawn when the game starts, not its father. i've been logging and debugging the hydra and this plugin, and excluding these errors, it seems to work perfectly.
                        I don't have anything else in my scene.

                        Instead, in the Standalone Game, i have 2 outcomes,
                        one where it says: "HydraBlueprintDelegate Warning: HydraInterface Delegate is NOT set, did your class implement HydraInterface? Events are disabled." (twice), as you have previously seen in the screenshot of my last post.
                        The other outcome is without any error, it just plays without the arms but you can still move around, it not clear to me why, i'll have a look at your code and cases where it gives this error, but i don't think i'll be able to fix it, i'm pretty new to UE.
                        it's not clear what causes one or the other to appear.
                        I guess that in Standalone Game, it kinds of compile the game differently, and since it runs in a different process, it might the same exact error that causes the "... Can't find file for asset. ....", it's like the HydraInterface and component remain in the editor instance/memory and do not get saved or compiled with the rest of the project. it seems to be more likely a problem that comes from unreal than from the plugin.

                        This is my current BluePrint setup for FPCharacter_Child (The event graph in the Father is Empty):
                        Click image for larger version

Name:	5.JPG
Views:	1
Size:	247.7 KB
ID:	1067060
                        As i said before, i also tried to add the interface and the hydra component directly in the child instead of inheriting them from the father, but that doesn't change the outcode (after restarting the engine, they get lost).

                        I'll update if there is any news. i'm trying to do my best but it's just hard to understand UE in such a short time.
                        Attached Files

                        Comment


                          Update: i created a Blank project in both 4.6 and 4.7, added the hydra and everything works fine, even in Standalone Game.
                          i'll leave my previous post for the author of the plugin, hopefully it can help him debugging the problem if it doesn't come from UE4 source code.

                          i don't even know why i have started from an FirstPerson Project, i'll keep building on the Black project.
                          Thanks.

                          Comment


                            Originally posted by Filoppi View Post
                            Update: i created a Blank project in both 4.6 and 4.7, added the hydra and everything works fine, even in Standalone Game.
                            i'll leave my previous post for the author of the plugin, hopefully it can help him debugging the problem if it doesn't come from UE4 source code.

                            i don't even know why i have started from an FirstPerson Project, i'll keep building on the Black project.
                            Thanks.
                            Good to know you got it to work. Maybe someday I'll get that debugged.

                            Update to 0.7.7
                            -Update to 4.7
                            -Fixed a memory leak.

                            see the original post for downloads.
                            Plugins: Node.js - TensorFlow - Socket.io Client - ZipUtility - Leap Motion - Hydra - Myo - RealSense

                            Comment


                              Originally posted by getnamo View Post
                              I'm guessing you're using the C++ fps template? If that is the case, the problem may be related to https://forums.unrealengine.com/show...l=1#post167217 to which the solution was to sub-class your C++ base character as a blueprint and then sub-class that blueprint to use your hydra component/interface. Still unsure why this error occurs, but it only occurs when the base class is derived from C++ not blueprint.



                              Haven't had a chance to try 4.7 yet, will look into this when it comes out of preview



                              You have to add a component and an interface in order to receive the events. The error message you are getting is saying that whatever class you added a component to, doesn't respond to hydra interface events, so you're missing the interface. You also have access to conveniences classes such as hydra actor or hydra player controller which can abstract your hydra interaction away from a specific blueprint, this may be a simpler way of using the plugin.
                              Hi Getnamo, thanks for your plugin. It really does great help!

                              I'd like to know if you got any update on the issue that Unreal editor crashes when using c++ character as default pawn class.
                              I'm working on a project that have a base character class, and several sub character classes derived from it. These sub characters are required for the game as I need to switch game mode during inter-level trip.

                              Let's say I use base class for level 1, sub-class A for level 2, sub-class B for level 3...
                              If I 1) create a child blueprint derived from the base class
                              2) add Hydra features to it
                              3) use it as the default pawn
                              4) let sub-class A and sub-class B inherit child blueprint class (in c++)
                              the editor will be sure to crash once play.
                              If I 1) create a child blueprint derived from the base class
                              2) add Hydra features to it
                              3) use it as the default pawn
                              everything goes on well in level 1, but Hydra feature won't be applied to level 2 / 3.
                              If I 1) create child blueprint for base class, sub-class A and sub-class B
                              2) write inter-level switch logic in C++ (to use new blueprint character classes instead of sub-class A and sub-class B)
                              the Unreal editor will also crash.

                              The crashes are all cause by same reason per log files: Can't find file for asset. /Script/HydraPlugin

                              Do you have any other solution on this issue? Kindly lemme know

                              Comment


                                Originally posted by PhoenixThrough View Post
                                Hi Getnamo, thanks for your plugin. It really does great help!

                                I'd like to know if you got any update on the issue that Unreal editor crashes when using c++ character as default pawn class.
                                I'm working on a project that have a base character class, and several sub character classes derived from it. These sub characters are required for the game as I need to switch game mode during inter-level trip.

                                Let's say I use base class for level 1, sub-class A for level 2, sub-class B for level 3...
                                If I 1) create a child blueprint derived from the base class
                                2) add Hydra features to it
                                3) use it as the default pawn
                                4) let sub-class A and sub-class B inherit child blueprint class (in c++)
                                the editor will be sure to crash once play.
                                If I 1) create a child blueprint derived from the base class
                                2) add Hydra features to it
                                3) use it as the default pawn
                                everything goes on well in level 1, but Hydra feature won't be applied to level 2 / 3.
                                If I 1) create child blueprint for base class, sub-class A and sub-class B
                                2) write inter-level switch logic in C++ (to use new blueprint character classes instead of sub-class A and sub-class B)
                                the Unreal editor will also crash.

                                The crashes are all cause by same reason per log files: Can't find file for asset. /Script/HydraPlugin

                                Do you have any other solution on this issue? Kindly lemme know
                                This is a weird bug, I am still not sure of the exact cause and will probably need to debug this with some epic help sometime. In the meantime there is potentially a solution to your problem. Wrap up your hydra stuff into a blueprint actor component or a sub-actor. In there store the information you would like such as the hand positions/etc (also if its attached anywhere in the game e.g. your pawn, it will emit the input mapping events/keys), then reference those stored variables in your pawn classes. This will have the indirection you want and avoid the C++ base class error. Its also a good level of indirection, allowing you to add additional inputs while referencing the same data structures; you are no longer strictly bound to the hydra.
                                Plugins: Node.js - TensorFlow - Socket.io Client - ZipUtility - Leap Motion - Hydra - Myo - RealSense

                                Comment

                                Working...
                                X