Announcement

Collapse
No announcement yet.

Razer Hydra Plugin

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

    Nicely done n00854180t, the setup looks very clean. I especially like that you have your animation setup with an alpha blend that is becomes enabled after you calibrate, I did something similar and this is the correct way to support different control modes.

    The only thing left to do is scaling the arm output based on user to avatar arm ratio. I also think that knowing your avatar's shoulder midpoint (e.g. via a socket) would allow for the base offset to be calculated automatically and relative to the avatar. Will take a look at this myself when I get the time.

    Keep up the great work!
    Plugins: Node.js - TensorFlow - Socket.io Client - ZipUtility - Leap Motion - Hydra - Myo - RealSense

    Comment


      Originally posted by getnamo View Post
      Nicely done n00854180t, the setup looks very clean. I especially like that you have your animation setup with an alpha blend that is becomes enabled after you calibrate, I did something similar and this is the correct way to support different control modes.

      The only thing left to do is scaling the arm output based on user to avatar arm ratio. I also think that knowing your avatar's shoulder midpoint (e.g. via a socket) would allow for the base offset to be calculated automatically and relative to the avatar. Will take a look at this myself when I get the time.

      Keep up the great work!
      Awesome, I'll see if I can mess with that next, seems reasonably straight forward.

      I changed how I'm doing the IK and got far better results (using FABRIK instead of two-bone).

      I tested setting it up so the FABRIK chain went from the hand all the way to the spine, and it actually worked, though it looks hilarious. I'm going to set it up right so the target is the Rift position and goes from the head to the spine, so that players can bend over and then reach out with the hands.
      Storyteller - An immersive VR audiobook player

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

      Comment


        Thank you, thank you thank you! Thank you! I will read them immediately! I can't wait to get this working in conjunction with the oculus!

        Comment


          @ n00854180t

          So I got as far as the Anim Graph before I hit a wall. I got everything set up, but I don't know where the wires need to go from Component Space back to Local since there don't seem to be any nodes that will allow me to pipe more than one node at a time. I'm using the default Hero TPP Animation Blueprint from the Rift Template built by Mitchell McCaffrey In the hopes that I can find a way to combine the two.

          Click image for larger version

Name:	HydraAnimBP.JPG
Views:	1
Size:	233.0 KB
ID:	1057497

          Comment


            Originally posted by aialexander View Post
            @ n00854180t

            So I got as far as the Anim Graph before I hit a wall. I got everything set up, but I don't know where the wires need to go from Component Space back to Local since there don't seem to be any nodes that will allow me to pipe more than one node at a time. I'm using the default Hero TPP Animation Blueprint from the Rift Template built by Mitchell McCaffrey In the hopes that I can find a way to combine the two.

            [ATTACH=CONFIG]13442[/ATTACH]
            Drag from the state machine's local output to the Local to Component node right before the Two Bone IK node for the Left Hand (make sure to set that up btw, it needs the left hand bone set, as does the Transform (Modify) Bone node and the others too, for the right hand).

            Then from the component wire on the first (one on top) Transform (Modify) Bone node, go to the Two Bone IK node below. Then from the Component To Local node, drag back onto your HeadOffsetBlendSpacePitchYaw node.
            Storyteller - An immersive VR audiobook player

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

            Comment


              Originally posted by n00854180t View Post
              Drag from the state machine's local output to the Local to Component node right before the Two Bone IK node for the Left Hand (make sure to set that up btw, it needs the left hand bone set, as does the Transform (Modify) Bone node and the others too, for the right hand).

              Then from the component wire on the first (one on top) Transform (Modify) Bone node, go to the Two Bone IK node below. Then from the Component To Local node, drag back onto your HeadOffsetBlendSpacePitchYaw node.
              Wow, I feel really silly for not seeing that. Thank you for your help. I won't be able to take your advice for a couple days but I'm sure I'll have better results once I try it out.

              This may seem like a dumb question, but how do I go about setting up the left and right hand bone set? Is there a way to specify what bone in the skeletal mesh that I need? I noticed there was an option to insert coordinates, but I'm not altogether familiar with how to obtain them. I've been looking but I haven't yet stumbled upon the answer.

              Comment


                Originally posted by aialexander View Post
                Wow, I feel really silly for not seeing that. Thank you for your help. I won't be able to take your advice for a couple days but I'm sure I'll have better results once I try it out.

                This may seem like a dumb question, but how do I go about setting up the left and right hand bone set?
                Just select the node (Two-Bone IK or Transform (Modify) Bone as the case may be) and in the Details panel for it, it will have a drop down to specify the bone.
                Storyteller - An immersive VR audiobook player

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

                Comment


                  I'll be updating my little tutorial there with a better setup, using FABRIK nodes. I've noticed they are far more stable than the two-bone setup.

                  I'm working on getting it so that it has a FABRIK chain from the head to the spine, with the target being the component space pos of the DK2. That should allow for leaning over/down to extend your reach (making it easy to grab things without also having to reposition with the controller every time, or things above or below you). Eventually I want to set up further IK controls for crouching down under certain conditions (rather than bending at the waist) as well as moving slightly if the DK2 target can't be met (i.e., the player took a step IRL).

                  I had some really intense moments in my game while being able to control the hands, and expecting to look down and see RL, but instead seeing the character and game. Being able to reach out and grab things is amazing.
                  Storyteller - An immersive VR audiobook player

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

                  Comment


                    Originally posted by n00854180t View Post
                    I'll be updating my little tutorial there with a better setup, using FABRIK nodes. I've noticed they are far more stable than the two-bone setup.

                    I'm working on getting it so that it has a FABRIK chain from the head to the spine, with the target being the component space pos of the DK2. That should allow for leaning over/down to extend your reach (making it easy to grab things without also having to reposition with the controller every time, or things above or below you). Eventually I want to set up further IK controls for crouching down under certain conditions (rather than bending at the waist) as well as moving slightly if the DK2 target can't be met (i.e., the player took a step IRL).

                    I had some really intense moments in my game while being able to control the hands, and expecting to look down and see RL, but instead seeing the character and game. Being able to reach out and grab things is amazing.
                    Ooh that sounds awesome, let me know how you get along with FABRIK, never had the chance to mess with it myself, but this might make overall displacement/leaning code cleaner. So far I've just used bone rotations to create the shoulder rolling and head to body displacement, if you do all those rotations before you do the IK, the IK will adjust to the new sum of all the bone rotations.

                    For me, 1:1 hand control and grabbing things/ledges transforms the experience from a game into a VR world. The challenge is to build upon that and make the interaction feel natural, even with limitation we currently have (no haptic feedback, no leg motion in casual experience/etc). Quite a lot of new input research still needed in this area. Exciting times!
                    Plugins: Node.js - TensorFlow - Socket.io Client - ZipUtility - Leap Motion - Hydra - Myo - RealSense

                    Comment


                      Originally posted by n00854180t View Post
                      Just select the node (Two-Bone IK or Transform (Modify) Bone as the case may be) and in the Details panel for it, it will have a drop down to specify the bone.
                      Oh I see, okay, I will be sure to check there in the future. Again, thanks for all the help you've given me so far. I really do appreciate it! I can't wait to check out your FABRIK tutorial!

                      Comment


                        Originally posted by aialexander View Post
                        Oh I see, okay, I will be sure to check there in the future. Again, thanks for all the help you've given me so far. I really do appreciate it! I can't wait to check out your FABRIK tutorial!
                        THe TL;DR of it is to just replace the two bone IK nodes with a fabric node, and do a Make Transform (plug in the position and rotation of the hydra per hand). Set the chain tip to be the hand, the root to be the upper arm.

                        Then set the rotation to "copy target rotation" - that makes it so you don't need the "Transform (Modify) Bone" nodes.

                        Also multiply the position of the hydra by 0.5, no idea why that works but it does (may or may not work with the regular setup).
                        Storyteller - An immersive VR audiobook player

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

                        Comment


                          Awesome! I'll give that a shot when I get a chance tomorrow! I'll be sure to let you know if I have any other questions!

                          Comment


                            @Getnamo or anyone else that's tried, have you had any luck getting the HMD position? I tried and get 0,0,0 always, even when positional tracking is definitely working. I'm trying to replicate the Couch Knights setup, but without any real luck, as without the HMD position it doesn't actually do anything but give you the normal non-HMD camera transform.
                            Storyteller - An immersive VR audiobook player

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

                            Comment


                              @n00854180t I have managed to replicate the action you are talking about. when you lean left, right, back, forward, The upper body follows. I'm at work right now but i will post a screenshot when I get back.

                              @Getnamo Do you update your plugins for preview builds of UE4. I only ask because now that 4.5 preview is available I wanted to try it out.
                              Last edited by Mrob76u; 10-07-2014, 05:30 AM.
                              Stygian Abyss Demo VR Remake

                              http://mrob76u.wordpress.com/

                              Comment


                                Originally posted by n00854180t View Post
                                @Getnamo or anyone else that's tried, have you had any luck getting the HMD position? I tried and get 0,0,0 always, even when positional tracking is definitely working. I'm trying to replicate the Couch Knights setup, but without any real luck, as without the HMD position it doesn't actually do anything but give you the normal non-HMD camera transform.
                                It will work but remember that you need to launch standalone and you require the app to go fullscreen before it reports the position, otherwise as far as UE4 is concerned the HMD is off.

                                Originally posted by Mrob76u
                                @Getnamo Do you update your plugins for preview builds of UE4. I only ask because now that 4.5 preview is available I wanted to try it out.
                                I don't update to preview builds in order to make the plugin upkeep manageable but it would be trivial to recompile it yourself.
                                1. Create an empty/template 4.5 project, add some code (e.g. empty pawn class).
                                2. Drag the 4.4 plugin into your template project
                                3. Right click your uproject and select generate visual studio project files, this will add the plugin to your solution.
                                4. Open your solution in Visual Studio, F7 to Compile.
                                5. Copy the 4.5 compiled plugin back to the project you wish to use it for (can be without code).


                                if you wanted to do this on an already existing project with 4.4 plugin then:
                                1. Ensure you project has code, add dummy class if needed.
                                2. Find your project .uproject and right click -> switch Unreal Engine version
                                3. (Optional if correctly configured) Right click your uproject and select generate visual studio project files, this will ensure the solution is up to date.
                                4. Open your solution in Visual Studio, F7 to Compile.


                                Feel free to make a pull request with the compiled version on github, if it works when 4.5 comes out ill merge it to master.
                                Last edited by getnamo; 10-07-2014, 08:12 AM.
                                Plugins: Node.js - TensorFlow - Socket.io Client - ZipUtility - Leap Motion - Hydra - Myo - RealSense

                                Comment

                                Working...
                                X