Announcement

Collapse
No announcement yet.

Smooth Sync: Sync your Transforms Smoothly across the network

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

    Ramasurinen
    I'll take a look at it tonight and get back to you tonight as well. Thanks for letting me know about it and for describing it well.
    Last edited by fuestrine; 04-02-2019, 03:28 PM.
    Sync your transforms Smoothly across the network.

    Comment


      Ramasurinen
      OK, here's some things that helped me.

      Try turning NetPriority up in your Replication menu on your object that has Smooth Sync.

      Try turning the SendRate down on SmoothSync. The default value of 30 a second is probably too high really (only sends if variables have changed though). I usually see around 15 sends a second as a good send rate. With a SendRate of 15 your InterpolationBackTime will be good at default but if you lower the SendRate to below 10, you'll want to raise your InterpolationBackTime. Read the InterpolationBackTime mouse over details for more information.

      Let me know how it goes.

      If none of that helps, about how many objects with SmoothSync are you trying to sync?
      Last edited by fuestrine; 04-02-2019, 05:22 PM.
      Sync your transforms Smoothly across the network.

      Comment


        fuestrine

        Thank you for your prompt reply and your help.

        I tried your settings changes, but unfortunately there was no improvement. The issue definitely seems to be tied to cpu load, or something internal to Unreal which is related to that. At the moment there are only two objects in my scene using smooth sync, my two playable characters, one on each machine.

        Were you able to replicate the problem? Quickest way would probably be to throw down a landscape and load it up with a bunch of foliage. As soon as my client's fps starts to waver between 58 and 60 smooth sync will drop out within 20 seconds. If it gets any lower than 55 fps then it just drops out immediately. Only when the machine can comfortably push far more than the 60 fps cap does it work perfectly all the time.

        Thanks again for your assistance.

        Comment


          Ramasurinen
          I tested low fps by using "t.MaxFPS 30" in the console with the Third Person Template. I went down to 10 fps and didn't see what you were seeing either. I was seeing some jitter at 10 but it's probably expected at that point and it never got cut off.

          I'm not sure what could be causing your issue. I'll test with a bunch of foliage later and see if anything comes up and get back to you.
          Sync your transforms Smoothly across the network.

          Comment


            fuestrine

            Thanks for giving it a go! I've sent you a PM with a video of the issue I'm seeing on my end. Maybe that will help.

            Cheers!

            Comment


              fuestrine It might be useful to know that 4.22.0 just dropped - Consider supporting this engine version ASAP.

              Comment


                e3pojedi
                Already submitted. It'll be on the store whenever Epic gets around to approving it. It's usually not more than a day or two though.
                Last edited by fuestrine; 04-03-2019, 05:22 AM.
                Sync your transforms Smoothly across the network.

                Comment


                  Hello! Thanks for this Plugin. I tested it and it worked great inside editor environment. However, when I created dedicated server from comand line using command: "C:\Program Files\Epic Games\UE_4.21\Engine\Binaries\Win64\UE4Editor.exe" "D:\NetWorkTutorials\NetWorkSyncTest\NetWorkSyncTest.uproject" /Game/ThirdPersonCPP/Maps/ThirdPersonExampleMap -server -log

                  I get the errors in server log:
                  https://i.imgur.com/X0Tmcd5.png

                  Any ideas? Thanks!

                  edit: Errors are gone if I move the component from actor

                  Comment


                    Frisco
                    I don't see this issue when I use a fresh Third Person template and create a dedicated server from the command line in the way that you have.

                    /Script/SmoothSyncPlugin doesn't look familiar. Did you move the plugin outside of the plugins folder it goes into when you download from the Marketplace? I'm not sure on the rules on moving plugins outside of that folder as other plugins seemed to break for me in the past from me doing this too. Try redownloading SmoothSync from the Marketplace but keep it where it downloads it to.

                    If you want to move it into your project or something, try copying over just the SmoothSync.h/cpp and State.h/cpp files. You may want to make these files first inside of your project then just copy over the content. Then change the SMOOTHSYNCPLUGIN_API near the top of the header files (.h) to whatever your project name is (just the SMOOTHSYNCPLUGIN part is your project name, then put the _API at the end of it). Make sure to keep the ALL CAPS for your project name even if it's not in all caps when you made the project name.

                    Let me know how it goes.
                    Last edited by fuestrine; 04-03-2019, 03:31 PM.
                    Sync your transforms Smoothly across the network.

                    Comment


                      fuestrine does smooth sync support NPC's? My project seems to be crashing every so often, but I don't know what is the cause of it. Server travelling also causes a crash too.

                      Comment


                        e3pojedi
                        Hmm. I don't think I've ever tested character controllers that don't have player controllers. I'll test it out later today and get back to you. If it doesn't work, I will definitely be supporting it once I fix it.

                        If you can give me a screenshot of the actor you are trying to sync and showing the components you have on it, that will help me try to replicate the issue too.
                        Sync your transforms Smoothly across the network.

                        Comment


                          I get this error below. This occurs when the match ends via pressing escape (quitting) or changing levels, but only sometimes. I don't know what triggers it to crash though, there's no consistent way to trigger it.

                          "Access violation - code c0000005 (first/second chance not available)

                          UE4Editor_Engine!FPSCPool::Cleanup() [d:\build\++ue4\sync\engine\source\runtime\engine\private\particles\worldpscpool.cpp:45]
                          UE4Editor_Engine!FWorldPSCPool::Cleanup() [d:\build\++ue4\sync\engine\source\runtime\engine\private\particles\worldpscpool.cpp:246]
                          UE4Editor_Engine!UWorld::CleanupWorld() [d:\build\++ue4\sync\engine\source\runtime\engine\private\world.cpp:3884]
                          UE4Editor_UnrealEd!UEditorEngine::TeardownPlaySession() [d:\build\++ue4\sync\engine\source\editor\unrealed\private\playlevel.cpp:748]
                          UE4Editor_UnrealEd!UEditorEngine::EndPlayMap() [d:\build\++ue4\sync\engine\source\editor\unrealed\private\playlevel.cpp:324]
                          UE4Editor_UnrealEd!UEditorEngine::Tick() [d:\build\++ue4\sync\engine\source\editor\unrealed\private\editorengine.cpp:1992]
                          UE4Editor_UnrealEd!UUnrealEdEngine::Tick() [d:\build\++ue4\sync\engine\source\editor\unrealed\private\unrealedengine.cpp:403]
                          UE4Editor!FEngineLoop::Tick() [d:\build\++ue4\sync\engine\source\runtime\launch\private\launchengineloop.cpp:3699]
                          UE4Editor!GuardedMain() [d:\build\++ue4\sync\engine\source\runtime\launch\private\launch.cpp:174]
                          UE4Editor!GuardedMainWrapper() [d:\build\++ue4\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:145]
                          UE4Editor!WinMain() [d:\build\++ue4\sync\engine\source\runtime\launch\private\windows\launchwindows.cpp:276]
                          UE4Editor!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:283]
                          kernel32
                          ntdll"

                          Also, the image for the AI is attached - Are there too many components? @fuestrine
                          Attached Files

                          Comment


                            Also just a note - If Smooth Sync is lagging, increase the bandwidth - Put this into your DefaultEngine.ini script. Ramasurinen fuestrine

                            [/Script/Engine.GameNetworkManager]
                            TotalNetBandwidth=25600000
                            MaxDynamicBandwidth=12800000
                            MinDynamicBandwidth=10000000

                            [/Script/Engine.Player]
                            ConfiguredInternetSpeed=12800000
                            ConfiguredLanSpeed=12800000

                            Comment


                              e3pojedi
                              There's not too many components, I just wanted to see the actor you are trying to sync so I could try to recreate it on my end. Unfortunately when starting from the default VehicleAdvanced template and putting another car in the scene and having it drive without being controlled by a player, I was unable to recreate the issue.

                              I have no clue what that crash message could be. Nothing Smooth Sync related pops up in your crash message?

                              Maybe try taking SmoothSync off and switch to Unreal's "Replicate Movement" to see if you get the same crash?
                              Maybe try going back to the default VehicleAdvanced template and copy over the smallest amount of things to try to get the issue to happen?
                              Let me know if you have any other tips on how to recreate the issue.

                              If you take off SmoothSync and turn on Replicate Movement and the crash doesn't happen any more, you can send me your project in a PM or email and I can take a look at your exact scenario.

                              Thanks a bunch for the bandwidth tip! It wasn't making sense why RPCs would stop otherwise.
                              Last edited by fuestrine; 04-13-2019, 03:45 PM.
                              Sync your transforms Smoothly across the network.

                              Comment


                                I swapped the smooth sync to Unreal's Movement Replication and level transitions worked, so it's a problem with smooth sync.


                                I was able to replicate it in this project -Download the Vehicle Kart Template https://drive.google.com/open?id=0B9b7Gw4N64LCa2hGdDZsNExyY3M

                                1: Enable smooth sync plugin (Don't put it on anything)
                                2: Go to the level blueprint
                                3: Add "OnBeginPlay" to a delay of 10 seconds and then the execute console command node and put in it "servertravel Map_Example"
                                4: Press Play In Editor options, add an extra player to make it multiplayer, and press play, then wait 10 seconds.

                                A solution ASAP would be fantastic, I'm planning to get my project completed within 2 weeks!

                                fuestrine
                                Attached Files
                                Last edited by e3pojedi; 04-13-2019, 10:47 PM.

                                Comment

                                Working...
                                X