Announcement

Collapse
No announcement yet.

VR Expansion Plugin

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

    Originally posted by mordentral View Post

    Oh, forgot, you are using a camera, I was thinking multiplayer instead of local for some reason.

    You don't want to be doing that, currently you'll want to be using a scene capture component and mirroring that to the window instead for the 2D pawn.

    The camera manager and viewport rendering code is all intermixed with the stereo checks, so you want to use the mirror mode right now, which obviously limits UMG at the moment, I was looking into rendering UMG manually to that because overriding everything to get it to work with a normal camera isn't feasible in a plugin currently (and I assume is also already on Epics list of things to do).

    Basically when you turn stereo mode on for the VR player, it turns it on for everything currently, and when stereo mode is on the view rot is locked in the camera manager and everything is going to render for it.


    TL;DR: Use scene capture component and mirror to spectator screen, draw UMG texture either from Widget component or using the same render to texture code to the screen.
    Thanks for this description and I'm sorry to be a pain. I'm aware of the complications with the 2d pawn display and that I would have to do something like you describe to sort out the spectator screen for the 2d pawn. I was going to look at your camcorder code for this.
    However I'm not at that stage yet... When I play as a VR pawn I can see the 2d pawn has spawned in the world (and I can control it with a gamepad), but the VR replicated camera component for the 2d pawn still follows the HMD rotations despite being flagged not to. The effect of this is that all its children (head box, name text) are locked to the HMD rotations on the 2d pawn. The Parent relative component acts oddly too (The body mesh is affected by HMD rotation.)
    Does this mean that I need to have a distinct FPS pawn class that is only used for local multiplayer? Replacing the VR replicated camera and parent relative components with scene components that the HMD cannot affect? Is there no way for these components to respect the lock to HMD bools correctly in local multiplayer that has stereo on?

    Comment


      Originally posted by IslandPlaya View Post

      Thanks for this description and I'm sorry to be a pain. I'm aware of the complications with the 2d pawn display and that I would have to do something like you describe to sort out the spectator screen for the 2d pawn. I was going to look at your camcorder code for this.
      However I'm not at that stage yet... When I play as a VR pawn I can see the 2d pawn has spawned in the world (and I can control it with a gamepad), but the VR replicated camera component for the 2d pawn still follows the HMD rotations despite being flagged not to. The effect of this is that all its children (head box, name text) are locked to the HMD rotations on the 2d pawn. The Parent relative component acts oddly too (The body mesh is affected by HMD rotation.)
      Does this mean that I need to have a distinct FPS pawn class that is only used for local multiplayer? Replacing the VR replicated camera and parent relative components with scene components that the HMD cannot affect? Is there no way for these components to respect the lock to HMD bools correctly in local multiplayer that has stereo on?
      I am not even sure where the additional offset is coming in from, the only camera transform offset is in GetCameraView so aside from the late update (which is skipped) it shouldn't be moving. The only other one I know of is in the Editor viewport class and that shouldn't be running in a game view. I'd have to package one to test with.

      Regardless you don't even want the camera in local currently, its just an extra component at that point. Also being a FPS setup you don't need a parent relative component because you can just hang mesh on the capsule.

      The FPS pawn is mostly for testing, any real setup with a first person pawn should use a normal character to avoid overhead anyway.


      Consider supporting me on patreon

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

      Comment


        Originally posted by mordentral View Post

        I am not even sure where the additional offset is coming in from, the only camera transform offset is in GetCameraView so aside from the late update (which is skipped) it shouldn't be moving. The only other one I know of is in the Editor viewport class and that shouldn't be running in a game view. I'd have to package one to test with.

        Regardless you don't even want the camera in local currently, its just an extra component at that point. Also being a FPS setup you don't need a parent relative component because you can just hang mesh on the capsule.

        The FPS pawn is mostly for testing, any real setup with a first person pawn should use a normal character to avoid overhead anyway.
        Yes, it's a bit strange what is going on. I'll take your advice and fashion a replacement FPS or 3rd person pawn without the VR plugin components. That should solve it and will be more efficient as you say.
        Many thanks.

        Comment


          Hey there,
          I'm a bit new to the VR side of things so apologies if any of the questions are pretty silly, still trying to work out some of the kinks. I got the VRTemplate and VRPlugin working originally just fine (I'm using engine version 4.17.2). I've been trying to add the plugin to a new project though and it doesn't seem to want to work at all. I've followed all the steps on the wiki and re-read it a bunch of times. I couldn't download the plugin for a specific commit because i can't seem to find the branch that works for 4.17.2, and on the downloads section of the wiki 4.17 seems to be the only version missing? So i've just been trying to use the pre-built binary, and i've followed the steps in the step by step installation guide, everything works fine until i need to generate the Visual Studio project files, the window just opens and closes in 2 seconds and nothing happens. I'm not really sure if i've done something wrong, but it did work before and i've followed all the same steps, so i'm not really sure whats gone wrong?

          Another question i had though, for the project i'm trying to make, its essentially an ArchViz project and i pretty much just wanted to use the door/mirror and controller setups that are in the template, i've just been trial-and-erroring how they work to try understand them, but would you recommend adding the plugin to the archvis project and setting everything up manually, or would a better process just be using the VRTemplate and then adding in the assets into that project instead? I'm not sure if that makes sense, but it seems like the template has a lot of stuff pre-set up to make it playable quickly and easily, and im curious if it would be better to work on the template rather than manually adding the examples in the template into a separate project piece by piece? Any help would be super appreciated

          Comment


            Originally posted by nathangadd View Post
            and on the downloads section of the wiki 4.17 seems to be the only version missing?

            Another question i had though, for the project i'm trying to make, its essentially an ArchViz project and i pretty much just wanted to use the door/mirror and controller setups that are in the template, i've just been trial-and-erroring how they work to try understand them, but would you recommend adding the plugin to the archvis project and setting everything up manually, or would a better process just be using the VRTemplate and then adding in the assets into that project instead? I'm not sure if that makes sense, but it seems like the template has a lot of stuff pre-set up to make it playable quickly and easily, and im curious if it would be better to work on the template rather than manually adding the examples in the template into a separate project piece by piece? Any help would be super appreciated
            4.17 is the current main build of the engine, so the Master branch is 4.17. I only name and lock the plugin to branches when an engine version is outdated so that there is legacy support. When 4.18 comes out master becomes 4.17 and 4.18 beta becomes master branch.


            For archvis the character setup is likely overly complicated, a simple trace and GripObjectByInterface / DropObjectByInterface pickup system would so. Starting with the template there would be a lot of things that are not needed in the character. That being said.....it doesn't really matter, if you aren't using all of the implemented things it doesn't hurt anything, and then you also have the direct reference for if you want to add it back in later.


            Consider supporting me on patreon

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

            Comment


              Originally posted by mordentral View Post

              4.17 is the current main build of the engine, so the Master branch is 4.17. I only name and lock the plugin to branches when an engine version is outdated so that there is legacy support. When 4.18 comes out master becomes 4.17 and 4.18 beta becomes master branch.


              For archvis the character setup is likely overly complicated, a simple trace and GripObjectByInterface / DropObjectByInterface pickup system would so. Starting with the template there would be a lot of things that are not needed in the character. That being said.....it doesn't really matter, if you aren't using all of the implemented things it doesn't hurt anything, and then you also have the direct reference for if you want to add it back in later.
              Thanks for the help Now that i know i have the right plugin file though, i still appear to be getting the same error as before, although im not actually entirely sure if it's making a difference though as i'm not too sure what files the plugin adds. Everything works perfectly until Step 10 in the wiki guide, when i try generate the project files, in the log i get "Error: Couldn't find module rules file for module 'GPureSDK'", the generate window just opens and closes very quickly and no .sln file gets generated (which is a bit weird because when i tried this before, everything just worked from the get-go). If i change the engine version of the project file to 4.16 it seems to work though, which is also weird because i've definitely put in the plugin files from the Master branch of the plugins now. If i open up the project in unreal though, the plugin is listed under installed, and the C++ classes folders are there, so has it actually worked or is something still wrong?

              Comment


                Originally posted by nathangadd View Post

                Thanks for the help Now that i know i have the right plugin file though, i still appear to be getting the same error as before, although im not actually entirely sure if it's making a difference though as i'm not too sure what files the plugin adds. Everything works perfectly until Step 10 in the wiki guide, when i try generate the project files, in the log i get "Error: Couldn't find module rules file for module 'GPureSDK'", the generate window just opens and closes very quickly and no .sln file gets generated (which is a bit weird because when i tried this before, everything just worked from the get-go). If i change the engine version of the project file to 4.16 it seems to work though, which is also weird because i've definitely put in the plugin files from the Master branch of the plugins now. If i open up the project in unreal though, the plugin is listed under installed, and the C++ classes folders are there, so has it actually worked or is something still wrong?
                GPureSDK? I don't think that is even a default module.... No idea on that one but its not plugin related.


                Consider supporting me on patreon

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

                Comment


                  So i've managed to get it all up and running, been making my way through the template and i'm a bit stuck/encountered an error. I've been trying to make a sliding door by using the same principles as the drawer with interaction, but the problem applies to the drawer with physics too. The sliding door has 2 different sides, one moves left and one moves right, so one door needs to go on X of the linear limits from 0 to 100 say, and the other needs to go from 0 to -100, the first door works perfectly as intended, but the second door just teleports to its end position as soon as you click rather than being gripped and dragged. It's possible to recreate this issue on the drawer too, just change the max linear translation from its current value of 40 to -40. Is there any way around this?

                  Comment


                    Originally posted by nathangadd View Post
                    So i've managed to get it all up and running, been making my way through the template and i'm a bit stuck/encountered an error. I've been trying to make a sliding door by using the same principles as the drawer with interaction, but the problem applies to the drawer with physics too. The sliding door has 2 different sides, one moves left and one moves right, so one door needs to go on X of the linear limits from 0 to 100 say, and the other needs to go from 0 to -100, the first door works perfectly as intended, but the second door just teleports to its end position as soon as you click rather than being gripped and dragged. It's possible to recreate this issue on the drawer too, just change the max linear translation from its current value of 40 to -40. Is there any way around this?
                    Max linear translation is for forward in space, min linear is for backward.

                    Naming convention may be a bit off, but in the second doors case you would set Min X to 100.


                    Also the new VRSlider component would probably do this better unless you want the physics type that can be blocked by things. It auto sets its initial location and works in a more stable manner, though I had to fix it 2 days ago so you would want to update if your version is older than that.


                    Consider supporting me on patreon

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

                    Comment


                      Pushed a commit to the plugin repository

                      Template changes
                      Code:
                      Fixed a teleport controller bug with moving it too quickly and it ignoring the navigation mesh, this is a problem with Epics template setup that I copied over for people, so be warned if using their default teleport setup.
                      
                      Added an option to the laser beam on the teleport controller to use smoothed (wobbly) motion like the VREditor uses (see below in plugin notes)
                      Code:
                      Fixed min distance clamping with the vr slider component (oops).   
                      Also added CurrentSliderProgress variable that is calculated during movement.   
                      Ranges from 0.0 - 1.0 with 1.0 being 100% and 0 being 0%, also works for along the spline  
                      component it is following.   
                      Added SetSplineComponentToFollow function to either add or clear the follow spline.  
                      
                      Fixed a bug with the VRStereoWidget where in packaged builds the compiler was resolving to the wrong namespace and not using my custom scene proxy.   
                      
                      
                      Added Euro Low Pass Filter to the plugin (same on that Epic is using with the VR Editor  
                      for their laser beam smoothing). It has ResetEuroFilter and RunEuroFilterSmoothing nodes  
                      in the VR Expansion Library to control it (or in c++ you can directly call the functions)  
                      
                      Also added an auto arc calculation node to the VR Expansion Function Library so that the  
                      arc calculation and setting is faster and clean and is the same as the VR Editor.  
                      
                      smoothed "wobble" beams.  I normally wouldn't directly port things over, however I know that people would want the   
                      same behavior if possible so that they have consistancy.
                      
                      Also removed a silly check left over from copying code in the VRBaseCharacter.  
                      It likely had no effect but it should be removed.

                      I'll note, I had added and then removed some classes for clickable UMG widgets in the spectator overlay screen, while I managed eventually to get them functional the implementation didn't feel good enough to really keep it going considering that I assume Epic will have to add it in as a base feature soon. This actually took up a lot of my time this week trying different workarounds and potential methods for doing it.

                      What I had finally settled on what a new container widget that acted like their RetainerWidget and drew all child widgets to a render target but kept its in viewport collision intact, this functioned, but the amount of little hacks I had to do for things was too much for me to consider it worth keeping.

                      Sadly without engine source changes it just wouldn't hit what I would consider performant and I didn't want to make the spectator screen an additional frame behind in rendering (from the texture copy since the rendering order was wrong).



                      *Edit* I'll re-package the pre-compiled binaries tonight, its due
                      Last edited by mordentral; 10-13-2017, 03:45 PM.


                      Consider supporting me on patreon

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

                      Comment


                        Hi mordentral,
                        First of all, amazing work. It really brings unreal to the mainstream. This made it very easy for me to customize my experience.

                        Everything works great for me, i downloaded the example template and used that as a base. I also went in to try and change the name of the game (Change filenames, sources folder filenames - replaced with game name, and DefaultEngine.ini URL setting).

                        I did this and finished creating the entire package. Took 4 days. I packaged the product, and it was successful.

                        However, when i play the packaged product, i get an error saying the the 'module VRExpPluginExample could not be found. Please ensure that this module exists and that it is compiled.'.

                        Im guessing i omitted a change of name somewhere else where i needed to. So i go in and look for references to the example game name. The only one i found was this in DefaultEngine.ini-
                        [/Script/Engine.Engine]
                        +ActiveGameNameRedirects=(OldGameName="TP_VirtualRealityBP",NewGameName="/Script/VRExpPluginExample")
                        +ActiveGameNameRedirects=(OldGameName="/Script/TP_VirtualRealityBP",NewGameName="/Script/VRExpPluginExample")

                        I removed this, built solution, etc etc, did a lot of trying to figure it out, but i haven't gotten it working. After a VS soltuion build, the editor starts throwing errors w.r.t VRExpPluginExample which dont go away by regenerating the sln or rebuilding solution after deleting all redundancies.

                        Then i went back to rename everything to the plugin name, and it works!

                        So my question to you is, how can i change the game name without these issues popping up. Now that im reading it again, it was a very long question.



                        Comment


                          Originally posted by Hereafter View Post
                          You likely missed changing VREXPPLUGINEXAMPLE_API to NEWNAME_API in the "EmptyClassForProject.h" file. I use that auto include file for source tests.

                          Another potential place is inside of the .UProject itself, it declares the module in there and you have to rename it.


                          Consider supporting me on patreon

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

                          Comment


                            Wow. That worked. Very silly of me to have missed that. Thank you!

                            Comment


                              Originally posted by Hereafter View Post
                              Wow. That worked. Very silly of me to have missed that. Thank you!
                              mmmmm, to help people out I wrote a UE4 Project renamer C# console program today and added it to the template project directory.

                              My C# is very rusty but it works and should help people trying to do this in the future.


                              Consider supporting me on patreon

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

                              Comment


                                Sorry if this question has been asked multiple times or not, but is it possible to use this plugin without any C++ knowledge and only Blueprint? Going to start a new VR project and this plugin would be exactly what I would need for it!

                                Comment

                                Working...
                                X