Download

Got a Hydra? Please test this Plugin update

Hey VR enthusiasts, if you have a Razer Hydra and you want to try out Epic’s new 4.9 Motion Controller please grab this experimental branch of my Hydra plugin and give it a go! Looking for feedback on how it works in your setup. If you have a Vive as well or another controller that supports the Motion Controller Component, comparisons would be very useful :).

This is a substantial change so I’m trying to catch any bugs before I re-integrate this functionality with the Hydra specific components used in the older versions for a stable release. Cheers for any testing/feedback you may have!

Setup/etc:
After dragging and dropping Binaries and Plugins into your project root from this zip, just follow epic’s documentation, its hardware agnostic after all!

If you’re looking to add Motion Controller Component support to your own input plugin, this is the key c++ file to learn from. There are a few key things ensure you have in your setup to make it work right, if anyone has questions on the how, I’ll gladly answer.

Thanks for the update and all the work on this great plugin getnamo. :slight_smile:
Downloaded and will test asap.

Hi,

short: sorry, can’t help, not skilled enough :frowning:

long:
I tryed all the weekend with the 4.9 hydra plugin in a 1st Person Project.
So far it basically seems to work/track the position of the controller good.

But I am not skilled enough to implement accurate tracking.
I’m still trying tp figure out the calibration and 1:1 hand movement.

So far I add the SteamVR Chapone and the motion controller for tracking left and right check
Attach a static mesh to each motion controller check

This setup seems to work, but has some major flaws:
First there is no way to calibrate things If I take the Hydra controller, the VR hands are behind my character.
Second, if I yaw the hmd, the rotation of the static hand meshes changes.
And third, I found no way to extend the arm reach, since it seems not right to me.

As far as I can tell, I need to disattach the static hand meshes from the controller and update their position on Event Tick, calculating relation to the base station, the shoulder middle and the rotation of my hmd & character.
So far an impossible task for my minor knowledge.

Sadle there are no Step-by-Step VR Motion Controller tutorials, all I can find are about the old hydra plugin.

Cheers
Alex

Thanks for the feedback Alex.

As you’ve noticed there is no calibration function in the experimental branch, but to do a workaround is simpler than you describe. Simply parent the two motion controllers with an empty component and adjust that components offset. I go into some detail on this in the main thread post.

It works great for me. I have a small calibration routine setup but its not super accurate and doesn’t do arm length. all I do is touch the controllers to each side of the Oculus rift on my face and click a button and it tracks well (for a while). I do get a lot of crashing but only when I’m editing the player controller blueprint. No idea if it related to the Plugin or not but I’m just ignoring it until the full plugin is released. Thanks for the hard work Getnamo.

If you’re getting crashes PM me some logs, I might not be cleaning up properly on PIE exits.

Hey getnamo I just got my Hydra and am starting to integrate it into my 4.9 branch of my game but I’m following the motion controller twitch stream from a couple weeks ago would that work with you’re latest hydra branch?

So I went ahead and followed the motion controller documentation and worked immediately and the tracking is amazing! I still dont think its 1:1 but I havent tried it in VR yet.

How would I go about calibrating the hydras to be in the rift world space. Is it just a matter of putting the motion controllers in the PlayerBP where the HMD is and then playing with the offset manually?

Also after launching for the first time and everything working fine. Everytime I make a change to the PawnBP and compile it crashes on me. Where can I send you my logs Getnamo?

Looks like there is a memory management bug, send me a pm with your logs and it’ll help me debug it :slight_smile:

Regarding calibration here is what I’ve said about that in the main hydra thread:
The hydras report their position from the center of the base station (the green orb). Whatever is your parent (e.g. pawn’s root component) of your motion controllers will then act as that center. So to move the positions forward you need to calibrate the hydras to a known point. On page 3 in the hydra thread we talked about one calibration method, which is to make a T-Pose with your arms and hitting calibrate (capturing the positions at that pose), which then gives you the offset from the base to the shoulder midpoint (and arm length from the vector/2), you can then add this offset so that the controllers appear almost 1:1. You can set this offset as your controllers’ parent position. E.g. make an invisible component parent the two motion controllers and just set that component’s position as the offset and it will work as you expect it.

There are other calibration methods which may work better for VR, e.g. if you place your controller by your face (you know your hmd position) and then extend your arm and take a second calibration point, you get the same offsets but with higher reliability to get closer 1:1 match.

Gday Getnamo, as with everyone around i want to thank you MASSIVELY not only for your generosity and hard work, but the promptness with which you provided an update to 4.9, i just got my Hydras and am having more fun that ever with them.

I have been getting multiple nasty crashes, often when exiting PIE as you mentioned earlier, and the crash is totally guaranteed if i enable my Rift DK2 when using pie with the hydra plugin. i have however updated to 4.9.2 and fear it may have introduced further issues, even when using the Hydra plugin alone, the crashes are far more consistent.

I will PM my crash log for an empty project, with the hydra enabled, i hope it can be helpful.

Just a quick heads up, the crashes seem not to occur as frequently when testing in standalone, so that’s allowing testing at this stage, a reasonable workaround for the moment.

First of all thanks for this great branch Getnamo! I tried Hydra within Unreal a long time ago and could get is right. I guess my Unreal Engine experience got improved also… I got it all working just great. Only the crashes got a bit annoying.

I would like to share my solution for calibrating the hydra within gameplay. In my first person blueprint I set up two separate skeletal mesh hands. (MCMB-LH and MCMB-RH)
The variable “Hydra-Local-base-position” is the start position of the hands. When calibrated the hands need to be at this position.
The variable “Hydra-Local-Offset” is the position relative to the base of the hydra. This is substracted to the position of the hydra. When I execute the calibration button this offset variable is set again.

6e47bce12fdbcb4097c0745593b7b15835389c5b.png

ipas wow great work thanks for the share!

What position do the hydras have to be in when you calibrate? Undocked, hovering off the base station? What is the default value for the variable Hydra multiply? Are you doing other hydra logic outside of this picture that could be important for the setup? Such as are you using a BeginEventPlay to set the HydraLocalBasePosition L/R variables from the location of the controllers when Docked on the base station or are you just manually putting those values in?

The HydraLocalBasePosition L/R position is the relative position of the hand of you player character mesh. This default value is only once set by hand. This position is when the hand are in a relaxed state, for example just in front of you stomac. The elbow is in aprox 90 degree position. This is also the pose of your real hands in the real world when you activate you calibrate button. From this position you can move free to each desired direction.

This code is driven by an event tick for now. For movement en calibration there is nothing more to it with the blueprint. I can share more logic of pickup solutions and all if desired…

Just updated the experimental branch to fix the PIE bug and add hydra specific functionality back. You can now easily calibrate by adding a Hydra Plugin Component anywhere and calling calibrate on it.

Please see the hydra forum thread post for details

Let me know if the bugs have been squashed and if any other ones creep up! Also would love for some of you brave ones to try to package the plugin as I’ve tried to automate the process, but I doubt its 100% there just yet!

How would I go about calibrating the hydras so the oculus could act as the base offset? My apologies Im just not very good at math so right now Im just hardcoding these numbers and my arms are a lot shorter than other taller people so I would like to figure out a way to calibrate the base offset based on height of HMD and t pose. Any suggestions/tips/help is super appreciated.

The Calibrate function will move your hydra position origin to the center of the centroid of your two controllers minus whatever offset you have. For the third person character the shoulder midpoint is roughly 40cm above the actor origin so that’s the default for the offset. This means the calibration will move the new center from the hydra origin via shoulder midpoint to your actor origin. If you want to use this method with another centroid, for example, calibrate to where your headset is, you would make the additional offset a vector pointing from your actor origin to your camera, and then calibrate by having your hydras on either side of your head and calling calibrate. Note that if you use the T-pose you can also extract the length of your arms by grabbing the length of half the vector between the two points, which you can use to scale input to handle outlier arm cases.

If you want to use the manual calibration method, you call Set Base Offset instead. There is no centroid for this function so you need to figure out what offset you need to move the base so that you get roughly 1:1 motion. Note that this is typically the negative vector of where you want the origin of your input to be. Additional methods and notes on calibration can be found in the hydra thread starting at page 3. There are other calibration methods commonly used such as using a known point e.g. headset or virtual hands you ask people to match. This would be the function to use with those methods.

Always remember that the hydra base can be off-center, but not off-rotation. The wires should always come out of the back of the hydra (if it is off-center move it parallel to the center position, it will still be facing your back wall, not at an angle facing away from you). The reason for this is that the hydra uses hemisphere tracking and would require additional calibration if arbitrary rotation was allowed (and it’s not optimized for it).

Additionally I’ve finally managed to get Leap+Hydra auto-calibration to work, and it’s awesome. More on that later :wink:

Just downloaded the experimental branch tonight, and it seems that when I open the UE4 editor with the plugin, my PC stops receiving info from the hydras. Neither UE4 nor Windows game controller test receive any input, though windows still recognizes them as being plugged in. Windows troubleshooting claims that “usb composite device is an older usb device and might not work with USB 3.0”. They regain functionality if I close the editor and un/replug the hydras, but only until I open my project up again. Opening the editor without the plugin doesn’t cause this behavior.

Cheers, and thanks for all the work you’ve put into this plugin!

Edit: Upon further toying this problem seems to be on my end and not your plugin. Some other programs can see the hydra, some can’t, and your plugin is now working perfectly without me knowing what I changed! :stuck_out_tongue: I did switch between Oculus runtimes 0.5 and 0.7 once or twice, but that’s about all I know.

This plugin is awesome, thanks getnamo! I’m using 4.9.2 and after adding a modified PlayerController and PlayerCameraManager for VR, and adjusting the offset for my setup, everything just worked. I’ll let you know if I find any bugs as I start mapping more actions to the controllers (and possibly try packaging the plugin). This is a really great solution for everyone waiting for Vive and Touch controllers, so thanks for all your work on this!

Would feedback be useful after Nov 11th? I really want to use this plugin, but won’t be able to for a bit.