Announcement

Collapse
No announcement yet.

VR interaction project (open source)

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

    VR interaction project (open source)

    Hello world,

    I'm learning VR so I decided to recreate in UE4 the basic VR interactions like one can see in Oculus Home or SteamVR Home. That includes simple teleport and turn in place using thumbstick (without pressing), outline for objects that can be grabbed, laser pointer interaction, etc.

    I took the default UE4 VR project and started to add new features to it. It's a work in progress, so not everything is implemented yet. So far I implemented the teleportation, outlines and started laser pointer interaction. You can see the result so far in the video below:



    If you want to try, the project is available on github:

    https://github.com/inugames/basic-vr

    It's basically the default UE VR project template with some modifications. Modified parts are mostly in MotionControllerMap, MotionControllerPawn and BP_MotionController. Modified parts are all commented in orange color and prefixed with [BasicVR], so you can easily search for them.

    I only have Oculus Touch, so I'm not sure which controls are better for the Vive.

    I'll post here when I add some more features, so press Subscribe button above if you are interested.

    I hope you find the project useful!

    Edit: unfortunately I discovered that my eyes are not very VR friendly, so I don't doing anything VR anymore. But the project is opensource, so feel free to grab it and modify it as you wish!
    Last edited by scha; 09-30-2020, 06:09 AM.
    Modular Japanese HouseScaffold System
    Snap Plugin for EditorSnap Plugin for Games
    TwitterBlogYoutubeitch.io

    #2
    Update: laser pointer


    Laser pointer and the held object are stabilized using Dynamic Moving Average Rotation, which filters out the small shaking of the hand, so it's more easy to grab small objects at a distance.
    Last edited by scha; 12-27-2019, 12:41 PM.
    Modular Japanese HouseScaffold System
    Snap Plugin for EditorSnap Plugin for Games
    TwitterBlogYoutubeitch.io

    Comment


      #3
      Very thanks!

      Comment


        #4
        Thank you for doing this project. I downloaded it and tried it out. It works great and is a great addition to the standard VR pawn.

        I've been putting off learning how to implement Github and source control and wondered if I could add widget interaction and a VR specific video quality menu.

        I created a fork and am giving it a go. Thanks again!

        Comment


          #5
          Originally posted by GNVR_DEV View Post
          Thank you for doing this project. I downloaded it and tried it out. It works great and is a great addition to the standard VR pawn.

          I've been putting off learning how to implement Github and source control and wondered if I could add widget interaction and a VR specific video quality menu.

          I created a fork and am giving it a go. Thanks again!
          Hi there, I'm glad you like it!

          I'm looking to make a menu too right now, and I started with pause menu with just two buttons "Resume" and "Exit". I want to render the menu on top of everything and I want it to be world locked or tracker locked (not face locked), like pause menu in Robo Recall. I found 2 ways to make it and both have issues (at least with Oculus).

          First solution is to show a Widget Component directly. To show it on top of the scene I use a Transulucent material with depth test disabled. This is how Robo Recall do it, and it works pretty well, BUT! If you have TAA and you use it when the game is paused, then you have very ugly visual artifacts. There is a thread about the problem , they just disable anti aliasing when the menu is shown. Also, Robo recall don't have this problem because it uses MSAA and not TAA.

          Solution Nr.2 is to use stereo layers, like in this tutorial. With stereo layers the menu is much sharper and there is no artifacts on pause,
          BUT!! there is a problem too. With Oculus World/Tracker locked layers are always intersecting the world, if you face a wall in game your menu will be hidden behind it. And the face locked layer is always on top of the world, but it will move with your head, so the trick from the tutorial will not work.

          What I finally did is to use face locked stereo layer and then recalculate its relative transform on every tick so it will work as world locked. It works, just if you move your head quickly it gets a little bit stuck sometimes, but not much.

          I wish there was a better solution...

          I still have to add widget interaction and then I will put it on github
          Last edited by scha; 01-10-2020, 11:27 AM.
          Modular Japanese HouseScaffold System
          Snap Plugin for EditorSnap Plugin for Games
          TwitterBlogYoutubeitch.io

          Comment


            #6
            Nice work!

            Comment


              #7


              Added pause menu, it's shown when the menu button on the left controller is pressed.
              I decided to use the same approach as Robo Recall, using Widget Component directly, so I switched the project to forward rendering/msaa too. But the stereo layer implementation is provided too. Unfortunately, I didn't found yet how to show laser pointer on top of the face locked layer

              Github updated
              Last edited by scha; 01-11-2020, 12:50 PM.
              Modular Japanese HouseScaffold System
              Snap Plugin for EditorSnap Plugin for Games
              TwitterBlogYoutubeitch.io

              Comment


                #8
                Originally posted by Alex O View Post
                Nice work!
                Thank you Alex!
                Modular Japanese HouseScaffold System
                Snap Plugin for EditorSnap Plugin for Games
                TwitterBlogYoutubeitch.io

                Comment


                  #9
                  Update: added collision audio component, so when the cubes fall on the ground or collide there is a sound.



                  Heavily inspired by Robo Recall )
                  Sounds are mine, sorry for the quality, that's the first time I'm doing audio.

                  Another little change, there is a C++ function called SetCameraMovableDuringPause, this function sets UWorld->bIsCameraMoveableWhenPaused to "true". This helps with visual artifacts that appears on pause on umg menus if TAA is used.
                  Modular Japanese HouseScaffold System
                  Snap Plugin for EditorSnap Plugin for Games
                  TwitterBlogYoutubeitch.io

                  Comment


                    #10
                    Collision based animated fingers experiment

                    Modular Japanese HouseScaffold System
                    Snap Plugin for EditorSnap Plugin for Games
                    TwitterBlogYoutubeitch.io

                    Comment


                      #11
                      Originally posted by scha View Post
                      Hello world,

                      I'm learning VR so I decided to recreate in UE4 the basic VR interactions like one can see in Oculus Home or SteamVR Home. That includes simple teleport and turn in place using thumbstick (without pressing), outline for objects that can be grabbed, laser pointer interaction, etc.

                      I took the default UE4 VR project and started to add new features to it. It's a work in progress, so not everything is implemented yet. So far I implemented the teleportation, outlines and started laser pointer interaction. You can see the result so far in the video below:



                      If you want to try, the project is available on github:

                      https://github.com/inugames/basic-vr

                      It's basically the default UE VR project template with some modifications. Modified parts are mostly in MotionControllerMap, MotionControllerPawn and BP_MotionController. Modified parts are all commented in orange color and prefixed with [BasicVR], so you can easily search for them.

                      I only have Oculus Touch, so I'm not sure which controls are better for the Vive.

                      I'll post here when I add some more features, so press Subscribe button above if you are interested.

                      I hope you find the project useful!
                      Thanks for sharing this... Just started exploring VR with my quest and this will help alot.

                      Comment


                        #12
                        Originally posted by pbdarcey View Post

                        Thanks for sharing this... Just started exploring VR with my quest and this will help alot.
                        Same here, I got the Oculus Rift like 2 months ago, then bought the Quest too. Never used VR before. I wish I tried it sooner lol ))
                        Modular Japanese HouseScaffold System
                        Snap Plugin for EditorSnap Plugin for Games
                        TwitterBlogYoutubeitch.io

                        Comment


                          #13
                          thanks for sharing this great work ... it help me lo and can you add option of selecting objects with lasr and change the material using a menu ... thanks

                          Comment


                            #14
                            Hi, this project is awesome! Specially for beginners like me is a big start point in a project, so thank you so much!!!! This movements were what i was searching to achieve, but i was unable because i've started now in this world (very hard and new for me), coming from Archviz.
                            Now i'm newly stuck in my project and i have to ask your help, if you can.
                            I'm trying to move a collection of paintings inside a museum room (for now i use your "pickup cubes"), so i have to pick them up, move away from me (your laser picking is perfect for this) and when they are touching the wall i'd like to leave them attached to this, free to remove them or move in other positions, to see various installments of the paintings.
                            The problem, if i'm not wrong, is that when i pick up an object the physics simulation is off and so the collisions with the static meshes of the walls, making therefore disappearing paintings behind the walls.
                            Instead i need that paintings hitting the wall can detech collisions whit it and dispose (turning) according to the wall, in parallel, and then leave them in that position, but turning physics on when i leave them from the wall, letting them falling down and bounce on the floor.
                            I've seen that is possible to grab object with Physics Handles, but i don't know if it's possible to take objects from far with the laser and move them along this in this way.
                            So i ask you some advice on the best solution for this, hoping that i was clear in this explanation and sorry for the lenght of this post,
                            Thank you for your attention!!!

                            Comment


                              #15
                              Hi there, I'm really grateful for your work and providing it to everyones use! It is exactly what I was looking for in ages! Thanks again!

                              Comment

                              Working...
                              X