Announcement

Collapse
No announcement yet.

VR Expansion Plugin

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

    Originally posted by kusokuso1 View Post
    Sorry to interrupt.

    Building a Master zip downloaded almost 24 hours ago; I created a SimpleVRCharacter class and added a skeletal mesh component to the left motion controller.

    Fsr, the skeletal mesh looks like it's pinned to the bottom of the collision capsule.
    Here's the parent relationship of the Simple VR Character I'm having probs with:

    Here's a pic of a ishtty pawn I made from scratch that didn't have this problem:

    If I look down I can see the skeletal mesh. It's X and Y match that of the HMD, but its Z is locked at what probably is the bottom of the collision capsule.

    I Made sure the No Collision Preset was set on the skeletal mesh. I also turned off Collision on the Left Motion Controller.

    Not sure if it matters, but I'm on Vive.

    **Edit**
    Even after removing the skel. mesh, printing hand position on event tick is outputting pos: 0,0,0.

    I'm spawning and possessing the VRSimple at Player Start in the level blueprint.

    Verified VR character bp is set as default pawn class in game mode, and the same game mode is specified in Project Map/Mode and World Settings.

    At a certain point, when I thought this issue got fixed by restarting the project, I verified "get Hand pos and rot" was returning accurate values.
    Are you testing this IN vr? or out of it? The Simplecharacter offsets the controllers by the HMD's location as the HMD directly drives the characters movements. The controllers shouldn't be literally at your feet X/Y though unless they are not tracking or you are not in VR and left them at 0,0,0. They SHOULD be at your feet level in Z as that is where they are when on the floor.

    The VRCharacter on the other hand leaves them relative to the actor itself, not the HMD. Either way you shouldn't ever see them at 0,0,0 unless tracking isn't working.

    Also if you are expecting them to be waist height on the collision capsule, they won't be, since roomscales "base" is your feet I have the controllers and HMD relative to the "feet" of the character, not the waist. I understand that the standard Pawn setup goes off of the waist / center point of the pawn capsule as that is considered 0,0,0 for it, but that makes less sense when directly driving a character.



    *Edit* Also might want to make sure that you are setting the tracking frame to floor, not eye level.
    Last edited by mordentral; 04-12-2017, 09:30 AM.


    Consider supporting me on patreon

    My Open source tools and plugins
    Advanced Sessions Plugin
    VR Expansion Plugin

    Comment


      Pushed a new commit to the plugin / template and uploaded new binaries

      Plugin Changes
      Code:
      Added 7 new tracking index's to the SteamVR Tracking Index Enum.
      
      Exposed bOffsetByHMD to blueprint. Offsets the controllers by the HMDs relative location in the actor, this is useful for if
      you are doing a setup like the SimpleVRCharacter.
      
      Defaulted bOffsetByHMD to false in motion controllers so people directly using them won't have the wrong setting on default.
      
      Added a new blueprint node to the VRExpansionLibrary
      
      * RotateAroundPivot
      Takes an input location / rotation / pivot offset / DeltaRotationRequested
      Returns the new location / rotation to use that provides that delta rotation around the given pivot.
      Template Changes
      Code:
      Added a RotateCharacter function to the VRCharacter to show how to use
      the new blueprint node to rotate the character around the HMD's relative position (for things like smooth / snap turning).


      Consider supporting me on patreon

      My Open source tools and plugins
      Advanced Sessions Plugin
      VR Expansion Plugin

      Comment


        Thanks for the help, mordentral!

        Thanks for explaining the difference between VRCharacter and Simple. I didn't notice/deduce that from the info on them at bitbucket.

        Originally posted by mordentral View Post
        Are you testing this IN vr? or out of it?
        I'm testing it in VR.

        Originally posted by mordentral View Post
        The VRCharacter on the other hand leaves them relative to the actor itself, not the HMD. Either way you shouldn't ever see them at 0,0,0 unless tracking isn't working.
        I'm printing the "Out Position" off the Get Hand Position and Orientation node (one for Left and one for Right).

        According to the Steam VR "status window", the motion controllers are properly tracked. Here's a pic to show it:
        Click image for larger version

Name:	Tracked.png
Views:	1
Size:	619.0 KB
ID:	1126393

        Originally posted by mordentral View Post
        *Edit* Also might want to make sure that you are setting the tracking frame to floor, not eye level.
        Where might this tracking frame setting be? I left everything at default. The only thing I changed with the SimpleVRCharacter was add the skeletal meshes along with some new vars and a function (all they do so far is read controller button presses.)

        I launched the project today w/ the skeletal mesh removed and it was still reporting 0,0,0. I then added the skeletal mesh again (without restarting and without specifying an animBP) and it showed up (2 of them actually, one static and one parented to the motion controller.) wtf lol

        I suspect migrating an AnimBP for the skel mesh in question is the cause of the issues I'm having. Also, I'm using blender only. UE4 won't import anim changes from fbxes exported from Blender anymore, so I've been having to delete the skel mesh and all anims, reimport the entire thing and hook up all the anims in the AnimBP anytime I make a change to 1 anim. Numerous times I've retargeted the same exact skeleton to that migrated AnimBP.

        I'm going to create a new project, download the latest plugin, and remake everything from scratch.
        Last edited by kusokuso1; 04-12-2017, 10:23 PM.

        Comment


          Originally posted by mordentral View Post
          The TrackedDevice component actually uses the same function to get the position as you were using in blueprint, the difference being that I also apply the missing late update transform as well.

          Also when testing I was downloading the mesh for the tracker directly from SteamVR using the node I made for that, so the scale should have been exact.


          What kind of offset are you seeing? Like offset from HMD? If you are using the SimpleCharacter I could see that being an issue as I don't expose a boolean that fixes that to blueprint (come to think of it I should probably expose that).

          I'll add additional tracker index's to the enum, but would like a description of the offset you have.
          I am using SimpleCharacter. My setup is derived from SimpleVive_PawnCharacter in your template from early December. The offset is relative, and increases as I move the character away from the origin. Seems like a double transform thing.

          I have the "GripSteamVRTrackedDevice" components parented under the characters VRSceneComponent, though I also tried parenting under the root Capsule and still seeing a similar behavior.

          I haven't updated anything with SimpleCharacter since I implimented your plugin in beginning December because I haven't needed any of the new features yet.

          In order to use your new component I've just updated from 4.13 to 4.15 and updated to your latest released binary version of your plugin for 4.15. Maybe there is something important that would need updated from the December version I implimented to this latest version concerning SimpleCharacter?

          Everything else in my game is functioning as it was before the update however, so I am assuming all is ok with the character setup otherwise.

          Is there any way to move the trackers just like the controllers are setup with SimpleCharacter?
          The positioning of the controllers seem to work fine for SimpleCharacter.

          Scale and rotation seem fine for the trackers, it's just the double transform I get for location on the trackers that's the issue.

          I'm also disabling low latency updates on both controllers and trackers because my IK not being able to process from late updates.
          Last edited by MagicBots; 04-13-2017, 06:36 AM.

          Comment


            Sorry to barge in, Alltrueist. Just wanted to give an update on my issue.
            I remade the Project from scratch, using a VR character this time, and it worked perfect.

            I copied over some nodes (extremely simple nodes, like get/set character loc, forward vector, add force) from the effed project's character's event graph (and a function in it) and that issue returned immediately. Deleting those exact nodes didn't fix it.

            Though I compiled, I didn't save the project after adding them. Restarted the project, and the problem was still there. Motion controller locked at 0,0,0 world.

            Remade it from scratch again. And it's good.
            Tomorrow I'll set up the same nodes as in the effed proj. and see if the problem occurs.

            Comment


              Originally posted by alltrueist View Post
              I am using SimpleCharacter. My setup is derived from SimpleVive_PawnCharacter in your template from early December. The offset is relative, and increases as I move the character away from the origin. Seems like a double transform thing.

              I have the "GripSteamVRTrackedDevice" components parented under the characters VRSceneComponent, though I also tried parenting under the root Capsule and still seeing a similar behavior.

              I haven't updated anything with SimpleCharacter since I implimented your plugin in beginning December because I haven't needed any of the new features yet.

              In order to use your new component I've just updated from 4.13 to 4.15 and updated to your latest released binary version of your plugin for 4.15. Maybe there is something important that would need updated from the December version I implimented to this latest version concerning SimpleCharacter?

              Everything else in my game is functioning as it was before the update however, so I am assuming all is ok with the character setup otherwise.

              Is there any way to move the trackers just like the controllers are setup with SimpleCharacter?
              The positioning of the controllers seem to work fine for SimpleCharacter.

              Scale and rotation seem fine for the trackers, it's just the double transform I get for location on the trackers that's the issue.

              I'm also disabling low latency updates on both controllers and trackers because my IK not being able to process from late updates.
              Yeah ok, I exposed the boolean that deals with that yesterday as well as I figured it might be the problem.

              The simplecharacter doesn't keep the HMD at a relative position to the actors root, it moves the actors root WITH the hmd and keeps the HMD at X/Y 0,0,0. Due to this there is a boolean in the motion controllers bOffsetByHMD that offsets the tracking frame back by the HMDs position as otherwise they would have that offset you are talking about. (The VRCharacter doesn't do this so it defaults this boolean to false).

              Before yesterday this was a private variable to c++ because I was manually setting it on the default components on the simple character. However tracked devices are not default components and will have it defaulted to false.

              So with the new version (commit as of 4/12) you should be able to go in to the TrackedDevice and set bOffsetByHMD to true and get your correct transform on the tracked devices, as well as the 7 additional index's.


              I realized that people trying things like the simple character and only using my motion controllers would need that boolean exposed anyway, so its a good thing to have regardless.

              *Edit* Oh forgot to mention, pretty sure that the SteamVR driver rollback a day ago took away the new Index's of the trackers again. You'll want to be on the SteamVR Beta branch as it is still correct and is what the main will be once they fix the oculus issue.
              Last edited by mordentral; 04-13-2017, 10:04 AM.


              Consider supporting me on patreon

              My Open source tools and plugins
              Advanced Sessions Plugin
              VR Expansion Plugin

              Comment


                Originally posted by kusokuso1 View Post
                Sorry to barge in, Alltrueist. Just wanted to give an update on my issue.
                I remade the Project from scratch, using a VR character this time, and it worked perfect.

                I copied over some nodes (extremely simple nodes, like get/set character loc, forward vector, add force) from the effed project's character's event graph (and a function in it) and that issue returned immediately. Deleting those exact nodes didn't fix it.

                Though I compiled, I didn't save the project after adding them. Restarted the project, and the problem was still there. Motion controller locked at 0,0,0 world.

                Remade it from scratch again. And it's good.
                Tomorrow I'll set up the same nodes as in the effed proj. and see if the problem occurs.
                If you want to PM me a picture of the problem nodes I might be able to see a problem for you. But I will note that the Get Hand Position and Orientation is epics node and directly samples from the tracking data, it should NEVER show a zero vector unless tracking is turned off. Sounds like you have a console setting in those nodes or are using one of the oculus nodes with SteamVR and are messing up your SteamVR Plugin.


                Consider supporting me on patreon

                My Open source tools and plugins
                Advanced Sessions Plugin
                VR Expansion Plugin

                Comment


                  I've been digging around, but haven't had a ton of luck. Is there fast way to go back to "ghost" mode instead of pushing the world around with the body capsule? I thought just turning off collision on it would work, but it must be happening elsewhere. Thanks!

                  Comment


                    Originally posted by mordentral View Post
                    If you want to PM me a picture of the problem nodes I might be able to see a problem for you. But I will note that the Get Hand Position and Orientation is epics node and directly samples from the tracking data, it should NEVER show a zero vector unless tracking is turned off. Sounds like you have a console setting in those nodes or are using one of the oculus nodes with SteamVR and are messing up your SteamVR Plugin.
                    Afaik, I'm only using that Epics node, and the motion controller (L/R) Events. I've never manually entered any console settings. Aside from the skeletal mesh I added to the left motion controller, Changing the Renderer to Forward Shading/MSAAx2, and setting the Project/Settings Game Mode to mine (which only has the default pawn setting changed to that of my character), everything is default.

                    I can send/upload anything you need.

                    Just found out something new, that may suggest it's not related to copying nodes.

                    I remade the project two times now. When I initially tried to copy over nodes from the broken project to the good one I had both projects open at the same time.

                    This time, I verified the newest project was still good (no other projects were running). With it still open, I opened the broken project (thinking I could reference the node setup it and manually do the same in the good one).

                    Upon opening the broken project, the good one closed out (with no error).

                    I closed the broken one and opened the good one. And it was bad. I'll try to delete the original bad project. And see if the problem rectifies. I'll PM you a link to the whole project or something more specific if you want.

                    (I should probably note that I never copied any of these 3 projects. I made'em each from scratch. Most variable, blueprint, mesh and animation names are the same though.)
                    Last edited by kusokuso1; 04-13-2017, 09:44 PM.

                    Comment


                      Originally posted by pixelvspixel View Post
                      I've been digging around, but haven't had a ton of luck. Is there fast way to go back to "ghost" mode instead of pushing the world around with the body capsule? I thought just turning off collision on it would work, but it must be happening elsewhere. Thanks!
                      Setting the collision of the capsule component manually should work. You can also specify a separate collision channel to use while walking in real space using WalkingCollisionOverride.

                      Comment


                        Originally posted by pixelvspixel View Post
                        I've been digging around, but haven't had a ton of luck. Is there fast way to go back to "ghost" mode instead of pushing the world around with the body capsule? I thought just turning off collision on it would work, but it must be happening elsewhere. Thanks!
                        Turning off collision with it actually would work, currently it is only set to collide with the static geometry. However if you do it through the collision route you'll need to place the floor on its own collision channel and leave it enabled so that it can still detect the floor plane (well that or run in flying mode I guess).

                        If you are using the VRCharacter however there is an alternative, you can enable bbUseWalkingCollisionOverride on the root component and then set the WalkingCollisionOverride on the root component to a new object channel that you make. This way when just "walking" around it will use that new collision channel that you can have things react to differently, however when using a locomotion option like slider or RIP it will collide with geometry again preventing clipping through walls (simple character does not support this option).

                        If you don't care about the full movement replication of a character and gravity and all of that though you can also just use the motion controllers / camera / parent relative attachment in your own pawn.


                        Consider supporting me on patreon

                        My Open source tools and plugins
                        Advanced Sessions Plugin
                        VR Expansion Plugin

                        Comment


                          Originally posted by Draxus View Post
                          Setting the collision of the capsule component manually should work. You can also specify a separate collision channel to use while walking in real space using WalkingCollisionOverride.
                          ****, beat to an answer in my own thread! thanks man, that is actually appreciated.


                          *Edit*

                          Pushed a commit to the plugin and template tonight

                          Plugin
                          Code:
                          Finally got around to fixing the coordinate system for the OpenVR render models
                          
                          They switched from a standard LeftHanded to a backwards left handed awhile ago
                          and I just rotated the mesh and waited to see if they would ever go back.
                          
                          Its been months and they haven't reverted (I forgot) so I just fixed the code and un rotated
                          the procedural meshes in the template now.
                          
                          Also I am now pre-reserving vertice/indice/uv buffers now to help speed up extraction a bit.
                          Template
                          Code:
                          Also added a new low end velocity smoothed value to RIP motion so that the cut off after ceasing motion is faster.
                          
                          Fix for exclusive nativization with the sessions plugin
                          
                          Cannot fix inclusive as it crashes due to an engine bug slated to be
                          fixed in 4.15.2 and 4.16
                          Last edited by mordentral; 04-13-2017, 09:54 PM.


                          Consider supporting me on patreon

                          My Open source tools and plugins
                          Advanced Sessions Plugin
                          VR Expansion Plugin

                          Comment


                            Originally posted by kusokuso1 View Post
                            Snip
                            Do me a favor, try downloading the template for this plugin, compiling it, and see if you have the same problems. It is a known good project so it can help filter out problems with your projects if it works for you.


                            Consider supporting me on patreon

                            My Open source tools and plugins
                            Advanced Sessions Plugin
                            VR Expansion Plugin

                            Comment


                              Got it. I'll do that right now.
                              Do you think I should make everything from scratch again in the template project for the plugin?

                              That is, no migrating assets, copying nodes from the broken project, and not having the broken project open at the same time?

                              *Edit*
                              ---------
                              Downloaded the VR template zip for this plugin (https://bitbucket.org/mordentral/vrexppluginexample)

                              Built it and PIE'd. (Just made sure hands were getting tracked and grabbing was working.)

                              Stopped PIE.

                              Opened my broken project.

                              After it finished loading, I tried to PIE on the VREx.plugin template again and found out hands were broke. (Actually, the left hand skeletal mesh from the broken project was taking the place of both hands in the new project, and were locked at 0,0,0). I never copied this skeletal mesh over to the VREx.plugin template. No changes were made to the ex. project whatsoever.

                              Shutdown the broken project, then the VREx.plugin template project.

                              Relaunched the VREx.plugin template project

                              Steam Motion controllers are now taking the place of the hand skeletal meshes and are getting tracked. UI widget is visible on the MCs, but buttons do nothing.

                              I pm'd you a link to the bad project.
                              ---------
                              Last edited by kusokuso1; 04-14-2017, 12:57 AM.

                              Comment


                                Originally posted by mordentral View Post
                                Turning off collision with it actually would work, currently it is only set to collide with the static geometry. However if you do it through the collision route you'll need to place the floor on its own collision channel and leave it enabled so that it can still detect the floor plane (well that or run in flying mode I guess).

                                If you are using the VRCharacter however there is an alternative, you can enable bbUseWalkingCollisionOverride on the root component and then set the WalkingCollisionOverride on the root component to a new object channel that you make. This way when just "walking" around it will use that new collision channel that you can have things react to differently, however when using a locomotion option like slider or RIP it will collide with geometry again preventing clipping through walls (simple character does not support this option).

                                If you don't care about the full movement replication of a character and gravity and all of that though you can also just use the motion controllers / camera / parent relative attachment in your own pawn.

                                Perfect, WalkingCollisionOverride is what I was looking for. Man, I should get some sleep.

                                Comment

                                Working...
                                X