Announcement

Collapse
No announcement yet.

Smooth Sync: Sync your Transforms Smoothly across the network

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

    GuacFrog


    if the data being transmitted is compressed, I think this plugin should work for what I want to do
    Keep in mind that compression will only work up to a certain number before it starts becoming inaccurate. I want to say it's around 63,000 for half floats, which we use.

    If this plugin is not transmitting data for every object UNLESS the object has moved, then it should work with thousands of objects so long as only a few of them move at once, right?
    Maybe, but I'm not sure on Unreal's limitations in just the general amount of objects that can be networked even when not moving. I know with the success of Fortnite they have been making huge strides in networking so it may work fine, but it may not.

    if the client were to push a cube that is simulated on the server, that client player would lag into the cube because of the delay, correct? And the fix would be client prediction?
    Correct, it would not physics well and the fix would be client prediction.
    You can try turning down the Smooth Sync InterpolationBackTime and raising the Smooth Sync LerpingSpeed variables though to get more reactivity. It should then be better in this regard but still not that great.
    One other option may be to send an RPC to push it on the server when it collides on the local client, but I'm not sure of your game's needs.

    In other words, this plugin is good for smoothing actors so long as the player doesn't directly interact with those actors (ie pushing them)? For instance, a ball falling down a mountain would be smoothed well. However, a soccer ball that is being physics simulated on the server being pushed around by the client would not smooth properly with high ping.
    Correct. You may be able to send an RPC to move objects which would work for some games, but it wouldn't react in real time locally like a game like Rocket League would. The rubber banding you see in a game like Rocket League is the result of the client becoming off from what the server thinks it should be so the client gets corrected.

    Yes the first video is what I would expect from trying to physics collide with an object owned by one system and the other object owned by another system. Try lowering InterpolationBackTime and raising the LerpingSpeed variables though and it may act a bit better, but still not that great depending on what you need the box interaction for in your game.

    The second video is pretty crazy though and not what I would expect from Smooth Sync, lol.
    Is the box and the player both using Smooth Sync?
    Would I be able to recreate this issue by using the ThirdPersonTemplate and adding a box to push around? Let me know if there's anything else you did besides that to recreate the issue.

    Let me know if I didn't respond to anything or if you want more explanation on anything. Get back to me about that second video for sure and I'll see what's going wrong with Smooth Sync.
    Last edited by fuestrine; 09-20-2019, 07:33 PM.
    Sync your transforms Smoothly across the network.

    Comment


      Interesting. I'm going to do some more tests and get back to you. A couple of questions regarding replicating physics simulations from server to client. 1) Do I have to explicitly disable client physics simulations on the actor after checking simulate physics? 2) Are there any other steps I should know about when doing this?

      Regarding the second video, I believe that this is an Unreal problem and I am close to solving it.

      Comment


        GuacFrog

        1) Do I have to explicitly disable client physics simulations on the actor after checking simulate physics? 2) Are there any other steps I should know about when doing this?
        I'm not really sure how Unreal does it specifically with networked objects if you are asking about that. Smooth Sync itself will set the velocity to zero every frame so it doesn't interfere with Smooth Sync though.
        Last edited by fuestrine; 09-20-2019, 11:19 PM.
        Sync your transforms Smoothly across the network.

        Comment


          Originally posted by fuestrine View Post
          GuacFrog


          I'm not really sure how Unreal does it specifically with networked objects if you are asking about that. Smooth Sync itself will set the velocity to zero every frame so it doesn't interfere with Smooth Sync though.
          Okay, here is a better example.

          The following test was done with 150ms ping and 12 packet variance. The server is on the left and client on the right (ping is simulated).

          https://youtu.be/0Ba2lMLwP8s

          Interpolation back time is 0.025, position/rotation lerp speed is 0.9, and send rate is 60. The player is NOT using smooth sync. Only the cube.
          My basic goal is to get the player pushing the box without the major glitches. I'm okay with a few artifacts, but this is unplayable. Let me know what you think.

          Comment


            GuacFrog
            Is it better or worse when Smooth Sync is on the player? One other thing is to raise your TimeCorrectionSpeed, but it'll start getting jittery at a certain point. You could try lowering the InterpolationBackTime and raising the Position Easing Speeds more too. It's never going to be that great when doing physics if one system is determining the position and then physicsing into an object with a position determined by another system.

            It looks like you are going inside of the box a lot. Maybe mess around with Unreal collision stuff so it does that less. You can also try sending an RPC over and moving the box on the server when you hit it on your client.
            Sync your transforms Smoothly across the network.

            Comment


              Originally posted by fuestrine View Post
              GuacFrog
              Is it better or worse when Smooth Sync is on the player? One other thing is to raise your TimeCorrectionSpeed, but it'll start getting jittery at a certain point. You could try lowering the InterpolationBackTime and raising the Position Easing Speeds more too. It's never going to be that great when doing physics if one system is determining the position and then physicsing into an object with a position determined by another system.

              It looks like you are going inside of the box a lot. Maybe mess around with Unreal collision stuff so it does that less. You can also try sending an RPC over and moving the box on the server when you hit it on your client.
              When putting smooth sync on the player, it keeps him from being able to push the box on the client. He can only barely nudge it. Not sure why this is.

              Comment


                GuacFrog
                Because the physics have to happen on the same system that determines the box position. In a game like Rocket League, the server determines the position of everything (with client prediction though so it seems like it's not). If you hit it on the client, it's not really hitting it on the server. Your client player would have to try to go into a position that it can't because the box is there in order for it to hit on the server. I thought I made it clear that you wouldn't be able to physics when two separate systems are trying to physics together. If you think not though, I'd be happy to offer a refund.

                Sending an RPC to the server to move the box when you hit it on the client may work, but it depends on what you are trying to do for your game.
                Sync your transforms Smoothly across the network.

                Comment


                  Originally posted by fuestrine View Post
                  GuacFrog
                  Because the physics have to happen on the same system that determines the box position. In a game like Rocket League, the server determines the position of everything (with client prediction though so it seems like it's not). If you hit it on the client, it's not really hitting it on the server. Your client player would have to try to go into a position that it can't because the box is there in order for it to hit on the server. I thought I made it clear that you wouldn't be able to physics when two separate systems are trying to physics together. If you think not though, I'd be happy to offer a refund.

                  Sending an RPC to the server to move the box when you hit it on the client may work, but it depends on what you are trying to do for your game.
                  I do not want a refund. The plugin works well when applied to my player character (keeps him from jerking around). I think I will use this on my player and try to create a client prediction system for the physics actors in my game.

                  I apologize for the misunderstandings. I am quite new to replication. A quick note, you mention how you made it clear that physics can't be enabled on both system, but I never had physics enabled on the client, only the server. And for some reason, the player has trouble pushing around a cube when the smooth sync is applied to him.

                  Thanks for the help, I appreciate it.
                  Last edited by GuacFrog; 09-21-2019, 06:48 PM.

                  Comment


                    GuacFrog
                    No problem, glad it's working out a bit.

                    Physics can be enabled on both systems, Smooth Sync will just set the Velocity to 0 on 'non-position setting systems' and when trying to push things around physically, it's not going to work right if one system is trying to push an object who's position is determined by another system. Even if that functionality were to be turned off though, it wouldn't help because it still tries to set the position every frame.

                    Basically my understanding of the whole situation is, the reason it doesn't work is that in order to push the cube (position determined by server), your player (position determined by a client) would have to try to move into a position the cube is, but the player can't because the cube is being set to the server position every frame. So the version of your client player on the server (position determined client) needs to physically bump into the cube but it can't.
                    Sync your transforms Smoothly across the network.

                    Comment


                      Version 1.23 is now up on the Marketplace.

                      Change Log:
                      -
                      Fix for origin rebasing.


                      I also just submitted a version for Unreal 4.23 that I expect to be on the Marketplace sometime Monday.
                      Sync your transforms Smoothly across the network.

                      Comment


                        Hello. do you think this plugin will fix the multiplayer vehicule jittering ?

                        They got the same problem with squad and had to make they own netcode: "The netcode for Vehicles had to be redone."

                        https://joinsquad.com/2016/03/10/wha...hicles-part-1/

                        I got a simple dedicated server with a vehicule, player send an input to server, server add force to the vehicule, and then every client see the vehicule moving, but there is a heavy jittering

                        I found a way to have less jittering or lag by changing these 2 values ( but its not really get smooth ) : http://uppix.3dvf.com/image/kHhl

                        Also do you think it will work good with Spatiol OS ?

                        Comment


                          Samuel Brunner
                          Hi Sam. If you have the clients be the owner of the vehicles, it will not have those issues at all from what I read on that link.

                          I'm not familiar with Spatial OS at all but Smooth Sync uses Unreal's networking, so if you are still using Unreal's networking, it will work fine.

                          Let me know if you have any more questions.
                          Sync your transforms Smoothly across the network.

                          Comment


                            Thx, i wonder if it worth to use it for sending variables to server, like for animation purpose

                            Comment


                              Samuel Brunner
                              Smooth Sync will sync Movement Mode and Character Controller velocity for animations automatically right now.
                              If you want to sync something else, it isn't too difficult to set it up yourself if you know a tiny bit of coding. Or if it's something I think other people might use, I can add it to Smooth Sync.
                              Sync your transforms Smoothly across the network.

                              Comment


                                Anyone built for Oculus Quest? Just having this plugin enable even if I don't use it, causes the app to get stuck on the 3 dot loading screen... Remove the plugin, app works fine.

                                Comment

                                Working...
                                X