Announcement

Collapse
No announcement yet.

Razer Hydra Plugin

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

  • replied
    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.

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    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

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    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

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    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!

    Leave a comment:


  • replied
    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!

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    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

    Leave a comment:


  • replied
    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

    Leave a comment:


  • replied
    Originally posted by cleerusher123 View Post
    Hey everyone! So I got the third person blueprint template working with the hydras for the most part with some minor tweaks for the hand rotations. I have it uploaded in a .zip on mega for you guys if anyone is interested in giving it a try and see how it works. It's not polished by any means but at least it gives some people a place to start with and allows them to tweak it how they like.

    ...
    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.

    Leave a comment:


  • replied
    Hey everyone! So I got the third person blueprint template working with the hydras for the most part with some minor tweaks for the hand rotations. I have it uploaded in a .zip on mega for you guys if anyone is interested in giving it a try and see how it works. It's not polished by any means but at least it gives some people a place to start with and allows them to tweak it how they like.

    https://mega.co.nz/#!LsNngQBZ!YReIsI...ZLKNnhOoL82aJs

    Just unzip into your project folder where the rest of your unreal projects are and you should be able to start it right up after that. I'm not going to include any screenshots unless people come back with questions about certain things. I also have a UMG set up for tracking the shoulder midpoint position and left hydra position in real time so you could just delete that UMG folder altogether if you don't want it.

    How I have the shoulder midpoint calibration setup: Take the left hydra and place in front of your chest and your right hydra extended straight out in a T-pose. This will allow people to scale the arms of the character later on (I didn't include that since I haven't had a need to do it just yet). One your hands are in the right position, press the left Hydra start button to calibrate and then start moving your hands! Let me know what you guys think as far as how I have things set up and if anyone has any better solutions.

    Leave a comment:

Working...
X