Announcement

Collapse
No announcement yet.

VR Expansion Plugin

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

    Originally posted by SlimeQ View Post
    Networked smooth turning: how to do it properly?

    I recently implemented snap turning using MovementActionSnapTurn and while I was in there I added a smooth turning option using the same function. This sort of works but it's extremely choppy. I see above that you recommended AddActorWorldRotationVR for non-networked scenarios, but what should be done in networked scenarios? I apologize if this is a nooby question. I'd imagine it's more or less the same as mouse control... but don't know enough about either system to make an informed decision here.

    Love the plugin by the way. I'm using it in my game Hailstorm VR, mainly for character movement and replication stuff. And for everything else, the code is a wonderful reference for my own.
    So I tracked down the cause, Characters FRepMovement structures default to ERotatorQuantization::ByteComponents.

    For smooth turning for this use you'll want to go in and set them to

    ReplicatedMovement.RotationQuantizationLevel = ERotatorQuantization::ShortComponents;

    Byte values don't have the granularity for smooth turning like that. And it is made worse with the root offset that VR has.

    Regardless you can also set it in blueprints in the character BP here:



    I am hesistant to set it to the default setting for characters due to the fact that unless you are specifically doing smooth turning it shouldn't be an issue.

    *Edit* actually pitch and roll should almost always be zero anyway, so they won't rep besides the bitflag. I'll probably default it since its a one byte cost then.


    Also i'll add your game to the using list if you don't mind
    Last edited by mordentral; 02-08-2018, 11:00 AM.


    Consider supporting me on patreon

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

    Comment


      Originally posted by mordentral View Post

      So I tracked down the cause, Characters FRepMovement structures default to ERotatorQuantization::ByteComponents.

      For smooth turning for this use you'll want to go in and set them to

      ReplicatedMovement.RotationQuantizationLevel = ERotatorQuantization::ShortComponents;

      Byte values don't have the granularity for smooth turning like that. And it is made worse with the root offset that VR has.

      Regardless you can also set it in blueprints in the character BP here:



      I am hesistant to set it to the default setting for characters due to the fact that unless you are specifically doing smooth turning it shouldn't be an issue.

      *Edit* actually pitch and roll should almost always be zero anyway, so they won't rep besides the bitflag. I'll probably default it since its a one byte cost then.


      Also i'll add your game to the using list if you don't mind
      I actually already had rotation quantization set to short. It's possible this is just a frame rate issue, but it does seem a bit choppier than the standard mouse movement. That being said, mouse movement is also pretty choppy.

      Here is a video of me comparing the smooth turn to the mouse input (which is simply setting world rot on the camera): https://youtu.be/nnYizTsCfls

      The "choppiness" I'm referring to is the apparent duplication of objects during turning. It is very noticeable in VR. I don't notice this nearly as much during lateral movement, though it is still present.

      It's very possible that this is outside of the scope of the plugin, but I do not recall observing this while driving the car in the template project. This leads me to suspect it has something to do with the VR Camera or something... but I really have no idea.

      EDIT: just tried Epic's FPS template, it gets more or less the same effect when motion blur is disabled. Unfortunate
      Last edited by SlimeQ; 02-08-2018, 02:23 PM.

      Comment


        Originally posted by SlimeQ View Post

        I actually already had rotation quantization set to short. It's possible this is just a frame rate issue, but it does seem a bit choppier than the standard mouse movement. That being said, mouse movement is also pretty choppy.

        Here is a video of me comparing the smooth turn to the mouse input (which is simply setting world rot on the camera): https://youtu.be/nnYizTsCfls

        The "choppiness" I'm referring to is the apparent duplication of objects during turning. It is very noticeable in VR. I don't notice this nearly as much during lateral movement, though it is still present.

        It's very possible that this is outside of the scope of the plugin, but I do not recall observing this while driving the car in the template project. This leads me to suspect it has something to do with the VR Camera or something... but I really have no idea.
        Oh, that is an entirely different thing, and no it isn't caused by the plugin. It should be more apparent with fast jerky side to side movements when using TAA (actual ghosting) or at low framerates (jerky).

        Lateral movements don't actually adjust the apparent scene as much as rotational ones do, and mouse / direct rotation can be significantly faster than manually turning in VR. I assume you are driving the rotation by DeltaTime too, as you would need to do that.

        The car doesn't turn straight on axis, it turns over time smoothly, also while in the car you are still using the same camera......


        If it was VR specifically related you wouldn't see it in 2D, the late update pathway isn't used without an HMD being used and tracking.
        You asked originally about networked turning, which doesn't have anything to do with this actually.

        You'll notice the same thing in the FPS template as well, although I haven't seen it as bad as you are showing, you have either really bad framerate there or are not driving it correctly.
        Last edited by mordentral; 02-08-2018, 02:26 PM.


        Consider supporting me on patreon

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

        Comment


          Hi,
          I've tested the PluginExample scene in order to see how the plugin is used and how to setup actors for what I need.
          Unfortunately I notice that I can't modify the components inside the Characters BP ( Vive Pawn in my case ), since everything is inherited, but I can only add stuff ( which is how the inherited pawn works ).

          I order to integrate the plugin/BPs with my project I need to be able to access the inherited data....which I guess is pure C++ code you developed, correct?

          Since I need to integrate some stuff ( VR gloves, mocap suit with IK given by the controllers ) and modify some stuff ( controller position in Z and other things ), the best solution would be to do all of that at Event Begin Play, by setting transforms and attach to actor?
          Or it is possible to modify the inherited VR Character class with BPs?
          ENTER REALITY

          VR Solutions

          Contact us for more informations

          Comment


            Originally posted by Enter Reality View Post
            Hi,
            I've tested the PluginExample scene in order to see how the plugin is used and how to setup actors for what I need.
            Unfortunately I notice that I can't modify the components inside the Characters BP ( Vive Pawn in my case ), since everything is inherited, but I can only add stuff ( which is how the inherited pawn works ).

            I order to integrate the plugin/BPs with my project I need to be able to access the inherited data....which I guess is pure C++ code you developed, correct?

            Since I need to integrate some stuff ( VR gloves, mocap suit with IK given by the controllers ) and modify some stuff ( controller position in Z and other things ), the best solution would be to do all of that at Event Begin Play, by setting transforms and attach to actor?
            Or it is possible to modify the inherited VR Character class with BPs?
            Sadly aside from onconstruction and begin play BPs are rather limited in that area (in c++ you can directly override objects classes or remove them from base classes). Controller position in Z shouldn't ever be required though assuming actual tracking is being used?

            Regardless, yes, you can re-attach components however you like in BP or remove them entirely. Its just a little more manual effort.

            I had considered removing the motion controllers from being default to the base VRCharacter but I do have some special setup for them (tick ordering and an RPC function pointer) that is more convenient to setup on init in the character than on attachment/controller init. I may do it yet in the future, it will break projects as the component will not be the same is the issue.
            Last edited by mordentral; 02-09-2018, 12:35 PM.


            Consider supporting me on patreon

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

            Comment


              Originally posted by mordentral View Post

              Sadly aside from onconstruction and begin play BPs are rather limited in that area (in c++ you can directly override objects classes or remove them from base classes). Controller position in Z shouldn't ever be required though assuming actual tracking is being used?

              Regardless, yes, you can re-attach components however you like in BP or remove them entirely. Its just a little more manual effort.

              I had considered removing the motion controllers from being default to the base VRCharacter but I do have some special setup for them (tick ordering and an RPC function pointer) that is more convenient to setup on init in the character than on attachment/controller init. I may do it yet in the future, it will break projects as the component will not be the same is the issue.
              Yep, I thought there was a specific reason why the base character was inherited, but is not a gigantic issue if I'm going to setup the character using Event Begin play to do all the attach and other stuff.
              Yeah, the Z value sounds strange, but currently is the only proper solution I found ( using Mitch VR Template ) in order to have the Samsung Odyssey height properly set....I haven't tested with the VR default template, so that could be an issue with the template itself...don't know for sure.
              I think that the major issue for me will be to switch between version of the engine....because if I do the setup I have in mind on 4.18.3 and then I have to switch to 4.19, if I migrate the Character BP and install the plugin to a 4.19 scene, you think it will work or not? I had so many compatibility issue with the plugin that is a miracle that I Was able to build a 4.18 version a while ago
              ENTER REALITY

              VR Solutions

              Contact us for more informations

              Comment


                Originally posted by Enter Reality View Post

                Yep, I thought there was a specific reason why the base character was inherited, but is not a gigantic issue if I'm going to setup the character using Event Begin play to do all the attach and other stuff.
                Yeah, the Z value sounds strange, but currently is the only proper solution I found ( using Mitch VR Template ) in order to have the Samsung Odyssey height properly set....I haven't tested with the VR default template, so that could be an issue with the template itself...don't know for sure.
                I think that the major issue for me will be to switch between version of the engine....because if I do the setup I have in mind on 4.18.3 and then I have to switch to 4.19, if I migrate the Character BP and install the plugin to a 4.19 scene, you think it will work or not? I had so many compatibility issue with the plugin that is a miracle that I Was able to build a 4.18 version a while ago
                Assuming you are using the 4.19 version of the plugin, yes, besides things listed in the migration guide it should work just fine (I make architecture changes across engine versions to limit refactoring on set versions).

                Most recent patches of the engine have seen large VR overhauls so its rare for the plugin to be directly compatible across versions, but there is always a build for the new version ready (4.19 is already up).


                Not entirely sure why you have compilation difficulties though, considering it has been built on every platform with every configuration by other users (mobile/psvr/mac/linux/32/64 bit) and the entire windows build chain is processed each time I make the pre-packaged binaries.


                Consider supporting me on patreon

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

                Comment


                  Hi mordentral! First of all, I would like to congratulate you and thank you for your amazing contribution, it's been a huge help for my VR project.

                  I'd like to know if you could answer me this, I've tried to find it in this forum before posting it in case someone already asked you but I haven't found anything:

                  I'm trying to get a cabinet with drawers on each side being able to get opened with the motion controllers, the side which is facing the postive X axis works fine if I change the MAX LINEAR TRANSLATION on the details tab of the grippable object, but the drawers of the other side that are facing the X axis in the negative space don't slide if I type the same value but negative, instead they just change their position from the original to the negative if the motion controller is pressed without any interaction, how can I achieve this? The same happens for a wardrobe with 2 sliding doors, the first door works fine but the other can't be moved on the oppposite direction.

                  Thank you very much!

                  Comment


                    Originally posted by mordentral View Post

                    So I tracked down the cause, Characters FRepMovement structures default to ERotatorQuantization::ByteComponents.

                    For smooth turning for this use you'll want to go in and set them to

                    ReplicatedMovement.RotationQuantizationLevel = ERotatorQuantization::ShortComponents;

                    Byte values don't have the granularity for smooth turning like that. And it is made worse with the root offset that VR has.

                    Regardless you can also set it in blueprints in the character BP here:

                    I am hesistant to set it to the default setting for characters due to the fact that unless you are specifically doing smooth turning it shouldn't be an issue.

                    *Edit* actually pitch and roll should almost always be zero anyway, so they won't rep besides the bitflag. I'll probably default it since its a one byte cost then.
                    so actually which is the best method to put in place a replicated smooth turn movement based on controller trackpad/thumstick movement?
                    many thanks

                    Comment


                      Originally posted by Curs0 View Post

                      so actually which is the best method to put in place a replicated smooth turn movement based on controller trackpad/thumstick movement?
                      many thanks
                      Just set that setting to short and use MovementAction_SnapTurn or a custom move action. I need to go in a optimize movement actions so they use the delayed movement processing (FScopedMovement) of the CMC but it works as is.

                      Its only snappy with bytes because its not enough precision for the pivot and offset to not be noticeable, FPS games don't require that kind of precision.

                      Regardless its a 1 byte difference on repped movement and only happens when it changes, so during turning or smooth movement.
                      Last edited by mordentral; 02-11-2018, 10:49 PM.


                      Consider supporting me on patreon

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

                      Comment


                        Just tried your plugin for the first time, very nice features. Realised that the physics drawer has no physics when interacting. Neither in the demo, nor in the template project. I fixed it in the VRGrip Interface of the component Drawer1 with checking "Simulate on drop".

                        Comment


                          Originally posted by Hilarius86 View Post
                          Just tried your plugin for the first time, very nice features. Realised that the physics drawer has no physics when interacting. Neither in the demo, nor in the template project. I fixed it in the VRGrip Interface of the component Drawer1 with checking "Simulate on drop".
                          It has full physics when interacting, that is the point of it (it can be effected by things inside of it / blocking it from closing).

                          But no I left it simulating off on release on purpose. If you want it to retain momentum on release simulate on release is correct but you also likely want to set some damping up on it.


                          Consider supporting me on patreon

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

                          Comment


                            Ah ok, thanks for clarifying what is meant by physics here. Obviously, I didn't check blocking it to realize the build it constraints.

                            Comment


                              Amazing plugin. Thanks to it I saved a lot of time.

                              All the features I want are implemented.

                              I'm not use to English. but google translator helped me share it.



                              Comment


                                Originally posted by mordentral View Post

                                Just set that setting to short and use MovementAction_SnapTurn or a custom move action. I need to go in a optimize movement actions so they use the delayed movement processing (FScopedMovement) of the CMC but it works as is.

                                Its only snappy with bytes because its not enough precision for the pivot and offset to not be noticeable, FPS games don't require that kind of precision.

                                Regardless its a 1 byte difference on repped movement and only happens when it changes, so during turning or smooth movement.
                                it works, ty

                                Comment

                                Working...
                                X